Mercurial > repos > iuc > ivar_removereads
view sanitize_bed.py @ 14:f57ce5d5c997 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 51d656555f9635bb8988f9eec904ee66657736e1
author | iuc |
---|---|
date | Wed, 19 Apr 2023 08:31:49 +0000 |
parents | ee29337f905c |
children |
line wrap: on
line source
#!/usr/bin/env python import sys with open(sys.argv[1]) as i: bed_data = i.readlines() sanitized_data = [] try: for record in bed_data: if record.strip(): fields = record.split('\t') sanitized_data.append( '\t'.join(fields[:4] + ['60'] + fields[5:]) ) except IndexError: pass # leave column number issue to getmasked else: with open(sys.argv[1], 'w') as o: o.writelines(sanitized_data)