GFF to Bed converter now converts the spaces to underscores to avoid UCSC problem [Brad Chapman] Closes #323

This commit is contained in:
Kanwei Li
2010-04-20 13:19:44 -04:00
parent 4a73b76bc2
commit 027ccfe3ae
@@ -21,7 +21,10 @@ def __main__():
strand = '+'
# GFF format: chrom source, name, chromStart, chromEnd, score, strand
# Bed format: chrom, chromStart, chromEnd, name, score, strand
out.write( "%s\t%s\t%s\t%s\t0\t%s\n" %( elems[0], start, elems[4], elems[2], strand ) )
#
# Replace any spaces in the name with underscores so UCSC will not complain
name = elems[2].replace(" ", "_")
out.write( "%s\t%s\t%s\t%s\t0\t%s\n" %( elems[0], start, elems[4], name, strand ) )
except:
skipped_lines += 1
if not first_skipped_line: