Module: BioVcf::VcfRecordCall

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

Instance Method Summary collapse

Instance Method Details

#call_diffObject



78
79
80
# File 'lib/bio-vcf/vcfrecord.rb', line 78

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

#call_normal_countObject



103
104
105
# File 'lib/bio-vcf/vcfrecord.rb', line 103

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

#call_nucObject



82
83
84
# File 'lib/bio-vcf/vcfrecord.rb', line 82

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

#call_tumor_countObject



95
96
97
# File 'lib/bio-vcf/vcfrecord.rb', line 95

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

#call_tumor_relative_countObject



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

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



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

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

#indexObject



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

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