mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user