[Bioperl-l] RE: Annotation & Feature HOWTO

Brian Osborne brian_osborne at cognia.com
Tue May 18 07:40:57 EDT 2004



Thank you for pointing that out.

Brian O.

use Bio::SeqIO;

my $seqio_object = Bio::SeqIO->new(-file => $gb_file);
my $seq_object = $seqio_object->next_seq;

foreach my $feat_object ($seq_object->get_SeqFeatures) {
  if ($feat_object->primary_tag eq "CDS") {
    print $feat_object->spliced_seq->seq,"\n";
    foreach my $val ($feat->get_tag_values('gene')) {
      if ($feat->has_tag('gene')) {
      print "gene: ",$val,"\n";
# e.g. 'NDP', from a line like '/gene="NDP"'

-----Original Message-----
From: James Wasmuth [mailto:james.wasmuth at ed.ac.uk]
Sent: Tuesday, May 18, 2004 4:55 AM
To: brian_osborne at cognia.com; bioperl-l at bioperl.org
Subject: Annotation & Feature HOWTO

Hi Brian,

about a third of the way down the page of the Annotation & Feature
HOWTO  is the line.

foreach my $val ($feat->get_tag_values('gene')
if ($feat->has_tag('gene')) {

The parentheses don't add up, and no matter where I put new ones I get a
syntax error

near ")

Can someone lift the fog covering my eyes?


More information about the Bioperl-l mailing list