Class: GeneValidator::MakerQIValidationOutput

Inherits:
ValidationReport show all
Defined in:
lib/genevalidator/validation_maker_qi.rb

Overview

Class that stores the validation output information

Instance Attribute Summary

Attributes inherited from ValidationReport

#approach, #conclusion, #description, #errors, #expected, #explanation, #header, #message, #plot_files, #result, #run_time, #short_header, #validation_result

Instance Method Summary collapse

Methods inherited from ValidationReport

#color

Constructor Details

#initialize(short_header, header, description, splice_sites, exons, expected = :yes) ⇒ MakerQIValidationOutput



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/genevalidator/validation_maker_qi.rb', line 11

def initialize(short_header, header, description, splice_sites, exons,
               expected = :yes)
  @short_header, @header, @description = short_header, header, description
  @splice_sites = splice_sites
  @exons        = exons
  @expected     = expected
  @result       = validation
  @approach     = 'We obtain the fraction of splice sites and exons' \
                  ' confirmed by EST/RNASeq alignment from the FASTA' \
                  ' defline for MAKER predicted gene models. RNASeq is' \
                  ' often best evidence to ascertain the quality of gene' \
                  ' models'
  @explanation  = explain
  @conclusion   = conclude
end

Instance Method Details

#concludeObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/genevalidator/validation_maker_qi.rb', line 33

def conclude
  if @result == :yes
    'More than 80% of this gene is confirmed by RNASeq evidence.' \
    'Thus, the MAKER Quality Index suggests that the query sequence is of' \
    ' a good quality.'
  else
    'Less than 80% of this gene is confirmed by RNASeq evidence.' \
    'Thus, the MAKER Quality Index suggests that there may be some issues'\
    ' with the query seqeunce.'
  end
end

#explainObject



27
28
29
30
31
# File 'lib/genevalidator/validation_maker_qi.rb', line 27

def explain
  "#{@exons}% of exons match an EST/mRNA-seq alignment and" \
  " #{@splice_sites}% of splice sites are confirmed by EST/mRNA-seq" \
  " alignment."
end


45
46
47
48
# File 'lib/genevalidator/validation_maker_qi.rb', line 45

def print
  "Exons: #{@exons}%;" \
  " Splice Sites: #{@splice_sites}%"
end

#validationObject



50
51
52
# File 'lib/genevalidator/validation_maker_qi.rb', line 50

def validation
  (@splice_sites > 80 && @exons > 80) ? :yes : :no
end