Class: HTS::Bam::Pileup::PileupRecord
- Inherits:
-
Object
- Object
- HTS::Bam::Pileup::PileupRecord
- Defined in:
- lib/hts/bam/pileup.rb
Overview
A wrapper of one bam_pileup1_t entry
Defined Under Namespace
Classes: ReadView
Instance Method Summary collapse
- #del? ⇒ Boolean
- #head? ⇒ Boolean
- #indel ⇒ Object
-
#initialize(entry, header) ⇒ PileupRecord
constructor
A new instance of PileupRecord.
- #query_position ⇒ Object
-
#record ⇒ Object
Lightweight read-only view over the underlying bam1_t without taking ownership.
- #refskip? ⇒ Boolean
- #tail? ⇒ Boolean
Constructor Details
#initialize(entry, header) ⇒ PileupRecord
Returns a new instance of PileupRecord.
18 19 20 21 |
# File 'lib/hts/bam/pileup.rb', line 18 def initialize(entry, header) @entry = entry @header = header end |
Instance Method Details
#del? ⇒ Boolean
49 50 51 |
# File 'lib/hts/bam/pileup.rb', line 49 def del? @entry[:is_del] == 1 end |
#head? ⇒ Boolean
53 54 55 |
# File 'lib/hts/bam/pileup.rb', line 53 def head? @entry[:is_head] == 1 end |
#indel ⇒ Object
45 46 47 |
# File 'lib/hts/bam/pileup.rb', line 45 def indel @entry[:indel] end |
#query_position ⇒ Object
41 42 43 |
# File 'lib/hts/bam/pileup.rb', line 41 def query_position @entry[:qpos] end |
#record ⇒ Object
Lightweight read-only view over the underlying bam1_t without taking ownership.
24 25 26 |
# File 'lib/hts/bam/pileup.rb', line 24 def record @record_view ||= ReadView.new(@entry[:b]) end |
#refskip? ⇒ Boolean
61 62 63 |
# File 'lib/hts/bam/pileup.rb', line 61 def refskip? @entry[:is_refskip] == 1 end |
#tail? ⇒ Boolean
57 58 59 |
# File 'lib/hts/bam/pileup.rb', line 57 def tail? @entry[:is_tail] == 1 end |