Class: Bio::SiRNA::ShRNA
Overview
Bio::SiRNA::ShRNA
Designing shRNA.
Instance Attribute Summary collapse
-
#bottom_strand ⇒ Object
Bio::Sequence::NA.
-
#top_strand ⇒ Object
Bio::Sequence::NA.
Instance Method Summary collapse
-
#block_it(method = 'piGENE') ⇒ Object
same as design(‘BLOCK-iT’).
-
#design(method = 'BLOCK-iT') ⇒ Object
only the ‘BLOCK-iT’ rule is implemented for now.
-
#initialize(pair) ⇒ ShRNA
constructor
Input is a Bio::SiRNA::Pair object (the target sequence).
-
#report ⇒ Object
human readable report.
Constructor Details
#initialize(pair) ⇒ ShRNA
Input is a Bio::SiRNA::Pair object (the target sequence).
193 194 195 |
# File 'lib/bio/util/sirna.rb', line 193 def initialize(pair) @pair = pair end |
Instance Attribute Details
#bottom_strand ⇒ Object
Bio::Sequence::NA
190 191 192 |
# File 'lib/bio/util/sirna.rb', line 190 def bottom_strand @bottom_strand end |
#top_strand ⇒ Object
Bio::Sequence::NA
187 188 189 |
# File 'lib/bio/util/sirna.rb', line 187 def top_strand @top_strand end |
Instance Method Details
#block_it(method = 'piGENE') ⇒ Object
same as design(‘BLOCK-iT’). method can be one of ‘piGENE’ (default) and ‘BLOCK-iT’.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# 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') ⇒ Object
only the ‘BLOCK-iT’ rule is implemented for now.
198 199 200 201 202 203 204 205 |
# 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 ⇒ Object
human readable report
239 240 241 242 243 244 245 |
# 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 |