Class: Bio::FinishM::ScaffoldBreaker::UnscaffoldedContig
- Inherits:
-
Object
- Object
- Bio::FinishM::ScaffoldBreaker::UnscaffoldedContig
- Defined in:
- lib/assembly/scaffold_breaker.rb
Instance Attribute Summary collapse
-
#scaffold ⇒ Object
The Scaffold to which this contig once belonged.
-
#scaffold_position_end ⇒ Object
Returns the value of attribute scaffold_position_end.
-
#scaffold_position_start ⇒ Object
Returns the value of attribute scaffold_position_start.
-
#sequence ⇒ Object
The actual nucleotide sequence of this contig, from scaffold start position to end (not revcom).
Instance Method Summary collapse
Instance Attribute Details
#scaffold ⇒ Object
The Scaffold to which this contig once belonged
10 11 12 |
# File 'lib/assembly/scaffold_breaker.rb', line 10 def scaffold @scaffold end |
#scaffold_position_end ⇒ Object
Returns the value of attribute scaffold_position_end.
7 8 9 |
# File 'lib/assembly/scaffold_breaker.rb', line 7 def scaffold_position_end @scaffold_position_end end |
#scaffold_position_start ⇒ Object
Returns the value of attribute scaffold_position_start.
7 8 9 |
# File 'lib/assembly/scaffold_breaker.rb', line 7 def scaffold_position_start @scaffold_position_start end |
#sequence ⇒ Object
The actual nucleotide sequence of this contig, from scaffold start position to end (not revcom)
14 15 16 |
# File 'lib/assembly/scaffold_breaker.rb', line 14 def sequence @sequence end |
Instance Method Details
#length ⇒ Object
16 17 18 |
# File 'lib/assembly/scaffold_breaker.rb', line 16 def length @scaffold_position_end - @scaffold_position_start +1 end |
#name ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/assembly/scaffold_breaker.rb', line 20 def name contig_number = scaffold.contigs.find_index(self)+1 if contig_number.nil? raise "A contig finds itself unexpectedly not in the scaffold it is supposed to belong to" end return "#{scaffold.name}_#{contig_number}of#{scaffold.contigs.length}_#{scaffold_position_start}to#{scaffold_position_end}" end |