Class: DuplicationValidationOutput
- Inherits:
-
ValidationReport
- Object
- ValidationReport
- DuplicationValidationOutput
- Defined in:
- lib/genevalidator/validation_duplication.rb
Overview
Class that stores the validation output information
Instance Attribute Summary (collapse)
-
- (Object) pvalue
readonly
Returns the value of attribute pvalue.
-
- (Object) threshold
readonly
Returns the value of attribute threshold.
Attributes inherited from ValidationReport
#bg_color, #errors, #expected, #message, #plot_files, #result, #validation_result
Instance Method Summary (collapse)
- - (Object) color
-
- (DuplicationValidationOutput) initialize(pvalue, threshold = 0.05, expected = :no)
constructor
A new instance of DuplicationValidationOutput.
- - (Object) print
- - (Object) validation
Constructor Details
- (DuplicationValidationOutput) initialize(pvalue, threshold = 0.05, expected = :no)
Returns a new instance of DuplicationValidationOutput
11 12 13 14 15 16 |
# File 'lib/genevalidator/validation_duplication.rb', line 11 def initialize (pvalue, threshold = 0.05, expected = :no) @pvalue = pvalue @threshold = threshold @result = validation @expected = expected end |
Instance Attribute Details
- (Object) pvalue (readonly)
Returns the value of attribute pvalue
8 9 10 |
# File 'lib/genevalidator/validation_duplication.rb', line 8 def pvalue @pvalue end |
- (Object) threshold (readonly)
Returns the value of attribute threshold
9 10 11 |
# File 'lib/genevalidator/validation_duplication.rb', line 9 def threshold @threshold end |
Instance Method Details
- (Object) color
30 31 32 33 34 35 36 |
# File 'lib/genevalidator/validation_duplication.rb', line 30 def color if validation == :no "success" else "danger" end end |
- (Object) print
18 19 20 |
# File 'lib/genevalidator/validation_duplication.rb', line 18 def print "pval=#{@pvalue.round(2)}" end |
- (Object) validation
22 23 24 25 26 27 28 |
# File 'lib/genevalidator/validation_duplication.rb', line 22 def validation if @pvalue < @threshold :yes else :no end end |