Class: AlignmentValidationOutput
- Inherits:
-
ValidationReport
- Object
- ValidationReport
- AlignmentValidationOutput
- Defined in:
- lib/genevalidator/validation_alignment.rb
Overview
Class that stores the validation output information
Instance Attribute Summary (collapse)
-
- (Object) consensus
readonly
Returns the value of attribute consensus.
-
- (Object) extra_seq
readonly
Returns the value of attribute extra_seq.
-
- (Object) gaps
readonly
Returns the value of attribute gaps.
-
- (Object) threahsold
readonly
Returns the value of attribute threahsold.
Attributes inherited from ValidationReport
#bg_color, #errors, #expected, #message, #plot_files, #result, #validation_result
Instance Method Summary (collapse)
-
- (AlignmentValidationOutput) initialize(gaps = 0, extra_seq = 0, consensus = 1, threshold = 0.2, expected = :yes)
constructor
A new instance of AlignmentValidationOutput.
- - (Object) print
- - (Object) validation
Methods inherited from ValidationReport
Constructor Details
- (AlignmentValidationOutput) initialize(gaps = 0, extra_seq = 0, consensus = 1, threshold = 0.2, expected = :yes)
Returns a new instance of AlignmentValidationOutput
13 14 15 16 17 18 19 20 21 |
# File 'lib/genevalidator/validation_alignment.rb', line 13 def initialize (gaps = 0, extra_seq = 0, consensus = 1, threshold = 0.2, expected = :yes) @gaps = gaps @extra_seq = extra_seq @consensus = consensus @threshold = threshold @result = validation @expected = expected @plot_files = [] end |
Instance Attribute Details
- (Object) consensus (readonly)
Returns the value of attribute consensus
10 11 12 |
# File 'lib/genevalidator/validation_alignment.rb', line 10 def consensus @consensus end |
- (Object) extra_seq (readonly)
Returns the value of attribute extra_seq
9 10 11 |
# File 'lib/genevalidator/validation_alignment.rb', line 9 def extra_seq @extra_seq end |
- (Object) gaps (readonly)
Returns the value of attribute gaps
8 9 10 |
# File 'lib/genevalidator/validation_alignment.rb', line 8 def gaps @gaps end |
- (Object) threahsold (readonly)
Returns the value of attribute threahsold
11 12 13 |
# File 'lib/genevalidator/validation_alignment.rb', line 11 def threahsold @threahsold end |
Instance Method Details
- (Object) print
23 24 25 |
# File 'lib/genevalidator/validation_alignment.rb', line 23 def print "#{(gaps*100).round(0)}% missing, #{(extra_seq*100).round(0)}% extra, #{(consensus*100).round(0)}% conserved" end |
- (Object) validation
27 28 29 30 31 32 33 |
# File 'lib/genevalidator/validation_alignment.rb', line 27 def validation if gaps < @threshold and extra_seq < @threshold #and consensus < @threshold :yes else :no end end |