Class: Quorum::TblastnJob

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/quorum/tblastn_job.rb

Instance Method Summary collapse

Instance Method Details

#gap_opening_extensionObject

Virtual attribute getter.



68
69
70
# File 'app/models/quorum/tblastn_job.rb', line 68

def gap_opening_extension
  [gap_opening_penalty, gap_extension_penalty].join(',')
end

#gap_opening_extension=(value) ⇒ Object

Virtual attribute setter.



75
76
77
78
79
# File 'app/models/quorum/tblastn_job.rb', line 75

def gap_opening_extension=(value)
  v = value.split(',')
  self.gap_opening_penalty   = v.first
  self.gap_extension_penalty = v.last
end

#gap_opening_extension_valuesObject

Valid gap opening and extension values.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'app/models/quorum/tblastn_job.rb', line 47

def gap_opening_extension_values
  [
    ['--Select--', ''],
    ['32767, 32767', '32767,32767'],
    ['11, 2', '11,2'],
    ['10, 2', '10,2'],
    ['9, 2', '9,2'],
    ['8, 2', '8,2'],
    ['7, 2', '7,2'],
    ['6, 2', '6,2'],
    ['13, 1', '13,1'],
    ['12, 1', '12,1'],
    ['11, 1', '11,1'],
    ['10, 1', '10,1'],
    ['9, 1', '9,1']
  ]
end

#gapped_alignment?Boolean

Gapped alignment helper.

Returns:

  • (Boolean)


40
41
42
# File 'app/models/quorum/tblastn_job.rb', line 40

def gapped_alignment?
  self.gapped_alignments
end