Class: DuplciationValidationOutput
- Inherits:
-
ValidationReport
- Object
- ValidationReport
- DuplciationValidationOutput
- 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
Instance Method Summary (collapse)
- - (Object) color
-
- (DuplciationValidationOutput) initialize(pvalue, threshold = 0.05)
constructor
A new instance of DuplciationValidationOutput.
- - (Object) print
- - (Object) validation
Constructor Details
- (DuplciationValidationOutput) initialize(pvalue, threshold = 0.05)
Returns a new instance of DuplciationValidationOutput
10 11 12 13 14 |
# File 'lib/genevalidator/validation_duplication.rb', line 10 def initialize (pvalue, threshold = 0.05) @pvalue = pvalue @threshold = threshold end |
Instance Attribute Details
- (Object) pvalue (readonly)
Returns the value of attribute pvalue
7 8 9 |
# File 'lib/genevalidator/validation_duplication.rb', line 7 def pvalue @pvalue end |
- (Object) threshold (readonly)
Returns the value of attribute threshold
8 9 10 |
# File 'lib/genevalidator/validation_duplication.rb', line 8 def threshold @threshold end |
Instance Method Details
- (Object) color
29 30 31 32 33 34 35 |
# File 'lib/genevalidator/validation_duplication.rb', line 29 def color if validation == :no "white" else "red" end end |
- (Object) print
16 17 18 |
# File 'lib/genevalidator/validation_duplication.rb', line 16 def print "#{validation.to_s} (pval=#{@pvalue.round(2)})" end |
- (Object) validation
20 21 22 23 24 25 26 27 |
# File 'lib/genevalidator/validation_duplication.rb', line 20 def validation if pvalue < @threshold :yes else :no end end |