view test/usecase3.py @ 1168:b556c96c6719
blocks3d/www Makefile: never check certificates of github, they are too confusing for wget
| author |
Daniil Alexeyevsky <dendik@kodomo.fbb.msu.ru> |
| date |
Mon, 26 May 2014 17:20:29 +0400 |
| parents |
e7d60bf1dfd8 |
| children |
08d892230e8c |
line source
2 from allpy import protein
3 from allpy.processors import Left
4 from allpy.util import open
7 if __name__ == "__main__":
9 infile = open(sys.argv[2])
10 outfile = open(sys.argv[3])
12 # This accepts ranges in form "0:5,7:12,1:-1"
13 ranges = [map(int, range.split(':')) for range in ranges.split(',')]
15 alignment = protein.Alignment().append_file(sys.stdin)
16 for begin, end in ranges:
17 columns = alignment.columns[begin:end]
18 protein.Block.from_alignment(alignment, columns=columns).realign(Left())
19 alignment.remove_gap_columns()
20 alignment.to_file(sys.stdout)
22 # vim: set et ts=4 sts=4 sw=4: