class GeneValidator::ORFValidationOutput

Class that stores the validation output information

Attributes

coverage[R]
mainORFFrame[R]
orfs[R]
result[R]
threshold[R]

Public Class Methods

new(short_header, header, description, orfs, coverage, longest_orf_frame, threshold = 80, expected = :yes) click to toggle source
# File lib/genevalidator/validation_open_reading_frame.rb, line 18
def initialize(short_header, header, description, orfs, coverage,
               longest_orf_frame, threshold = 80, expected = :yes)
  @short_header = short_header
  @header = header
  @description = description

  @orfs         = orfs
  @coverage     = coverage
  @threshold    = threshold
  @expected     = expected
  @result       = validation
  @plot_files   = []
  @mainORFFrame = longest_orf_frame
  @approach     = 'We expect the query sequence to encode a single gene,' \
                  ' thus it should contain one main Open Reading Frame' \
                  ' (ORF) that occupies most of the query sequence.' \
                  ' This validation does not require any BLAST hits.'
  @explanation  = " The longest ORF is in frame #{@mainORFFrame}, where" \
                  " it occupies #{@coverage.round}% of the query" \
                  ' sequence.'
  @conclusion   = conclude
end

Public Instance Methods

conclude() click to toggle source
# File lib/genevalidator/validation_open_reading_frame.rb, line 41
def conclude
  if @result == :yes
    'There is no evidence to believe that there is any problem with the' \
    ' ORF of the query sequence.'
  else
    'This only represents a portion of the query sequence. In some cases' \
    ' this indicates that a frame shift exists in the query sequence.'
  end
end
print() click to toggle source
validation() click to toggle source
# File lib/genevalidator/validation_open_reading_frame.rb, line 59
def validation
  @coverage > @threshold ? :yes : :no
end