Mercurial > repos > iuc > ivar_variants
comparison sanitize_bed.py @ 10:584beffa972b 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:16:43 +0000 |
parents | f95f403841ad |
children |
comparison
equal
deleted
inserted
replaced
9:3888bbe7a9ca | 10:584beffa972b |
---|---|
7 bed_data = i.readlines() | 7 bed_data = i.readlines() |
8 | 8 |
9 sanitized_data = [] | 9 sanitized_data = [] |
10 try: | 10 try: |
11 for record in bed_data: | 11 for record in bed_data: |
12 fields = record.split('\t') | 12 if record.strip(): |
13 sanitized_data.append( | 13 fields = record.split('\t') |
14 '\t'.join(fields[:4] + ['60'] + fields[5:]) | 14 sanitized_data.append( |
15 ) | 15 '\t'.join(fields[:4] + ['60'] + fields[5:]) |
16 ) | |
16 except IndexError: | 17 except IndexError: |
17 pass # leave column number issue to getmasked | 18 pass # leave column number issue to getmasked |
18 else: | 19 else: |
19 with open(sys.argv[1], 'w') as o: | 20 with open(sys.argv[1], 'w') as o: |
20 o.writelines(sanitized_data) | 21 o.writelines(sanitized_data) |