Class: Bio::SiRNA::Pair

Inherits:
Object show all
Defined in:
lib/bio/util/sirna.rb

Overview

Bio::SiRNA::Pair

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, sense, antisense, start, stop, rule, gc_percent) ⇒ Pair

Returns a new instance of Pair.



152
153
154
155
156
157
158
159
160
# File 'lib/bio/util/sirna.rb', line 152

def initialize(target, sense, antisense, start, stop, rule, gc_percent)
  @target     = target
  @sense      = sense
  @antisense  = antisense
  @start      = start
  @stop       = stop
  @rule       = rule
  @gc_percent = gc_percent
end

Instance Attribute Details

#antisenseObject

Returns the value of attribute antisense.



142
143
144
# File 'lib/bio/util/sirna.rb', line 142

def antisense
  @antisense
end

#gc_percentObject

Returns the value of attribute gc_percent.



150
151
152
# File 'lib/bio/util/sirna.rb', line 150

def gc_percent
  @gc_percent
end

#ruleObject

Returns the value of attribute rule.



148
149
150
# File 'lib/bio/util/sirna.rb', line 148

def rule
  @rule
end

#senseObject

Returns the value of attribute sense.



140
141
142
# File 'lib/bio/util/sirna.rb', line 140

def sense
  @sense
end

#startObject

Returns the value of attribute start.



144
145
146
# File 'lib/bio/util/sirna.rb', line 144

def start
  @start
end

#stopObject

Returns the value of attribute stop.



146
147
148
# File 'lib/bio/util/sirna.rb', line 146

def stop
  @stop
end

#targetObject

Returns the value of attribute target.



138
139
140
# File 'lib/bio/util/sirna.rb', line 138

def target
  @target
end

Instance Method Details

#reportObject

human readable report



163
164
165
166
167
168
169
170
171
172
# File 'lib/bio/util/sirna.rb', line 163

def report
  report =  "### siRNA\n"
  report << 'Start: ' + @start.to_s + "\n"
  report << 'Stop:  ' + @stop.to_s  + "\n"
  report << 'Rule:  ' + @rule.to_s  + "\n"
  report << 'GC %:  ' + @gc_percent.to_s  + "\n"
  report << 'Target:    '        + @target.upcase + "\n"
  report << 'Sense:     ' + '  ' + @sense.upcase  + "\n"
  report << 'Antisense: '        + @antisense.reverse.upcase + "\n"
end