From 027ccfe3aeca56826413147cdea192784833a03e Mon Sep 17 00:00:00 2001 From: Kanwei Li Date: Tue, 20 Apr 2010 13:19:44 -0400 Subject: [PATCH] GFF to Bed converter now converts the spaces to underscores to avoid UCSC problem [Brad Chapman] Closes #323 --- lib/galaxy/datatypes/converters/gff_to_bed_converter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/converters/gff_to_bed_converter.py b/lib/galaxy/datatypes/converters/gff_to_bed_converter.py index 3851d417845..ac646699afc 100644 --- a/lib/galaxy/datatypes/converters/gff_to_bed_converter.py +++ b/lib/galaxy/datatypes/converters/gff_to_bed_converter.py @@ -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: