Class: EcfClassify::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/ecf_classify.rb

Instance Method Summary collapse

Instance Method Details

#__print_versionObject



16
17
18
19
# File 'lib/ecf_classify.rb', line 16

def __print_version
  puts "#{EcfClassify::NAME}: #{EcfClassify::VERSION}"
  exit
end

#downloadObject



54
55
56
# File 'lib/ecf_classify.rb', line 54

def download
  EcfClassify::Zenodo.download
end

#groups(file) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ecf_classify.rb', line 23

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

#subgroups(file) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/ecf_classify.rb', line 39

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