Mercurial > repos > iuc > ivar_consensus
comparison sanitize_bed.py @ 4:78bbd17d0703 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 693df287d23b0fd9dfd134b41d401a438c3f5ad6"
author | iuc |
---|---|
date | Mon, 22 Jun 2020 07:31:22 -0400 |
parents | |
children | e319b5b65879 |
comparison
equal
deleted
inserted
replaced
3:7f781286b55f | 4:78bbd17d0703 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 import sys | |
4 | |
5 | |
6 with open(sys.argv[1]) as i: | |
7 bed_data = i.readlines() | |
8 | |
9 sanitized_data = [] | |
10 try: | |
11 for record in bed_data: | |
12 fields = record.split('\t') | |
13 sanitized_data.append( | |
14 '\t'.join(fields[:4] + ['60'] + fields[5:]) | |
15 ) | |
16 except IndexError: | |
17 pass # leave column number issue to getmasked | |
18 else: | |
19 with open(sys.argv[1], 'w') as o: | |
20 o.writelines(sanitized_data) |