From 96f85263de51db3331a9c1c4e1dd067f7f36cb90 Mon Sep 17 00:00:00 2001 From: Greg Von Kuster Date: Wed, 14 Apr 2010 11:27:15 -0400 Subject: [PATCH] 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. --- lib/galaxy/datatypes/interval.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/datatypes/interval.py b/lib/galaxy/datatypes/interval.py index a8a8c41c218..f1a6db7880c 100644 --- a/lib/galaxy/datatypes/interval.py +++ b/lib/galaxy/datatypes/interval.py @@ -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: