https://github.com/georgeG/bioruby-cd-hit-report
Raw File
Tip revision: 1f90dc94bee984fc4d3b748eb3fbf6e39c27c517 authored by georgeG on 14 September 2012, 07:57:55 UTC
rename methods
Tip revision: 1f90dc9
bio-cd-hit-report
#!/usr/bin/env ruby
#
# BioRuby bio-cd-hit-report Plugin BioCdHitReport
# Author:: georgeG
# Copyright:: 2012

 USAGE = "Describe bio-cd-hit-report"

if ARGV.size == 0
  print USAGE
end

require 'bio-cd-hit-report'
require 'optparse'

# Uncomment when using the bio-logger 
# require 'bio-logger'
# Bio::Log::CLI.logger('stderr')
# Bio::Log::CLI.trace('info')

options = {:example_switch=>false,:show_help=>false}
opts = OptionParser.new do |o|
  o.banner = "Usage: #{File.basename($0)} [options] reponame\ne.g. #{File.basename($0)} the-perfect-gem"

  o.on('--example_parameter [EXAMPLE_PARAMETER]', 'TODO: put a description for the PARAMETER') do |example_parameter|
    # TODO: your logic here, below an example
    options[:example_parameter] = 'this is a parameter'
  end
  
  o.separator ""
  o.on("--switch-example", 'TODO: put a description for the SWITCH') do
    # TODO: your logic here, below an example
    self[:example_switch] = true
  end

  # Uncomment the following when using the bio-logger 
  # o.separator ""
  # o.on("--logger filename",String,"Log to file (default stderr)") do | name |
  #   Bio::Log::CLI.logger(name)
  # end
  #
  # o.on("--trace options",String,"Set log level (default INFO, see bio-logger)") do | s |
  #   Bio::Log::CLI.trace(s)
  # end
  # 
  # o.on("-q", "--quiet", "Run quietly") do |q|
  #   Bio::Log::CLI.trace('error')
  # end
  # 
  # o.on("-v", "--verbose", "Run verbosely") do |v|
  #   Bio::Log::CLI.trace('info')
  # end
  # 
  # o.on("--debug", "Show debug messages") do |v|
  #   Bio::Log::CLI.trace('debug')
  # end

  o.separator ""
  o.on_tail('-h', '--help', 'display this help and exit') do
    options[:show_help] = true
  end
end

begin
  opts.parse!(ARGV)

  # Uncomment the following when using the bio-logger 
  # Bio::Log::CLI.configure('bio-cd-hit-report')

  # TODO: your code here
  # use options for your logic
rescue OptionParser::InvalidOption => e
  options[:invalid_argument] = e.message
end
back to top