Class: GeneValidator::GVArgValidation

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/genevalidator/arg_validation.rb

Overview

TODO: If a tabular file is provided, ensure that a tabular file has the

right number of columns

TODO: assert_if_ruby_version_is_supported A class to validate the arguments passed to the Validation Class

Defined Under Namespace

Classes: Blast

Class Method Summary collapse

Class Method Details

.command?(command) ⇒ Boolean

Return ‘true` if the given command exists and is executable.

Returns:

  • (Boolean)


33
34
35
# File 'lib/genevalidator/arg_validation.rb', line 33

def command?(command)
  system("which #{command} > /dev/null 2>&1")
end

.validate_argsObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/genevalidator/arg_validation.rb', line 17

def validate_args
  @opt = opt
  assert_file_present('input file', opt[:input_fasta_file])
  assert_input_file_probably_fasta
  assert_input_sequence
  assert_BLAST_output_files

  assert_validations_arg
  check_num_threads

  export_bin_dirs unless @opt[:bin].nil?
  Blast.validate(opt) unless @opt[:test]
  assert_mafft_installation
end