Sha256: a25929011492cfd0d836b0fc018c04bda00f539ad4f8c5da12e06f97554d22aa
Contents?: true
Size: 1.91 KB
Versions: 9
Compression:
Stored size: 1.91 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require 'optparse' require 'sequenceserver' # e.g: # sequenceserver --config .sequenceserver.conf format_database begin # parse command line till first non-option, removing parsed options from ARGV OptionParser.new do |opts| opts.banner =<<BANNER SUMMARY custom, local, BLAST server USAGE sequenceserver [options] [subcommand] [subcommand's options] Example: # launch SequenceServer with the given config file $ sequenceserver --config ~/.sequenceserver.ants.conf # use the bundled database formatter utility to prepare databases for use # with SequenceServer $ sequenceserver format-databases DESCRIPTION SequenceServer lets you rapidly set up a BLAST+ server with an intuitive user interface for use locally or over the web. SUB-COMMANDS format-databases: prepare BLAST databases for use with SequenceServer Run '#{$0} format-databases -h' for help. OPTIONS BANNER opts.on('-c', '--config CONFIG_FILE', 'Use the given configuration file') do |config_file| SequenceServer::App.config_file = File.expand_path(config_file) end opts.on('-v', '--version', 'Print version number of SequenceServer that will be loaded.' ) do |config_file| puts SequenceServer.version exit end end.order! # of the remaining items in ARGV, the first one must be a subcommand subcommand = ARGV.shift if subcommand # process subcommands now case subcommand when 'format-databases' require 'sequenceserver/database_formatter' exit else puts "invalid subcommand: #{subcommand}" puts "Run '#{$0} -h' for help with command line options." exit end end rescue OptionParser::InvalidOption =>e puts e puts "Run '#{$0} -h' for help with command line options." exit end # display name for tools like `ps` $PROGRAM_NAME = 'sequenceserver' SequenceServer::App.run!
Version data entries
9 entries across 9 versions & 2 rubygems