Class: GeneValidator::ValidationTest

Inherits:
Object
  • Object
show all
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(type, 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



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/genevalidator/validation_test.rb', line 22

def initialize(type, prediction, hits = nil, *_argv)
  @type              = type
  @prediction        = prediction
  @hits              = hits
  @short_header      = 'NewVal'
  @header            = 'New Validation'
  @running_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.



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

def cli_name
  @cli_name
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#headerObject

Returns the value of attribute header.



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

def header
  @header
end

#hitsObject

Returns the value of attribute hits.



7
8
9
# File 'lib/genevalidator/validation_test.rb', line 7

def hits
  @hits
end

#predictionObject

Returns the value of attribute prediction.



6
7
8
# File 'lib/genevalidator/validation_test.rb', line 6

def prediction
  @prediction
end

#running_timeObject

Returns the value of attribute running_time.



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

def running_time
  @running_time
end

#short_headerObject

Returns the value of attribute short_header.



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

def short_header
  @short_header
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/genevalidator/validation_test.rb', line 5

def type
  @type
end

#validation_reportObject

Returns the value of attribute validation_report.



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

def validation_report
  @validation_report
end

Instance Method Details

#runObject



34
35
36
37
# File 'lib/genevalidator/validation_test.rb', line 34

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