[BioRuby] Parsing GFF3 attributes

hienle at club-internet.fr hienle at club-internet.fr
Tue May 15 15:30:27 UTC 2007


Hello all,

I am working with a GFF3-formatted file and have noticed that the attributes field is not parsed properly.

In bio/db/gff.rb, 

    75      def parse_attributes(attributes)
    76        hash = Hash.new
    77        attributes.split(/[^\\];/).each do |atr|
    78          key, value = atr.split(' ', 2)
    79          hash[key] = value
    80        end
    81        return hash
    82      end
    83    end

I changed :
    78          key, value = atr.split(' ', 2)
to:
    78          key, value = atr.split('=', 2)

and it now appears to behave properly. However, I am not certain if this is appropriate for backward compatibility with GFF and GFF2. Is anyone working on parsing GFF3 files?

Thank you in advance for your help,
-Hien





More information about the BioRuby mailing list