commit/galaxy-central: jgoecks: Improve GTF sniffing by doing proper parsing of attributes.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/eae23586cb6a/ changeset: eae23586cb6a user: jgoecks date: 2011-09-01 18:35:20 summary: Improve GTF sniffing by doing proper parsing of attributes. affected #: 1 file (687 bytes) --- a/lib/galaxy/datatypes/interval.py Thu Sep 01 12:13:45 2011 -0400 +++ b/lib/galaxy/datatypes/interval.py Thu Sep 01 12:35:20 2011 -0400 @@ -939,23 +939,11 @@ return False # Check attributes for gene_id, transcript_id - attributes = hdr[8].split(";") + attributes = parse_gff_attributes( hdr[8] ) if len( attributes ) >= 2: - try: - # Imprecise: should check for a single space per the spec. - # strip() needed b/c Ensembl GTF files include an (illegal) - # space before attributes string. - attr_name, attr_value = attributes[0].strip().split(" ") - if attr_name != 'gene_id': - return False - except: + if 'gene_id' not in attributes: return False - try: - # Imprecise: should check for a single space per the spec. - attr_name, attr_value = attributes[1][1:].split(" ") - if attr_name != 'transcript_id': - return False - except: + if 'transcript_id' not in attributes: return False else: return False Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket