diff filter_by_fasta_ids.py @ 7:0a189243186d draft

planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/t_coffee commit 88e1592fa528db1941bce52c588d4347a69cc745
author earlhaminst
date Wed, 18 Sep 2019 06:37:40 -0400
parents fa59d6fea7f5
children
line wrap: on
line diff
--- a/filter_by_fasta_ids.py	Wed Apr 25 11:15:13 2018 -0400
+++ b/filter_by_fasta_ids.py	Wed Sep 18 06:37:40 2019 -0400
@@ -35,15 +35,11 @@
 
 
 def main():
-    ''' the main function'''
-
     used_sequences = set()
     work_summary = {'wanted': 0, 'found': 0, 'duplicates': 0}
-    targets = []
 
     with open(sys.argv[1]) as f_target:
-        for line in f_target.readlines():
-            targets.append(">%s" % line.strip().upper())
+        targets = [">%s" % _.strip().upper() for _ in f_target]
 
     work_summary['wanted'] = len(targets)