Sha256: 4ca14da5a2d5ea9a366631822e602e119269dcf299f9e71babc8bcad16932857
Contents?: true
Size: 1.75 KB
Versions: 8
Compression:
Stored size: 1.75 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 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
8 entries across 8 versions & 1 rubygems