module CagnutSamtools::CheckTools

Public Instance Methods

check_samtools(path) click to toggle source
# File lib/cagnut_samtools/check_tools.rb, line 9
def check_samtools path
  check_tool_ver 'Samtools' do
    `#{path} --version 2>&1| grep samtools | cut -f2 -d ' '` if path
  end
end
check_samtools_index(ref_path) click to toggle source
# File lib/cagnut_samtools/check_tools.rb, line 15
def check_samtools_index ref_path
  puts 'Checking Samtools Reference Index Files...'
  tool = 'Samtools Index'
  file = "#{ref_path}.fai"
  command = "#{@config['tools']['samtools']} faidx #{ref_path}"
  check_ref_related file, tool, command
end
check_tool(tools_path, refs) click to toggle source
Calls superclass method
# File lib/cagnut_samtools/check_tools.rb, line 3
def check_tool tools_path, refs
  super if defined?(super)
  ver = check_samtools tools_path['samtools']
  check_samtools_index refs['ref_fasta'] if !ver.blank?
end