[Bioperl-l] pubmed

Yu ZHOU zhouyubio at gmail.com
Wed May 10 01:35:01 UTC 2006


Qunfeng <qfdong <at> iastate.edu> writes:

> 
> Hi there,
> 
> http://bioperl.org/HOWTOs/Feature-Annotation/anno_from_genbank.html
> 
> I am not very familiar with BioPerl. I tried to follow the example showing 
> in the above page to retrieve pubmed ID under each Reference tag , i.e., 
> $value->pubmed(), but it doesn't work for me for the seq gi#56961711. The 
> authors() works for me.  Appreciate any suggestions.
> 
> Qunfeng 
> 


Hi, 

I have the same problem with you. Here is what I have done, by using regular
expression to match the value of 'location' tag, if there is.

#------------------
my $ann = $seqobj->annotation(); # annotation object
foreach my $ref ( $ann->get_Annotations('reference') ) {
    print "Title: ", $ref->title,"\n";
    print "Location: ", $ref->location, "\n";
    if ($ref->location =~ /PUBMED\s+(\d+)/) {
	my $pmid = $1;
	print "PMID: ", $pmid, "\n";
    }
    print "Authors: ", $ref->authors, "\n";
}
#------------------





More information about the Bioperl-l mailing list