[BioRuby] how to retrieve a genbank record by GI

Toshiaki Katayama ktym at hgc.jp
Thu Dec 20 16:54:18 UTC 2007


Hi Gujja,

On 2007/12/21, at 0:19, Sharvari Gujja wrote:
> On 2007/12/20, at 5:46, Robert Citek wrote:
>>> Unfortunately, I don't know how to display what version of bioruby I'm
>>> using.

You can check the version of BioRuby by

 % ruby -rubygems -rbio -e 'p Bio::BIORUBY_VERSION'
 [1, 2, 0]

or by running the bioruby command like

 % bioruby
 Loading config (/Users/ktym/.bioruby/shell/session/config) ... done
 Loading object (/Users/ktym/.bioruby/shell/session/object) ... done
 Loading history (/Users/ktym/.bioruby/shell/session/history) ... done

 . . . B i o R u b y   i n   t h e   s h e l l . . .

   Version : BioRuby 1.2.0 / Ruby 1.8.6

 bioruby> exit


> Hi all
>
> Thanks for all your input.
>
> However, can s'one explain how to set up seqdatabase.ini file. I did go thru the read me file but does not make much sense to me.

Ah, if you are using Windows, I have no idea as I have never tried.
Instead, you can also put the file on the net as described in:

 http://bioruby.org/rdoc/files/lib/bio/io/registry_rb.html

Anyway, the OBDA is still available in BioRuby but I feel
it is not actively used in other Bio* projects these days.

This situation reminds me one more way to retrieve a GenBank entry.
If you have installed the EMBOSS suite, you can setup ~/.embossrc file 
to access NCBI like:

DB genbank [
 type: N 
 format: genbank
 method: url
 url: "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&rettype=gb&retmode=text&id=%s"
]

and call entret command by

 Bio::EMBOSS.entret('genbank:185041')


> Also , I have tried
>
> Bio::PubMed.efetch("185041", {"db"=>"nuccore", "rettype"=>"gb"})
>
> but this gives me the pubmed entry. I need the genbank format.

If your BioRuby is older than 1.2.0, try update it first.
In my environment, I've got a GenBank entry correctly.
I expect that this way is most feasible on Windows for now.
I'll prepare the Bio::NCBI::Eutils class in the next release.


> Appreciate your help.
>
> Thanks
> S


Regards,
Toshiaki Katayama
--
Human Genome Center, Institute of Medical Science, University of Tokyo
4-6-1 Shirokanedai, Minato-ku, Tokyo 108-0071, Japan
tel://+81-3-5449-5614
fax://+81-3-5449-5434
http://www.hgc.jp/ (Human Genome Center)
http://bioruby.org/ (BioRuby project)
http://das.hgc.jp/ (KEGG DAS)
http://www.genome.jp/kegg/soap/ (KEGG API)







More information about the BioRuby mailing list