Class: HTS::VCF::Variant
- Inherits:
-
Object
- Object
- HTS::VCF::Variant
- Defined in:
- lib/hts/vcf/variant.rb
Instance Method Summary collapse
-
#formats ⇒ Object
def inspect; end.
- #genotypes ⇒ Object
- #id ⇒ Object
-
#initialize(bcf_t, vcf) ⇒ Variant
constructor
A new instance of Variant.
- #pos ⇒ Object
- #qual ⇒ Object
- #ref ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(bcf_t, vcf) ⇒ Variant
Returns a new instance of Variant.
6 7 8 9 10 |
# File 'lib/hts/vcf/variant.rb', line 6 def initialize(bcf_t, vcf) @c = bcf_t FFI.bcf_unpack(@c, HTS::FFI::BCF_UN_ALL) # FIXME @vcf = vcf end |
Instance Method Details
#formats ⇒ Object
def inspect; end
14 |
# File 'lib/hts/vcf/variant.rb', line 14 def formats; end |
#genotypes ⇒ Object
16 |
# File 'lib/hts/vcf/variant.rb', line 16 def genotypes; end |
#id ⇒ Object
30 31 32 |
# File 'lib/hts/vcf/variant.rb', line 30 def id @c[:d][:id] end |
#pos ⇒ Object
18 19 20 |
# File 'lib/hts/vcf/variant.rb', line 18 def pos @c[:pos] + 1 # FIXME end |
#qual ⇒ Object
34 35 36 |
# File 'lib/hts/vcf/variant.rb', line 34 def qual @c[:qual] end |
#ref ⇒ Object
38 39 40 |
# File 'lib/hts/vcf/variant.rb', line 38 def ref @c[:d][:allele].get_pointer(0).read_string end |
#start ⇒ Object
22 23 24 |
# File 'lib/hts/vcf/variant.rb', line 22 def start @c[:pos] end |
#stop ⇒ Object
26 27 28 |
# File 'lib/hts/vcf/variant.rb', line 26 def stop @c[:pos] + @c[:rlen] end |