Sha256: a75e17e75a48f00dad5787bf175bfb1b216bcc9df23765ac3c3356c3c3562f3e
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
require "ecf_classify/version" require "ecf_classify/runner" require "ecf_classify/utils" require "tempfile" require 'thor' module EcfClassify class CLI < Thor package_name "ecf_classify" class_option :help, aliases: "-h", type: :boolean desc "groups [FILE]", "Classifies protein sequences into ECF groups" method_option :probabilities, type: :string, aliases: "-p", default: nil def groups(file) handle_help_option(__method__) conserved = Tempfile.new("conserved") begin STDERR.puts EcfClassify::Runner.general(file,conserved.path) conserved.rewind STDOUT.puts EcfClassify::Runner.specific(conserved.path, __method__, options.probabilities) ensure conserved.close conserved.unlink end end desc "subgroups [FILE]", "Classifies protein sequences into ECF subgroups" method_option :probabilities, type: :string, aliases: "-p", default: nil def subgroups(file) handle_help_option(__method__) conserved = Tempfile.new("conserved") begin STDERR.puts EcfClassify::Runner.general(file,conserved.path) conserved.rewind STDOUT.puts EcfClassify::Runner.specific(conserved.path, __method__, options.probabilities) ensure conserved.close conserved.unlink end end no_commands do def handle_help_option(method_name) if options[:help] help(method_name) exit end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ecf_classify-1.0.0 | lib/ecf_classify.rb |