Module: BioVcf::VcfRecordCall
- Included in:
- VcfRecord
- Defined in:
- lib/bio-vcf/vcfrecord.rb
Instance Method Summary collapse
- #call_diff ⇒ Object
- #call_normal_count ⇒ Object
- #call_nuc ⇒ Object
- #call_tumor_count ⇒ Object
- #call_tumor_relative_count ⇒ Object
-
#get_gt(index) ⇒ Object
Get the GT when 0 is REF and >0 is ALT.
- #index ⇒ Object
Instance Method Details
#call_diff ⇒ Object
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_count ⇒ Object
103 104 105 |
# File 'lib/bio-vcf/vcfrecord.rb', line 103 def call_normal_count normal.bcount.to_ary[index()] end |
#call_nuc ⇒ Object
82 83 84 |
# File 'lib/bio-vcf/vcfrecord.rb', line 82 def call_nuc ['A','C','G','T'][index()] end |
#call_tumor_count ⇒ Object
95 96 97 |
# File 'lib/bio-vcf/vcfrecord.rb', line 95 def call_tumor_count tumor.bcount.to_ary[index()] end |
#call_tumor_relative_count ⇒ Object
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 |