Previous changeset 3:c282a8a47dd9 (2021-05-21) Next changeset 5:144b856e926c (2022-04-05) |
Commit message:
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/cherry_pick_fasta commit 3e1f8bb17e712d70e64ebb541775e9555acc038f" |
modified:
cherry_pick_fasta.py cherry_pick_fasta.xml |
b |
diff -r c282a8a47dd9 -r ba6c4aeb22ea cherry_pick_fasta.py --- a/cherry_pick_fasta.py Fri May 21 09:34:14 2021 +0000 +++ b/cherry_pick_fasta.py Fri May 21 11:48:59 2021 +0000 |
[ |
@@ -77,9 +77,13 @@ with open(file, 'w') as f: for header in sorted(fasta_dict): f.write('>%s\n' % header) - for i in range(line_length, len(fasta_dict[header]), line_length): - f.write('%s\n' % fasta_dict[header][i-line_length:i]) - f.write('%s\n' % fasta_dict[header][i:]) + if len(fasta_dict[header]) <= line_length: + f.write('%s\n' % fasta_dict[header]) + else: + for i in range(line_length, len(fasta_dict[header]), + line_length): + f.write('%s\n' % fasta_dict[header][i-line_length:i]) + f.write('%s\n' % fasta_dict[header][i:]) def __main__(): |
b |
diff -r c282a8a47dd9 -r ba6c4aeb22ea cherry_pick_fasta.xml --- a/cherry_pick_fasta.xml Fri May 21 09:34:14 2021 +0000 +++ b/cherry_pick_fasta.xml Fri May 21 11:48:59 2021 +0000 |
b |
@@ -1,4 +1,4 @@ -<tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="3.0.0"> +<tool id="cherry_pick_fasta" name="Pick Fasta sequences" version="3.0.1"> <description>with header satisfying a string query</description> <requirements> <requirement type="package" version="1.70">biopython</requirement> |