Module: GeneValidatorApp::RunGeneValidator

Extended by:
Forwardable
Defined in:
lib/genevalidatorapp/genevalidator.rb

Overview

Module that runs GeneValidator

Defined Under Namespace

Classes: ArgumentError, RuntimeError

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.gv_dirObject (readonly)

Returns the value of attribute gv_dir.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def gv_dir
  @gv_dir
end

.input_fileObject (readonly)

Returns the value of attribute input_file.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def input_file
  @input_file
end

.paramsObject (readonly)

Returns the value of attribute params.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def params
  @params
end

.raw_seqObject (readonly)

Returns the value of attribute raw_seq.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def raw_seq
  @raw_seq
end

.unique_idObject (readonly)

Returns the value of attribute unique_id.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def unique_id
  @unique_id
end

.xml_fileObject (readonly)

Returns the value of attribute xml_file.



30
31
32
# File 'lib/genevalidatorapp/genevalidator.rb', line 30

def xml_file
  @xml_file
end

Class Method Details

.init(url, params) ⇒ Object

Setting the scene



33
34
35
36
37
38
39
40
41
# File 'lib/genevalidatorapp/genevalidator.rb', line 33

def init(url, params)
  create_unique_id
  create_run_dir
  @params = params
  validate_params
  obtain_db_path
  @json_url = produce_json_url_link(url)
  @url = produce_result_url_link(url)
end

.runObject

Runs genevalidator & Returns parsed JSON, or link to JSON/results file



44
45
46
47
48
49
# File 'lib/genevalidatorapp/genevalidator.rb', line 44

def run
  write_seq_to_file
  run_genevalidator
  { parsed_json: parse_output_json, json_url: @json_url,
    results_url: @url, unique_id: @unique_id }
end