Class | Bio::SiRNA
In: | lib/bio/util/sirna.rb
Parent: | Object

# Bio::SiRNA

Designing siRNA.

This class implements the selection rules described by Kumiko Ui-Tei et al. (2004) and Reynolds et al. (2004).

### Methods

design new reynolds reynolds? uitei uitei?

### Classes and Modules

Class Bio::SiRNA::Pair
Class Bio::SiRNA::ShRNA

### Attributes

antisense_size | [RW] | A parameter of size of antisense.
max_gc_percent | [RW] | A parameter of maximal %GC.
min_gc_percent | [RW] | A parameter of minimum %GC.

### Public Class methods

new(seq, antisense_size = 21, max_gc_percent = 60.0, min_gc_percent = 40.0)

Input is a Bio::Sequence::NA object (the target sequence). Output is a list of Bio::SiRNA::Pair object.

[Source]

        # File lib/bio/util/sirna.rb, line 64
    64:     def initialize(seq, antisense_size = 21, max_gc_percent = 60.0, min_gc_percent = 40.0)
    65:       @seq = seq.rna!
    66:       @pairs = Array.new
    67:       @antisense_size = antisense_size
    68:       @max_gc_percent = max_gc_percent
    69:       @min_gc_percent = min_gc_percent
    70:     end

### Public Instance methods

design(rule = 'uitei')

rule can be one of ‘uitei’ (default) and ‘reynolds’.

[Source]

         # File lib/bio/util/sirna.rb, line 105
    105:     def design(rule = 'uitei')
    106:       @target_size = @antisense_size + 2
    107:
    108:       target_start = 0
    109:       @seq.window_search(@target_size) do |target|
    110:         antisense = target.subseq(1, @target_size - 2).complement.rna
    111:         sense     = target.subseq(3, @target_size)
    112:
    113:         target_start += 1
    114:         target_stop  = target_start + @target_size
    115:
    116:         antisense_gc_percent = antisense.gc_percent
    117:         next if antisense_gc_percent > @max_gc_percent
    118:         next if antisense_gc_percent < @min_gc_percent
    119:
    120:         case rule
    121:         when 'uitei'
    122:           next unless uitei?(target)
    123:         when 'reynolds'
    124:           next unless reynolds?(target)
    125:         else
    126:           raise NotImplementedError
    127:         end
    128:
    129:         pair = Bio::SiRNA::Pair.new(target, sense, antisense, target_start, target_stop, rule, antisense_gc_percent)
    130:         @pairs.push(pair)
    131:       end
    132:       return @pairs
    133:     end

reynolds()

same as design(‘reynolds’).

[Source]

         # File lib/bio/util/sirna.rb, line 100
    100:     def reynolds
    101:       design('reynolds')
    102:     end

reynolds?(target)

Reynolds’ rule.

[Source]

        # File lib/bio/util/sirna.rb, line 88
    88:     def reynolds?(target)
    89:       return false if /[GC]{9}/i =~ target
    90:       return false unless /^.{4}A.{6}U.{2}[AUC].{5}[AU].{2}$/i =~ target
    91:       return true
    92:     end

uitei()

same as design(‘uitei’).

[Source]

        # File lib/bio/util/sirna.rb, line 95
    95:     def uitei
    96:       design('uitei')
    97:     end

uitei?(target)

Ui-Tei‘s rule.

[Source]

        # File lib/bio/util/sirna.rb, line 73
    73:     def uitei?(target)
    74:       return false unless /^.{2}[GC]/i =~ target
    75:       return false unless /[AU].{2}$/i =~ target
    76:       return false if     /[GC]{9}/i   =~ target
    77:
    78:       one_third  = target.size * 1 / 3
    79:       start_pos  = @target_size - one_third - 1
    80:       remain_seq = target.subseq(start_pos, @target_size - 2)
    81:       au_number  = remain_seq.scan(/[AU]/i).size
    82:       return false if au_number < 5
    83:
    84:       return true
    85:     end

[Validate]