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.

This commit is contained in:
Greg Von Kuster
2009-01-15 14:23:53 -05:00
parent ee8779987e
commit fa6155cc3f
2 changed files with 21 additions and 21 deletions
+16 -14
View File
@@ -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>
+5 -7
View File
@@ -59,18 +59,15 @@ class Registry( object ):
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 @@ class Registry( object ):
sequence.Maf(),
sequence.Lav(),
sequence.Fasta(),
sequence.FastqSolexa(),
interval.Wiggle(),
images.Html(),
sequence.Axt(),