[Bioperl-l] abott gff manipunation
Jason Stajich
jason at cgt.duhs.duke.edu
Mon Aug 25 22:21:05 EDT 2003
We store this as tag/value pairs, since all the lines start with
'product' you can get the data via
my @productdata = $feature->get_tag_values('product');
Note an API change - for pre-bioperl 1.2 this was
my @productdata = $feature->each_tag_value('product');
(although the old API is still supported for now)
But having the group column being basically free-text is bad idea, read up
on the GFF format, you should try and provide a qualifier for each field
there.
http://www.sanger.ac.uk/Software/GFF/
http://www.sanger.ac.uk/Software/GFF/GFF_Spec.html
-jason
On Tue, 26 Aug 2003, Magic Fang wrote:
> dear my colleague,
> i am now manipunating a GFF file with bioperl
> the content is like:
> #Seq. Source Feature Start End Score Strand Phase Group
> CNS06C8G blat similarity 201148 202447 100 + . product 16S ribosomal RNA, chromosome I of strain GB-M1 of Encephalitozoon cuniculi (Microspora).
> CNS06C8G blat similarity 7536 8835 100 - . product 16S ribosomal RNA, chromosome I of strain GB-M1 of Encephalitozoon cuniculi (Microspora).
> CNS06C8G blat similarity 202483 204969 100 + . product 5.8S-23S ribosomal RNA, chromosome I of strain GB-M1 of Encephalitozoon cuniculi (Microspora).
>
> my code is like:
> #!/usr/bin/perl
>
> use Bio::Tools::GFF;
> my $gff = Bio::Tools::GFF->new(-fh => \*STDIN, -gff_version => 2);
> while($feat = $gff->next_feature()) {
> print $feat->seq_id, "\t",
> $feat->source_tag, "\t",
> $feat->primary_tag, "\t",
> $feat->start, "\t",
> $feat->end, "\t",
> $feat->frame, "\t",
> $feat->score, "\t",
> $feat->strand, "\n";
> }
> $gff->close();
>
> my question is how to get the info. in the group column.
> thank u.
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu
More information about the Bioperl-l
mailing list