[Bioperl-l] extracting 'comments' from gff-ver 2
Charles Hauser
chauser at duke.edu
Fri Apr 4 11:16:17 EST 2003
Malcom,
I see why this should work, but I get warning that tag value sequence does not exist?
while($feature = $gffio->next_feature()) {
if($feature->primary_tag eq 'gene') {
print
"Target ", $feature->seqname,"\n",
"Query ", ($feature->each_tag_value('sequence'))[0],"\n";
}
}
------------- EXCEPTION -------------
MSG: asking for tag value that does not exist sequence
STACK Bio::SeqFeature::Generic::each_tag_value /usr/lib/perl5/site_perl/5.6.1/Bio/SeqFeature/Generic.pm:507
STACK main::GFF gff_parser.pl:55
STACK toplevel gff_parser.pl:22
On Fri, 2003-04-04 at 10:42, Cook, Malcolm wrote:
> Charles,
>
> try:
> ($feature->each_tag_value('sequence'))[0]
> where you have
> $feature->comments
>
> -Malcolm Cook
>
> > -----Original Message-----
> > From: Charles Hauser [mailto:chauser at duke.edu]
> > Sent: Friday, April 04, 2003 9:21 AM
> > To: BioPerl-List
> > Subject: [Bioperl-l] extracting 'comments' from gff-ver 2
> >
> >
> > I am trying to generate a plot of the distribution of ESTs on genomic
> > scaffolds using the GFF output from exonerate. I need to grab the
> > clone_id in the comments field '833005F02.y1'.
> >
> > the method $feature->comments does not exist, how can I access these
> > data?
> >
> > -regards
> >
> > Charles
> >
> >
> >
> >
> > use Bio::Tools::GFF;
> > <snip>
> > my $gffio = Bio::Tools::GFF->new(-fh => \*FH,
> > -gff_version => 2);
> > my $feature;
> > while($feature = $gffio->next_feature()) {
> > if($feature->primary_tag eq 'gene') {
> > print
> > $feature->seqname, "\n",
> > $feature->comments, "\n";
> >
> >
> >
> > ##gff-version 2
> > ##source-version exonerate:est2genome 0.6.7
> > ##date 2003-03-24
> > ##type DNA
> > #
> > #
> > # seqname source feature start end score strand frame attributes
> > #
> > scaffold_1 exonerate:est2genome gene 367897 368609
> > 1884 + . gene_id 1 ; sequence
> > 833005F02.y1 ; gene_orientation
> > + ;
> >
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at bioperl.org
> > http://bioperl.org/mailman/listinfo/bioperl-l
> >
More information about the Bioperl-l
mailing list