[BioRuby] A Rails application with BioRuby

Toshiaki Katayama ktym at hgc.jp
Fri Dec 21 05:16:06 UTC 2007


Hi Yen-Ju,

On 2007/12/21, at 4:11, Yen-Ju Chen wrote:

> >  * Is it possible to get DOI from PubMed ?
>
>   entry = Bio::PubMed.query(16946072)
>   doi = entry[/AID - (\S+) \[doi\]/, 1]
>
>
> or you can extend the Bio::MEDLINE class to add the doi method
>
>
>   Is it possible to have this feature in BioRuby ?
>


I just committed the following changes to the CVS.

  def doi
    @pubmed['AID'][/(\S+) \[doi\]/, 1]
  end

  def pii
    @pubmed['AID'][/(\S+) \[pii\]/, 1]
  end

so that you can use them as

 entry = Bio::PubMed.query(16946072)
 medline = Bio::MEDLINE.new(entry)
 doi = medline.doi
 pii = medline.pii

Regards,
Toshiaki




More information about the BioRuby mailing list