Mercurial > repos > earlhaminst > t_coffee
diff filter_by_fasta_ids.py @ 1:b3833e5b50d4 draft
planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/t_coffee commit 011cabb2a2b3237bbbc4850ed26972816702a2ba-dirty
author | earlhaminst |
---|---|
date | Mon, 19 Dec 2016 17:47:31 -0500 |
parents | 794a6e864a96 |
children | 78dd29aa7fc1 |
line wrap: on
line diff
--- a/filter_by_fasta_ids.py Thu Dec 15 11:04:25 2016 -0500 +++ b/filter_by_fasta_ids.py Mon Dec 19 17:47:31 2016 -0500 @@ -82,10 +82,9 @@ work_summary = {'wanted': 0, 'found': 0, 'duplicates': 0} targets = [] - f_target = open(sys.argv[1]) - for line in f_target.readlines(): - targets.append(">%s" % line.strip().upper()) - f_target.close() + with open(sys.argv[1]) as f_target: + for line in f_target.readlines(): + targets.append(">%s" % line.strip().upper()) work_summary['wanted'] = len(targets) homd_db = FASTAReader(sys.argv[2])