[BioRuby] Bio::PubMed efetch xml support and other options

Toshiaki Katayama ktym at hgc.jp
Tue Nov 20 16:20:23 UTC 2007


Hi,

On 2007/11/21, at 0:58, Kaustubh Patil wrote:
> The problem was temporary (solved by now). I guess it was part of maintainance.

Thank you. I've confirmed the tests are now working.

Another issue:

Most of the BioRuby classes (which access server) are designed to create a factory object first, e.g.

  server = Bio::Blast.remote(...)
  result = server.query(...)

  server = Bio::KEGG::API.new
  result = server.get_genes_by_pathway(...)

However, Bio::PubMed is not.

  result = Bio::PubMed.esearch(...)

I think this was caused only by a historical reason. Should I change this design to unify?

  server = Bio::PubMed.new
  result = server.esearch(...)

Or provides both ways - what is the most excellent way to do this (to define methods and to make them also available as class methods)?

  def esearch(args)
    # real codes
  end

  def self.esearch(args)
    self.new.esearch(args)
  end

Toshiaki

> Toshiaki Katayama wrote:
>
>> By the way, currently efetch method returns the following error.
>>
>> % ruby lib/bio/io/pubmed.rb
>>   :
>> --- Retrieve PubMed entry by E-Utils ---
>> Wed Nov 21 00:23:20 +0900 2007
>> 1: id: 16381885 Error occurred: PubMed article server is not avaliable
>> Wed Nov 21 00:23:23 +0900 2007
>> 1: id: 16381885 Error occurred: PubMed article server is not avaliable
>>
>> Is this a temporal problem?




More information about the BioRuby mailing list