Mercurial > repos > iuc > ivar_consensus
comparison sanitize_bed.py @ 21:1c5448133894 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 97f230215d53e71748c78cd21633d92143710b94
author | iuc |
---|---|
date | Wed, 06 Aug 2025 08:23:19 +0000 |
parents | 253935875d96 |
children |
comparison
equal
deleted
inserted
replaced
20:253935875d96 | 21:1c5448133894 |
---|---|
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 if record.strip(): | |
13 fields = record.split('\t') | |
14 sanitized_data.append( | |
15 '\t'.join(fields[:4] + ['60'] + fields[5:]) | |
16 ) | |
17 except IndexError: | |
18 pass # leave column number issue to getmasked | |
19 else: | |
20 with open(sys.argv[1], 'w') as o: | |
21 o.writelines(sanitized_data) |