Class: GeneValidator::ValidationTest

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

Overview

This is an abstract class extended by all validation classes

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prediction, hits = nil, *_argv) ⇒ ValidationTest

Initilizes the object Params: type: type of the predicted sequence (:nucleotide or :protein) prediction: a Sequence object representing the blast query hits: a vector of Sequence objects (representing blast hits) argv: aditional arguments if needed



26
27
28
29
30
31
32
33
34
35
36
# File 'lib/genevalidator/validation_test.rb', line 26

def initialize(prediction, hits = nil, *_argv)
  @type              = config[:type]
  @prediction        = prediction
  @hits              = hits
  @short_header      = 'NewVal'
  @header            = 'New Validation'
  @run_time          = 0
  @cli_name          = 'all'
  @description       = 'No description available.'
  @validation_report = ValidationReport.new('Not enough evidence')
end

Instance Attribute Details

#cli_nameObject

Returns the value of attribute cli_name.



14
15
16
# File 'lib/genevalidator/validation_test.rb', line 14

def cli_name
  @cli_name
end

#descriptionObject

Returns the value of attribute description.



15
16
17
# File 'lib/genevalidator/validation_test.rb', line 15

def description
  @description
end

#headerObject

Returns the value of attribute header.



13
14
15
# File 'lib/genevalidator/validation_test.rb', line 13

def header
  @header
end

#hitsObject

Returns the value of attribute hits.



11
12
13
# File 'lib/genevalidator/validation_test.rb', line 11

def hits
  @hits
end

#predictionObject

Returns the value of attribute prediction.



10
11
12
# File 'lib/genevalidator/validation_test.rb', line 10

def prediction
  @prediction
end

#run_timeObject

Returns the value of attribute run_time.



17
18
19
# File 'lib/genevalidator/validation_test.rb', line 17

def run_time
  @run_time
end

#short_headerObject

Returns the value of attribute short_header.



12
13
14
# File 'lib/genevalidator/validation_test.rb', line 12

def short_header
  @short_header
end

#typeObject

Returns the value of attribute type.



9
10
11
# File 'lib/genevalidator/validation_test.rb', line 9

def type
  @type
end

#validation_reportObject

Returns the value of attribute validation_report.



16
17
18
# File 'lib/genevalidator/validation_test.rb', line 16

def validation_report
  @validation_report
end

Instance Method Details

#runObject



38
39
40
41
# File 'lib/genevalidator/validation_test.rb', line 38

def run
  raise 'run method should be implemented by all classes that extend' \
       ' ValidationTest'
end