[Bioperl-l] Changes to GFF 2.5 "unflattening" code

lstein at cshl.edu lstein at cshl.edu
Thu Dec 11 19:18:38 EST 2003


Hi Mark, Sheldon,

I saw your change to the _parse_gff2_group code in Bio::DB::GFF, which
prioritizes "gene", "locus_tag" and "transcript" as group fields in
the column 9 attributes.  I like it, but unfortunately it breaks some
other code that I have, including the GMOD tutorial.

I think you'll like what I've done instead.  I've added a
preferred_groups() method to which you pass a list of group names.
Then, this list will be used as the priority list to pluck out groups
from the GFF2 attribute list.  To get your previous behavior, you need
to do this:

 $db = Bio::DB::GFF->new(-preferred_groups=>['gene','locus_tag','transcript'],
	                 @other_args);
 $db->load_gff(...);

or this

 $db = Bio::DB::GFF->new(@other_args);
 $db->preferred_groups('gene','locus_tag','transcript');
 $db->load_gff(...);

You'll have to change your existing scripts accordingly.  Sure, this
should be merged with Chris's unflattener, but then again let's just
get to GFF3 as quickly as we possibly can and leave this nightmare
behind us!

Lincoln

-- 
Lincoln Stein
lstein at cshl.edu
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)


More information about the Bioperl-l mailing list