Class: HTS::VCF::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/hts/vcf/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ Header

Returns a new instance of Header.



8
9
10
# File 'lib/hts/vcf/header.rb', line 8

def initialize(h)
  @h = h
end

Instance Attribute Details

#hObject (readonly)

Returns the value of attribute h.



6
7
8
# File 'lib/hts/vcf/header.rb', line 6

def h
  @h
end

Instance Method Details

#seqsObject

FIXME: better name?



13
14
15
16
17
# File 'lib/hts/vcf/header.rb', line 13

def seqs
  Array.new(@h[:n_targets]) do |i|
    FFI.sam_hdr_tid2name(@h, i)
  end
end

#textObject



19
20
21
# File 'lib/hts/vcf/header.rb', line 19

def text
  FFI.sam_hdr_str(@h)
end