comparison sanitize_bed.py @ 4:ee2beb764a7b 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:10 -0400
parents
children ee29337f905c
comparison
equal deleted inserted replaced
3:3d18f8c3c0f6 4:ee2beb764a7b
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)