Mercurial > repos > iuc > ivar_removereads
view sanitize_bed.py @ 6:61507c9d063e draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 847ec10cd36ea4f3cd4c257d5742f0fb401e364e"
author | iuc |
---|---|
date | Thu, 10 Jun 2021 22:05:18 +0000 |
parents | ee2beb764a7b |
children | ee29337f905c |
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: 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)