comparison sanitize_bed.py @ 4:f95f403841ad 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:29:41 -0400
parents
children 584beffa972b
comparison
equal deleted inserted replaced
3:aa9de8f20668 4:f95f403841ad
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)