[BioRuby] how to retrieve a genbank record by GI
Robert Citek
robert.citek at gmail.com
Wed Dec 19 20:46:07 UTC 2007
On Dec 19, 2007 1:47 PM, Sharvari Gujja <sgujja at broad.mit.edu> wrote:
> Robert Citek wrote:
> > Can you give an example of what you've tried? Also, on what system
> > are you running bioruby on, e.g. Windows XP, Cygwin in Windows, Ubuntu
> > Linux, Mac OS X, Solaris? What version of bioruby?
>
> I have tried:
>
> reg = Bio::Registry.new
> serv = reg.get_database('genbank')
> puts serv.get_by_id('J00231')
>
>
> puts Bio::Fetch.query('genbank','185041')
>
> server = Bio::Fetch.new()
> #server = Bio::Fetch.new('http://www.ebi.ac.uk/cgi-bin/dbfetch')
> puts server.fetch('genbank','J00231','html')
>
> entry = Bio::DBGET.bget("AF139016")
>
> gb = Bio::GenBank.new(Bio::Fetch.query('gb', 'J00231'))
> puts gb.read
>
> And running on Windows XP. Ruby 1.8.6
I also get errors:
$ ruby -rbio -e 'reg = Bio::Registry.new'
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize': No route to host -
connect(2) (Errno::EHOSTUNREACH)
from /usr/lib/ruby/1.8/net/http.rb:560:in `open'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/timeout.rb:48:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
from /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
from /usr/lib/ruby/1.8/net/http.rb:542:in `start'
from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
from /usr/lib/ruby/1.8/bio/io/registry.rb:190:in `read_remote'
from /usr/lib/ruby/1.8/bio/io/registry.rb:126:in `initialize'
from -e:1:in `new'
from -e:1
$ ruby -v
ruby 1.8.6 (2007-06-07 patchlevel 36) [i486-linux]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 7.10
Release: 7.10
Codename: gutsy
Unfortunately, I don't know how to display what version of bioruby I'm
using. I guess I'm too new to ruby, let alone bioruby, to be of any
help. Anyone have a working example? Unfortunately, my connection to
bioruby.org doesn't work (I suspect our 'Net connection is snafu'ed).
Regards,
- Robert
More information about the BioRuby
mailing list