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
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_count ⇒ Object
114 115 116 |
# File 'lib/bio-vcf/vcfrecord.rb', line 114 def call_normal_count normal.bcount.to_ary[index()] end |
#call_nuc ⇒ Object
93 94 95 |
# File 'lib/bio-vcf/vcfrecord.rb', line 93 def call_nuc ['A','C','G','T'][index()] end |
#call_tumor_count ⇒ Object
106 107 108 |
# File 'lib/bio-vcf/vcfrecord.rb', line 106 def call_tumor_count tumor.bcount.to_ary[index()] end |
#call_tumor_relative_count ⇒ Object
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 |