[Bioperl-l] Re: Feature-Annotation HOWTO

Brian Osborne brian_osborne at cognia.com
Thu Aug 11 10:57:51 EDT 2005


First, make sure to write to bioperl-l with questions, there are certainly
people there who know as much, or more, about Features and Annotations as

With regard to references, I believe this bug has been fixed in the latest
Bioperl, bioperl-live.

With regard to the ids ("db_xref"), you'll have to show us what the source
file is and what @ids looks like, I'm afraid I didn't exactly understand the

With regard to SeqIO, your code looks fine but you've only shown part of it
so I can't be sure. Here's another rendition:

>perl -e 'use Bio::DB::GenBank; $db = new Bio::DB::GenBank; $seq =
$db->get_Seq_by_id(2); use Bio::SeqIO; $out = Bio::SeqIO->new(-fh => \*STDERR,
-format => "fasta"); $out->write_seq($seq);'
>A00002 B.taurus DNA sequence 1 from patent application EP0238993.

Generally speaking, show the entire script as well as any related files so
nothing is left to the imagination.

Brian O.

On 8/11/05 9:42 AM, "Pedro Antonio Reche" <reche at research.dfci.harvard.edu>

> Dear Brian,
> I have tried your code from the HOWTO
> my @annotations = $anno_collection->get_Annotations('reference');
> if ($value->tagname eq "reference") {
> my $hash_ref = $value->hash_tree;
> for my $key (keys %{$hash_ref}) {
> print $key,": ",$hash_ref->{$key},"\n";
>  }
> on the gb record attached in this e-mail and I unfortunatelly I am
> unable to get the medline record. I have also tried
> my @annotations = $anno_collection->get_Annotations('reference');
> print "author: ",$value->authors(), "\n";
> print "Title: ",$value->title(), "\n";
> print "Medline: ",$value->medline(), "\n";
> print "PubMed: ",$value->pubmed(), "\n";
> print "Database: ",$value->database(), "\n";
> with the same result. i can not print the medline record. I have also
> find that the code:
> for my $feat_object ($seq_object->get_SeqFeatures) {
>           push @ids,$feat_object->get_tag_values("db_xref")
>                if ($feat_object->has_tag("db_xref"));
>        }
> does not populate  @ids properly with the unique values under
> "db_xreff" but with repeated concatenated values.
> Finally, given that
> $seq_object = $feat_object->entire_seq;
> returns  a  Bio::PrimarySeq I tried to define
> my $out = new Bio::SeqIO(-fh => \*STDERR, -format => 'fasta');
> to print the sequences as
> $out->write_seq($seq_object )
> but it did not work.
> Any help to solve these problem will be apprecitated. I am using
> bioperl 1.4
> Regards,
> pedro

More information about the Bioperl-l mailing list