[hg] galaxy 1736: Quick fix for Wiggle.set_meta(). No longer sca...
details: http://www.bx.psu.edu/hg/galaxy/rev/082c6cf528bf changeset: 1736:082c6cf528bf user: Dan Blankenberg <dan@bx.psu.edu> date: Wed Mar 04 11:57:20 2009 -0500 description: Quick fix for Wiggle.set_meta(). No longer scans the entire file when using floating point data values or when contents are BED or variableStep. 1 file(s) affected in this change: lib/galaxy/datatypes/interval.py diffs (21 lines): diff -r 9fb93cfc2449 -r 082c6cf528bf lib/galaxy/datatypes/interval.py --- a/lib/galaxy/datatypes/interval.py Thu Feb 19 16:25:05 2009 -0500 +++ b/lib/galaxy/datatypes/interval.py Wed Mar 04 11:57:20 2009 -0500 @@ -715,12 +715,16 @@ if line and not line.startswith( '#' ): elems = line.split( '\t' ) try: - int( elems[0] ) + float( elems[0] ) #"Wiggle track data values can be integer or real, positive or negative values" break except: + do_break = False for str in data.col1_startswith: if elems[0].lower().startswith(str): + do_break = True break + if do_break: + break Tabular.set_meta( self, dataset, overwrite = overwrite, skip = i ) def sniff( self, filename ):
participants (1)
-
Greg Von Kuster