Mercurial > repos > iuc > ivar_removereads
diff prepare_amplicon_info.py @ 10:ee29337f905c 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:20:33 +0000 |
parents | 75c279fa403a |
children |
line wrap: on
line diff
--- a/prepare_amplicon_info.py Fri Aug 20 20:34:11 2021 +0000 +++ b/prepare_amplicon_info.py Wed Jul 13 15:20: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: