comparison sanitize_bed.py @ 4:db536ad45f28 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:30:46 -0400
parents
children 5671e1d3d5ee
comparison
equal deleted inserted replaced
3:5d6ed46cc101 4:db536ad45f28
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)