diff --git a/datatypes_conf.xml.sample b/datatypes_conf.xml.sample
index ed57048ab2a..a8b3c08e5f6 100644
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -117,8 +117,8 @@
-
-
+
+
diff --git a/lib/galaxy/datatypes/registry.py b/lib/galaxy/datatypes/registry.py
index 7e7b18bc858..838450296b6 100644
--- a/lib/galaxy/datatypes/registry.py
+++ b/lib/galaxy/datatypes/registry.py
@@ -187,7 +187,7 @@ class Registry( object ):
'axt' : 'text/plain',
'bam' : 'application/octet-stream',
'bed' : 'text/plain',
- 'blastxml' : 'text/plain',
+ 'blastxml' : 'application/xml',
'customtrack' : 'text/plain',
'csfasta' : 'text/plain',
'fasta' : 'text/plain',
@@ -200,6 +200,7 @@ class Registry( object ):
'laj' : 'text/plain',
'lav' : 'text/plain',
'maf' : 'text/plain',
+ 'memexml' : 'application/xml',
'pileup' : 'text/plain',
'qualsolid' : 'text/plain',
'qualsolexa' : 'text/plain',
diff --git a/lib/galaxy/datatypes/xml.py b/lib/galaxy/datatypes/xml.py
index 6fc25c34320..2195170f621 100644
--- a/lib/galaxy/datatypes/xml.py
+++ b/lib/galaxy/datatypes/xml.py
@@ -26,19 +26,31 @@ class BlastXml( data.Text ):
>>> fname = get_test_fname( 'megablast_xml_parser_test1.blastxml' )
>>> BlastXml().sniff( fname )
True
+ >>> fname = get_test_fname( 'tblastn_four_human_vs_rhodopsin.xml' )
+ >>> BlastXml().sniff( fname )
+ True
>>> fname = get_test_fname( 'interval.interval' )
>>> BlastXml().sniff( fname )
False
"""
- blastxml_header = [ '',
- '',
- '' ]
- for i, line in enumerate( file( filename ) ):
- if i >= len( blastxml_header ):
- return True
- line = line.rstrip( '\n\r' )
- if line != blastxml_header[ i ]:
- return False
+ #TODO - Use a context manager on Python 2.5+ to close handle
+ handle = open(filename)
+ line = handle.readline()
+ if line.strip() != '':
+ handle.close()
+ return False
+ line = handle.readline()
+ if line.strip() not in ['',
+ '']:
+ handle.close()
+ return False
+ line = handle.readline()
+ if line.strip() != '':
+ handle.close()
+ return False
+ handle.close()
+ return True
+
class MEMEXml( data.Text ):
"""MEME XML Output data"""