Class: HTS::Bam::Pileup::BorrowedColumnView
- Inherits:
-
Object
- Object
- HTS::Bam::Pileup::BorrowedColumnView
- Includes:
- Enumerable
- Defined in:
- lib/hts/bam/pileup.rb
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Returns the value of attribute depth.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
-
#tid ⇒ Object
readonly
Returns the value of attribute tid.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize ⇒ BorrowedColumnView
constructor
A new instance of BorrowedColumnView.
- #reset(rows, tid, pos) ⇒ Object
Constructor Details
#initialize ⇒ BorrowedColumnView
Returns a new instance of BorrowedColumnView.
64 |
# File 'lib/hts/bam/pileup.rb', line 64 def initialize = @entry_view = BorrowedEntryView.new |
Instance Attribute Details
#depth ⇒ Object (readonly)
Returns the value of attribute depth.
62 63 64 |
# File 'lib/hts/bam/pileup.rb', line 62 def depth @depth end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
62 63 64 |
# File 'lib/hts/bam/pileup.rb', line 62 def pos @pos end |
#tid ⇒ Object (readonly)
Returns the value of attribute tid.
62 63 64 |
# File 'lib/hts/bam/pileup.rb', line 62 def tid @tid end |
Instance Method Details
#each ⇒ Object
74 75 76 77 78 79 |
# File 'lib/hts/bam/pileup.rb', line 74 def each return to_enum(__method__) unless block_given? @rows.each { |row| yield @entry_view.reset(row, @tid, @pos) } self end |
#reset(rows, tid, pos) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/hts/bam/pileup.rb', line 66 def reset(rows, tid, pos) @rows = rows @tid = tid @pos = pos @depth = rows.length self end |