Apply patch from Brad Chapman that resolves the following issue - resolves ticket # 319.

GFF and GFF3 sniffer functions in datatypes/intervals.py currently require the score column to be an integer between 0 and 1000 to assign a file as valid GFF. According to the GFF3 spec, the score values are not well defined and floating point values or numbers outside that range should also be valid.

The patch relaxes this requirement to allow detection of a wider range of GFF files.
This commit is contained in:
Greg Von Kuster
2010-04-14 11:27:15 -04:00
parent 56578f4d81
commit 96f85263de
+2 -6
View File
@@ -718,11 +718,9 @@ class Gff( Tabular, _RemoteCallMixin ):
return False
if hdr[5] != '.':
try:
score = int(hdr[5])
score = float( hdr[5] )
except:
return False
if (score < 0 or score > 1000):
return False
if hdr[6] not in data.valid_strand:
return False
return True
@@ -822,11 +820,9 @@ class Gff3( Gff ):
return False
if hdr[5] != '.':
try:
score = int(hdr[5])
score = float( hdr[5] )
except:
return False
if (score < 0 or score > 1000):
return False
if hdr[6] not in self.valid_gff3_strand:
return False
if hdr[7] not in self.valid_gff3_phase: