#!/usr/bin/env ruby # # = biogetseq - OBDA sequence data retrieval (executable) # # Copyright:: Copyright (C) 2003 # Toshiaki Katayama # License:: Ruby's # # $Id: br_biogetseq.rb,v 1.3 2006/02/09 16:29:41 k Exp $ # require 'bio' def usage print < [--namespace ] entry_id [entry_id] END exit 1 end if ARGV.size < 3 usage end while ARGV.first =~ /^-/ case ARGV.shift when /^\-\-format/ ARGV.shift raise NotImplementedError when /^\-\-dbname/ dbname = ARGV.shift when /^\-\-namespace/ namespace = ARGV.shift end end reg = Bio::Registry.new db = reg.get_database(dbname) if namespace db['namespace'] = namespace end ARGV.each do |entry| puts db.get_by_id(entry) end