module CagnutBwa::CheckTools

Public Instance Methods

check_bwa(path, ref_path) click to toggle source
# File lib/cagnut_bwa/check_tools.rb, line 9
def check_bwa path, ref_path
  check_tool_ver 'BWA' do
    `#{path} 2>&1 | grep Version | cut -f2 -d ' '` if path
  end
end
check_bwa_index(tool_path, ref_path) click to toggle source
# File lib/cagnut_bwa/check_tools.rb, line 15
def check_bwa_index tool_path, ref_path
  tool = 'Bwa Index'
  file = "#{ref_path}.ann"
  command = "#{tool_path} index #{ref_path}"
  check_ref_related file, tool, command
end
check_tool(tools_path, refs=nil) click to toggle source
Calls superclass method
# File lib/cagnut_bwa/check_tools.rb, line 3
def check_tool tools_path, refs=nil
  super if defined?(super)
  ver = check_bwa tools_path['bwa'], refs['ref_fasta']
  check_bwa_index tools_path['bwa'], refs['ref_fasta'] if !ver.blank?
end