[Bioperl-l] Bio::DB::GFF and Gadfly GFFs question

Jason Stajich jason at cgt.duhs.duke.edu
Wed Jun 11 19:12:51 EDT 2003


For Bio::DB::GFF::Feature objects you want:
  my @notes = $feature->attributes('Note');

Also this is aliased by the following method which is used in
the Bio::SeqFeature::Generic (and Bio::SeqFeatureI interface I hope).

  my @notes = $feature->each_tag_value('Note');
(note that the new API in bioperl 1.3+ will be
  my @notes = $feature->get_tag_values('Note');
but the old API will will still be supported as well.

-jason
On Wed, 11 Jun 2003, Venky Nandagopal wrote:

> Hi,
> I've been using the D.mel GFFs processed using the process_gadfly.pl script
> and accessing the mysql database with Bio::DB::GFF.
>
> I'm trying to figure out how to get the attributes for a gene that I
> retrieve from the database, for example:
>
>
> my $db = Bio::DB::GFF(
> 				blah blah
> 			   );
>
> my $cg = "CG2328";
> my $gene = $db->segment( -class => 'Gene', -name => $cg );
>
> now this lets me get the gene, its sequence etc as a
> Bio::DB::GFF::RelSegment.
>
> What I want is to access the attributes of the gene... for example the gene
> line for CG2328 in the GFF looks like this:
>
> 2R      gadfly  gene    5038224 5041412 .       +       .       Gene CG2328
> ; Note "Symbol eve" ; Note "FlyBase FBgn0000606"
>
> I want to be able to read the "Note" attributes. It is possible to *find*
> features by attribute, but I cant find a way to read the attributes from
> the $gene above.
>
> Can anyone help me with this?
>
> Thanks
> Venky
>
>
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list