Sha256: c851dd31e33f68abf5d8af990db7e30ecb9c06af47a66034743e57784972a067

Contents?: true

Size: 1.23 KB

Versions: 23

Compression:

Stored size: 1.23 KB

Contents

#!/usr/bin/env ruby
#
# = biofetch - BioFetch client
#
# Copyright::   Copyright (C) 2002
#               Toshiaki Katayama <k@bioruby.org>
# License::     The Ruby License
#
# $Id: br_biofetch.rb,v 1.4 2007/04/05 23:35:39 trevor Exp $
#

require 'bio/io/fetch'

def usage
  default_url = 'http://bioruby.org/cgi-bin/biofetch.rb'
  another_url = 'http://www.ebi.ac.uk/cgi-bin/dbfetch'
  puts "#{$0} [-s[erver] #{another_url}] db id [style] [format]"
  puts "  server : URL of the BioFetch CGI (default is #{default_url})"
  puts "      db : database name (embl, genbank, etc.)"
  puts "      id : entry id"
  puts "   style : 'raw' or 'html' (default is 'raw')"
  puts "  format : change the output format ('default', 'fasta', etc.)"
end

if ARGV.empty? or ARGV[0] =~ /^--?h/
  usage
  exit 1
end

case ARGV[0]
when /^--?s/				# User specified server
  ARGV.shift
  serv = Bio::Fetch.new(ARGV.shift)
  puts serv.fetch(*ARGV)
when /^--?e/				# EBI server
  ARGV.shift
  serv = Bio::Fetch.new('http://www.ebi.ac.uk/cgi-bin/dbfetch')
  puts serv.fetch(*ARGV)
when /^--?r/				# BioRuby server
  ARGV.shift
  serv = Bio::Fetch.new('http://bioruby.org/cgi-bin/biofetch.rb')
  puts serv.fetch(*ARGV)
else					# Default server
  puts Bio::Fetch.query(*ARGV)
end


Version data entries

23 entries across 23 versions & 5 rubygems

Version Path
bioruby-bio-1.2.9.9001 bin/br_biofetch.rb
bioruby-bio-1.2.9.9501 bin/br_biofetch.rb
bioruby-bio-1.3.0.5000 bin/br_biofetch.rb
bioruby-bio-1.3.0.9901 bin/br_biofetch.rb
bioruby-bio-1.3.0 bin/br_biofetch.rb
bioruby-bio-1.3.1.5000 bin/br_biofetch.rb
jandot-bio-1.2.1 bin/br_biofetch.rb
ngoto-bio-1.2.9.9001 bin/br_biofetch.rb
ngoto-bio-1.2.9.9501 bin/br_biofetch.rb
ngoto-bio-1.3.0.5000 bin/br_biofetch.rb
ngoto-bio-1.3.0 bin/br_biofetch.rb
ngoto-bio-1.3.1.5000 bin/br_biofetch.rb
wwood-bioruby-1.2.11 bin/br_biofetch.rb
bio-1.4.3.0001 bin/br_biofetch.rb
bio-1.4.3 bin/br_biofetch.rb
bio-1.4.2 bin/br_biofetch.rb
bio-1.4.1 bin/br_biofetch.rb
bio-1.4.0 bin/br_biofetch.rb
bio-1.3.1 bin/br_biofetch.rb
bio-1.1.0 bin/br_biofetch.rb