Module: CagnutSnpeff::CheckTools

Defined in:
lib/cagnut_snpeff/check_tools.rb

Instance Method Summary collapse

Instance Method Details

#check_snpeff(path, db_version, config_path) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cagnut_snpeff/check_tools.rb', line 8

def check_snpeff path, db_version, config_path
  check_tool_ver 'snpEff' do
    `#{@java} -jar #{path} -version 2>&1` if path
  end

  if db_version.nil?
    @check_completed = false
    puts "\tNot Set Snpeff DB in config.yml"
  else
    puts "\tSnpeff DB: #{db_version}"
  end

  if config_path
    path = File.exist?(config_path) ? config_path : 'Not Found' if config_path
    puts "\tSnpeff config file: #{path}"
  else
    puts "\tSnpeff config Not Found"
  end
end

#check_tool(tools_path, refs = nil) ⇒ Object



3
4
5
6
# File 'lib/cagnut_snpeff/check_tools.rb', line 3

def check_tool tools_path, refs=nil
  super if defined?(super)
  check_snpeff tools_path['snpeff'], refs['snpeff']['db'], refs['snpeff']['config'] if @java
end