[hg] galaxy 1710: Eliminate the use of the "order=" for the snif...
details: http://www.bx.psu.edu/hg/galaxy/rev/c565de071f7f changeset: 1710:c565de071f7f user: Greg Von Kuster <greg@bx.psu.edu> date: Thu Jan 15 14:23:53 2009 -0500 description: Eliminate the use of the "order=" for the sniffers in datatypes.conf - since we've moved from using an ini file to an xml file, ordering is implicit. 2 file(s) affected in this change: datatypes_conf.xml.sample lib/galaxy/datatypes/registry.py diffs (74 lines): diff -r 90d04fcbcdf4 -r c565de071f7f datatypes_conf.xml.sample --- a/datatypes_conf.xml.sample Thu Jan 15 13:10:04 2009 -0500 +++ b/datatypes_conf.xml.sample Thu Jan 15 14:23:53 2009 -0500 @@ -146,20 +146,22 @@ <!-- The order in which Galaxy attempts to determine data types is important because some formats are much more loosely defined - than others. + than others. The following list should be the most rigidly + defined format first, followed by next-most rigidly defined, + and so on. --> - <sniffer order="005" type="galaxy.datatypes.xml:BlastXml"/> - <sniffer order="010" type="galaxy.datatypes.sequence:Maf"/> - <sniffer order="015" type="galaxy.datatypes.sequence:Lav"/> - <sniffer order="020" type="galaxy.datatypes.sequence:Fasta"/> - <sniffer order="025" type="galaxy.datatypes.sequence:FastqSolexa"/> - <sniffer order="030" type="galaxy.datatypes.interval:Wiggle"/> - <sniffer order="035" type="galaxy.datatypes.images:Html"/> - <sniffer order="040" type="galaxy.datatypes.sequence:Axt"/> - <sniffer order="045" type="galaxy.datatypes.interval:Bed"/> - <sniffer order="050" type="galaxy.datatypes.interval:CustomTrack"/> - <sniffer order="055" type="galaxy.datatypes.interval:Gff"/> - <sniffer order="060" type="galaxy.datatypes.interval:Gff3"/> - <sniffer order="065" type="galaxy.datatypes.interval:Interval"/> + <sniffer type="galaxy.datatypes.xml:BlastXml"/> + <sniffer type="galaxy.datatypes.sequence:Maf"/> + <sniffer type="galaxy.datatypes.sequence:Lav"/> + <sniffer type="galaxy.datatypes.sequence:Fasta"/> + <sniffer type="galaxy.datatypes.sequence:FastqSolexa"/> + <sniffer type="galaxy.datatypes.interval:Wiggle"/> + <sniffer type="galaxy.datatypes.images:Html"/> + <sniffer type="galaxy.datatypes.sequence:Axt"/> + <sniffer type="galaxy.datatypes.interval:Bed"/> + <sniffer type="galaxy.datatypes.interval:CustomTrack"/> + <sniffer type="galaxy.datatypes.interval:Gff"/> + <sniffer type="galaxy.datatypes.interval:Gff3"/> + <sniffer type="galaxy.datatypes.interval:Interval"/> </sniffers> </datatypes> diff -r 90d04fcbcdf4 -r c565de071f7f lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py Thu Jan 15 13:10:04 2009 -0500 +++ b/lib/galaxy/datatypes/registry.py Thu Jan 15 14:23:53 2009 -0500 @@ -59,18 +59,15 @@ self.converters.append( ( converter_config, extension, target_datatype ) ) except Exception, e: self.log.warning( 'Error loading datatype "%s", problem: %s' % ( extension, str( e ) ) ) - # Load datatype sniffers from config + # Load datatype sniffers from the config sniff_order = [] sniffers = root.find( 'sniffers' ) for elem in sniffers.findall( 'sniffer' ): - order = elem.get( 'order', None ) type = elem.get( 'type', None ) - if order and type: - sniff_order.append( ( order, type ) ) - sniff_order.sort() - for ele in sniff_order: + if type: + sniff_order.append( type ) + for type in sniff_order: try: - type = ele[1] fields = type.split( ":" ) datatype_module = fields[0] datatype_class = fields[1] @@ -147,6 +144,7 @@ sequence.Maf(), sequence.Lav(), sequence.Fasta(), + sequence.FastqSolexa(), interval.Wiggle(), images.Html(), sequence.Axt(),
participants (1)
-
Nate Coraor