Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 48 lines (38 sloc) 979 Bytes
#!/usr/bin/env ruby
#
# = BioRuby shell - command line interface for the BioRuby library
#
# Copyright:: Copyright (C) 2005, 2006, 2007
# Toshiaki Katayama <k@bioruby.org>
# License:: The Ruby License
#
# $Id:$
#
begin
require 'rubygems'
gem 'bio', '>= 1.1.0'
rescue LoadError
require 'bio'
end
require 'bio/shell'
# required to run commands (getseq, ls etc.)
include Bio::Shell
# setup command line options, working directory, and irb configurations
Bio::Shell::Setup.new
# loading workspace and command history
Bio::Shell.load_session
# sets default email address for Entrez eUtils.
Bio::NCBI.default_email ||= 'staff@bioruby.org'
# main loop
if Bio::Shell.cache[:rails]
Bio::Shell.cache[:rails].join
else
Signal.trap("SIGINT") do
Bio::Shell.cache[:irb].signal_handle
end
catch(:IRB_EXIT) do
Bio::Shell.cache[:irb].eval_input
end
end
# saving workspace, command history and configuration before exit
Bio::Shell.save_session
Something went wrong with that request. Please try again.