class Bio::SiRNA
Bio::SiRNA
¶ ↑
Designing siRNA.
This class implements the selection rules described by Kumiko Ui-Tei et al. (2004) and Reynolds et al. (2004).
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)
click to toggle source
Input is a Bio::Sequence::NA
object (the target sequence). Output is a list of Bio::SiRNA::Pair
object.
# File lib/bio/util/sirna.rb 65 def initialize(seq, antisense_size = 21, max_gc_percent = 60.0, min_gc_percent = 40.0) 66 @seq = seq.rna! 67 @pairs = Array.new 68 @antisense_size = antisense_size 69 @max_gc_percent = max_gc_percent 70 @min_gc_percent = min_gc_percent 71 end
Public Instance Methods
design(rule = 'uitei')
click to toggle source
rule can be one of ‘uitei’ (default) and ‘reynolds’.
# File lib/bio/util/sirna.rb 146 def design(rule = 'uitei') 147 @target_size = @antisense_size + 2 148 149 target_start = 0 150 @seq.window_search(@target_size) do |target| 151 antisense = target.subseq(1, @target_size - 2).complement.rna 152 sense = target.subseq(3, @target_size) 153 154 target_start += 1 155 target_stop = target_start + @target_size 156 157 antisense_gc_percent = antisense.gc_percent 158 next if antisense_gc_percent > @max_gc_percent 159 next if antisense_gc_percent < @min_gc_percent 160 161 case rule 162 when 'uitei' 163 next unless uitei?(target) 164 when 'reynolds' 165 next unless reynolds?(target) 166 else 167 raise NotImplementedError 168 end 169 170 pair = Bio::SiRNA::Pair.new(target, sense, antisense, target_start, target_stop, rule, antisense_gc_percent) 171 @pairs.push(pair) 172 end 173 return @pairs 174 end
reynolds()
click to toggle source
same as design(‘reynolds’).
# File lib/bio/util/sirna.rb 141 def reynolds 142 design('reynolds') 143 end
reynolds?(target)
click to toggle source
Reynolds’ rule.
# File lib/bio/util/sirna.rb 96 def reynolds?(target) 97 return false if target.length != 23 # 21 nt target + 2 nt overhang 98 99 seq19 = target[2..20] # 19 nt double-stranded region of siRNA 100 score = 0 101 102 # criteria I 103 gc_number = seq19.scan(/[GC]/i).size 104 score += 1 if (7 <= gc_number and gc_number <= 10) 105 106 # criteria II 107 au_number = seq19[14..18].scan(/[AU]/i).size 108 score += au_number 109 110 # criteria III 111 # NotImpremented: Tm 112 113 # criteria IV 114 score += 1 if seq19[18..18].match(/A/i) 115 116 # criteria V 117 score += 1 if seq19[2..2].match(/A/i) 118 119 # criteria VI 120 score += 1 if seq19[9..9].match(/[U]/i) 121 122 # criteria VII 123 score -= 1 if seq19[18..18].match(/[GC]/i) 124 125 # criteria VIII 126 score -= 1 if seq19[12..12].match(/G/i) 127 128 if score >= 6 129 return score 130 else 131 return false 132 end 133 end
uitei()
click to toggle source
same as design(‘uitei’).
# File lib/bio/util/sirna.rb 136 def uitei 137 design('uitei') 138 end
uitei?(target)
click to toggle source
Ui-Tei’s rule.
# File lib/bio/util/sirna.rb 74 def uitei?(target) 75 return false if target.length != 23 # 21 nt target + 2 nt overhang 76 77 seq19 = target[2..20] # 19 nt double-stranded region of siRNA 78 79 # criteria i 80 return false unless seq19[18..18].match(/[AU]/i) 81 82 # criteria ii 83 return false unless seq19[0..0].match(/[GC]/i) 84 85 # criteria iii 86 au_number = seq19[12..18].scan(/[AU]/i).size 87 return false unless au_number >= 4 88 89 # criteria iv 90 return false if seq19.match(/[GC]{10}/i) 91 92 return true 93 end