class Bio::SiRNA::ShRNA
Bio::SiRNA::ShRNA¶ ↑
Designing shRNA.
Attributes
bottom_strand[RW]
top_strand[RW]
Public Class Methods
new(pair)
click to toggle source
Input is a Bio::SiRNA::Pair object (the target sequence).
# File lib/bio/util/sirna.rb, line 193 def initialize(pair) @pair = pair end
Public Instance Methods
block_it(method = 'piGENE')
click to toggle source
same as design('BLOCK-iT'). method can be one of 'piGENE' (default) and 'BLOCK-iT'.
# File lib/bio/util/sirna.rb, line 210 def block_it(method = 'piGENE') top = Bio::Sequence::NA.new('CACC') # top_strand_shrna_overhang bot = Bio::Sequence::NA.new('AAAA') # bottom_strand_shrna_overhang fwd = @pair.sense rev = @pair.sense.complement case method when 'BLOCK-iT' # From BLOCK-iT's manual loop_fwd = Bio::Sequence::NA.new('CGAA') loop_rev = loop_fwd.complement when 'piGENE' # From piGENE document loop_fwd = Bio::Sequence::NA.new('GTGTGCTGTCC') loop_rev = loop_fwd.complement else raise NotImplementedError end if /^G/i =~ fwd @top_strand = top + fwd + loop_fwd + rev @bottom_strand = bot + fwd + loop_rev + rev else @top_strand = top + 'G' + fwd + loop_fwd + rev @bottom_strand = bot + fwd + loop_rev + rev + 'C' end end
design(method = 'BLOCK-iT')
click to toggle source
only the 'BLOCK-iT' rule is implemented for now.
# File lib/bio/util/sirna.rb, line 198 def design(method = 'BLOCK-iT') case method when 'BLOCK-iT' block_it else raise NotImplementedError end end
report()
click to toggle source
human readable report
# File lib/bio/util/sirna.rb, line 239 def report report = "### shRNA\n" report << "Top strand shRNA (#{@top_strand.length} nt):\n" report << " 5'-#{@top_strand.upcase}-3'\n" report << "Bottom strand shRNA (#{@bottom_strand.length} nt):\n" report << " 3'-#{@bottom_strand.reverse.upcase}-5'\n" end