Class: Bio::Assembly::Read
- Inherits:
-
Object
- Object
- Bio::Assembly::Read
- Defined in:
- lib/bio-assembly/read.rb
Instance Attribute Summary collapse
-
#clear_range_from ⇒ Object
Returns the value of attribute clear_range_from.
-
#clear_range_to ⇒ Object
Returns the value of attribute clear_range_to.
-
#from ⇒ Object
Returns the value of attribute from.
-
#name ⇒ Object
Returns the value of attribute name.
-
#orientation ⇒ Object
Returns the value of attribute orientation.
-
#seq ⇒ Object
Returns the value of attribute seq.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #==(other_read) ⇒ Object
-
#initialize(str = "") ⇒ Read
constructor
A new instance of Read.
- #num_bases ⇒ Object
Constructor Details
Instance Attribute Details
#clear_range_from ⇒ Object
Returns the value of attribute clear_range_from.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def clear_range_from @clear_range_from end |
#clear_range_to ⇒ Object
Returns the value of attribute clear_range_to.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def clear_range_to @clear_range_to end |
#from ⇒ Object
Returns the value of attribute from.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def from @from end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def name @name end |
#orientation ⇒ Object
Returns the value of attribute orientation.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def orientation @orientation end |
#seq ⇒ Object
Returns the value of attribute seq.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def seq @seq end |
#to ⇒ Object
Returns the value of attribute to.
8 9 10 |
# File 'lib/bio-assembly/read.rb', line 8 def to @to end |
Instance Method Details
#<=>(other) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/bio-assembly/read.rb', line 41 def <=>(other) unless other.kind_of?(Bio::Assembly::Read) raise "[Error] markers are not comparable" end if self.from == other.from # sort by to if froms are identical return self.to.<=>(other.to) else return self.from.<=>(other.from) end end |
#==(other_read) ⇒ Object
13 14 15 |
# File 'lib/bio-assembly/read.rb', line 13 def ==(other_read) name == other_read.name end |
#num_bases ⇒ Object
17 18 19 |
# File 'lib/bio-assembly/read.rb', line 17 def num_bases seq.length end |