[BioRuby] efetch/esearch broken

craigknox craigknox at gmail.com
Thu Mar 5 19:16:23 UTC 2009


Hi Everyone,

I am using the latest bioruby gem (1.3.0) and I am having trouble  
running efetch.  The following is copied directly from the tutorial on  
"http://bioruby.open-bio.org/wiki/BiorubyTutorial".  When I run it,  
"Bio::PubMed.efetch(entries)" returns a  string instead of an array of  
strings.  Additionally, the "retmax" parameter for esearch is not  
working - it is only returning the default of 100 entries.

Is the tutorial just out of date or is this a bug?

Thanks,
Craig Knox

#!/usr/bin/env ruby
require 'bio'

keywords = ARGV.join(' ') # I am using "histamine" here

options = {
   'maxdate' => '2003/05/31',
   'retmax' => 1000,
}

entries = Bio::PubMed.esearch(keywords, options)

Bio::PubMed.efetch(entries).each do |entry|
   medline = Bio::MEDLINE.new(entry)
   reference = medline.reference
   puts reference.bibtex
end



More information about the BioRuby mailing list