Mercurial > repos > iuc > ivar_trim
diff prepare_amplicon_info.py @ 11:5671e1d3d5ee draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 8ce6fd9aee543d9e62db33a9c95f79d8dc4e6dea
author | iuc |
---|---|
date | Wed, 13 Jul 2022 15:18:33 +0000 |
parents | cf65217ad61c |
children |
line wrap: on
line diff
--- a/prepare_amplicon_info.py Sun Mar 20 11:43:34 2022 +0000 +++ b/prepare_amplicon_info.py Wed Jul 13 15:18:33 2022 +0000 @@ -11,7 +11,10 @@ primer_starts = {} with open(sys.argv[1]) as i: for line in i: - f = line.strip().split('\t') + line = line.strip() + if not line: + continue + f = line.split('\t') try: if f[5] == '+': primer_starts[f[3]] = int(f[1]) @@ -32,8 +35,11 @@ with open(sys.argv[2]) as i: ret_lines = [] for line in i: + line = line.strip() + if not line: + continue first = last = None - for pname in line.strip().split('\t'): + for pname in line.split('\t'): try: primer_start = primer_starts[pname] except KeyError: