Mercurial > repos > artbio > sequence_format_converter
annotate test-data/sort.py @ 4:1c14d2869d4d draft default tip
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit 9c5f0b8e89dfe4347c610f42923f0acad2ecc81b"
author | artbio |
---|---|
date | Wed, 17 Mar 2021 22:09:13 +0000 |
parents | a8aacccd79a3 |
children |
rev | line source |
---|---|
0
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
1 import sys |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
2 |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
3 F = open(sys.argv[1], 'r') |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
4 lines = F.readlines() |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
5 lines = [line[:-1] for line in lines] |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
6 for line in sorted(lines): |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
7 print(line) |
a8aacccd79a3
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/sequence_format_converter commit d6ef80f9db43eae4f58b33f58b5ef6f8209907db
artbio
parents:
diff
changeset
|
8 F.close() |