[BioRuby] test and bioruby shell questions

Toshiaki Katayama ktym at hgc.jp
Sat Aug 30 12:16:01 UTC 2008


Dear Davide,

On 2008/08/29, at 23:44, Davide Rambaldi wrote:
> - BioRuby SHELL
>  during shell demo (demo command) there is a crash after:
> kuma = getobj("gb:AF237819")
> Retrieving entry from KEGG API (gb:AF237819)
>  ==> nil
> bioruby> kuma.definition
> NoMethodError: undefined method `definition' for nil:NilClass
>        from /usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
>        from /usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
>        from /usr/local/lib/ruby/1.8/irb/workspace.rb:52
> Maybe IRB bug!!
>
>  crash because kuma is empty? irb can reach the sequence?
> bioruby> kuma
>  ==> nil

This feature (obtaining GenBank entry by getobj method) is temporally unavailable
because of the discontinuation of the GenBank retrieval service in KEGG API
developed at the Kyoto University in Japan.

The demo above was designed to utilize the KEGG API, which is a SOAP based web service,
so we need to change the default data source to obtain this entry.
We can fix this by switching to use NCBI's efetch method instead.


> - SHELL OBJECTS and HELP
>
>  there is a way to delete shell objects (.bioruby/shell/session/object) directly from the shell?
>  a "rm" command?

Yes.

If you have a large object which you don't want to save persistently over the sessions,

bioruby> a = "atgc" * 10000

you can remove it by the name of the variable

bioruby> rm "a"

or by the symbol of the variable name

bioruby> rm :a

Actually, the rm command temporally assign 'nil' to the variable
because BioRuby shell will avoid to dump variables having 'nil' as its value.
(This means, the memory will not be returned to the OS until next GC.)

This implementation looks somewhat ugly, so if you have a better idea, please let me know.


>  there is an help in the BioRuby shell? (help give me => nil,  ./bioruby --help give unrecognized option )

Planned but never implemented. Sorry.

Regards,
Toshiaki Katayama






More information about the BioRuby mailing list