Class: Qu::Pcr::Primer

Inherits:
Object
  • Object
show all
Defined in:
lib/qu/pcr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(seq = nil, type = nil, gc = nil, tm = nil, penalty = nil, pos = nil) ⇒ Primer

Returns a new instance of Primer.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/qu/pcr.rb', line 12

def initialize(seq = nil, 
               type = nil,
               gc = nil,
               tm = nil,
               penalty = nil,
               pos = nil)


  # type should be "forward" or "reverse"
  @type = type

  @gc = gc.to_f
  @tm = tm.to_f
  @penalty = penalty.to_f
  # position of primer's 5' end
  @pos = pos.to_i
  @seq = Bio::Sequence::NA.new(seq)
end

Instance Attribute Details

#gcObject (readonly)

Returns the value of attribute gc.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def gc
  @gc
end

#penaltyObject (readonly)

Returns the value of attribute penalty.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def penalty
  @penalty
end

#posObject (readonly)

Returns the value of attribute pos.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def pos
  @pos
end

#seqObject (readonly)

Returns the value of attribute seq.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def seq
  @seq
end

#tmObject (readonly)

Returns the value of attribute tm.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def tm
  @tm
end

#typeObject (readonly)

Returns the value of attribute type.



11
12
13
# File 'lib/qu/pcr.rb', line 11

def type
  @type
end