details: http://www.bx.psu.edu/hg/galaxy/rev/18d0d7fd543a changeset: 3672:18d0d7fd543a user: Kanwei Li kanwei@gmail.com date: Tue Apr 20 13:19:44 2010 -0400 description: GFF to Bed converter now converts the spaces to underscores to avoid UCSC problem [Brad Chapman] Closes #323
diffstat:
lib/galaxy/datatypes/converters/gff_to_bed_converter.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 7cb131814770 -r 18d0d7fd543a lib/galaxy/datatypes/converters/gff_to_bed_converter.py --- a/lib/galaxy/datatypes/converters/gff_to_bed_converter.py Mon Apr 19 17:43:39 2010 -0400 +++ b/lib/galaxy/datatypes/converters/gff_to_bed_converter.py Tue Apr 20 13:19:44 2010 -0400 @@ -21,7 +21,10 @@ 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:
galaxy-commits@lists.galaxyproject.org