Module: BioVcf::VcfRecordCall

Included in:
VcfRecord
Defined in:
lib/bio-vcf/vcfrecord.rb

Instance Method Summary collapse

Instance Method Details

#call_diffObject



89
90
91
# File 'lib/bio-vcf/vcfrecord.rb', line 89

def call_diff
  Variant.diff(normal.bcount.to_ary,tumor.bcount.to_ary)
end

#call_normal_countObject



114
115
116
# File 'lib/bio-vcf/vcfrecord.rb', line 114

def call_normal_count
  normal.bcount.to_ary[index()]
end

#call_nucObject



93
94
95
# File 'lib/bio-vcf/vcfrecord.rb', line 93

def call_nuc
  ['A','C','G','T'][index()]
end

#call_tumor_countObject



106
107
108
# File 'lib/bio-vcf/vcfrecord.rb', line 106

def call_tumor_count
  tumor.bcount.to_ary[index()]
end

#call_tumor_relative_countObject



110
111
112
# File 'lib/bio-vcf/vcfrecord.rb', line 110

def call_tumor_relative_count
  Variant.relative_diff(normal.bcount.to_ary,tumor.bcount.to_ary)[index()]
end

#get_gt(index) ⇒ Object

Get the GT when 0 is REF and >0 is ALT



98
99
100
101
102
103
104
# File 'lib/bio-vcf/vcfrecord.rb', line 98

def get_gt(index)
  if index == 0
    ref()
  else
    alt[index-1]
  end
end

#indexObject



118
119
120
# File 'lib/bio-vcf/vcfrecord.rb', line 118

def index
  Variant.index(self.normal.bcount.to_ary,self.tumor.bcount.to_ary)
end