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: