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
234 def initialize(pair)
235   @pair = pair
236 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
251 def block_it(method = 'piGENE')
252   top = Bio::Sequence::NA.new('CACC') # top_strand_shrna_overhang
253   bot = Bio::Sequence::NA.new('AAAA') # bottom_strand_shrna_overhang
254   fwd = @pair.sense
255   rev = @pair.sense.complement
256 
257   case method
258   when 'BLOCK-iT'
259     # From BLOCK-iT's manual
260     loop_fwd = Bio::Sequence::NA.new('CGAA')
261     loop_rev = loop_fwd.complement
262   when 'piGENE'
263     # From piGENE document
264     loop_fwd = Bio::Sequence::NA.new('GTGTGCTGTCC')
265     loop_rev = loop_fwd.complement
266   else
267     raise NotImplementedError
268   end
269 
270   if /^G/i =~ fwd
271     @top_strand    = top + fwd + loop_fwd + rev
272     @bottom_strand = bot + fwd + loop_rev + rev
273   else
274     @top_strand    = top + 'G' + fwd + loop_fwd + rev
275     @bottom_strand = bot + fwd + loop_rev + rev + 'C'
276   end
277 end
design(method = 'BLOCK-iT') click to toggle source

only the ‘BLOCK-iT’ rule is implemented for now.

    # File lib/bio/util/sirna.rb
239 def design(method = 'BLOCK-iT')
240   case method
241   when 'BLOCK-iT'
242     block_it
243   else
244     raise NotImplementedError
245   end
246 end
report() click to toggle source

human readable report

    # File lib/bio/util/sirna.rb
280 def report
281   # raise NomethodError for compatibility
282   raise NoMethodError if !defined?(@top_strand) || !@top_strand
283   report = "### shRNA\n"
284   report << "Top strand shRNA (#{@top_strand.length} nt):\n"
285   report << "  5'-#{@top_strand.upcase}-3'\n"
286   report << "Bottom strand shRNA (#{@bottom_strand.length} nt):\n"
287   report << "      3'-#{@bottom_strand.reverse.upcase}-5'\n"
288 end