Class: HTS::Bcf::Header
- Inherits:
-
Object
- Object
- HTS::Bcf::Header
- Defined in:
- lib/hts/bcf/header.rb
Instance Method Summary collapse
- #get_version ⇒ Object
-
#initialize(hts_file) ⇒ Header
constructor
A new instance of Header.
- #sample_count ⇒ Object
- #sample_names ⇒ Object
- #struct ⇒ Object
- #to_ptr ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#get_version ⇒ Object
18 19 20 |
# File 'lib/hts/bcf/header.rb', line 18 def get_version LibHTS.bcf_hdr_get_version(@bcf_hdr) end |
#sample_count ⇒ Object
22 23 24 |
# File 'lib/hts/bcf/header.rb', line 22 def sample_count LibHTS.bcf_hdr_nsamples(@bcf_hdr) end |
#sample_names ⇒ Object
26 27 28 29 30 31 |
# File 'lib/hts/bcf/header.rb', line 26 def sample_names # bcf_hdr_id2name is macro function @bcf_hdr[:samples] .read_array_of_pointer(sample_count) .map(&:read_string) end |
#struct ⇒ Object
10 11 12 |
# File 'lib/hts/bcf/header.rb', line 10 def struct @bcf_hdr end |
#to_ptr ⇒ Object
14 15 16 |
# File 'lib/hts/bcf/header.rb', line 14 def to_ptr @bcf_hdr.to_ptr end |