This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using THETA2 from CNVkit: what king of vcf do you need?

Hi,

I want to use the "export theta" functionality of CNVKit estimate the tumor purity based on THETA2 program.

Part of the input for THETA2 are files with SNP counts for the Tumor and Normal samples formatted like:

#Chrm   Pos     Ref_Allele      Mut_Allele
10      104427  74      1
10      111955  54      0
10      135656  0       94

To my best understanding these should be the germline variants in the Tumor and Normal samples, because they are used to estimate the biallelic fraction (BAF).

Based on the CNVkit manual cnvkit export theta accepts a vcf file:

cnvkit.py export theta Sample_T.cns reference.cnn -v Sample_Paired.vcf

However it is unclear what kind of VCF is it. If the germline mutations are important then the VCF output of programs such as MuTect2 are not appropriate, because they are geared towards somatic mutations and discard of the germline mutations. Should I use the output of HaplotypeCaller? But then how is the Sample_Paired.vcf organised? And furthermore, should I filter the VCF to include only PASS mutations?

Am I missing out on something?

Thank you,

Gil

cnvkit theta2 tumor purity

1 answer

CNVkit's VCF processing works best with GATK HaplotypeCaller or FreeBayes on the tumor-normal pair, with both samples shown and somatic variant records marked with SOMATIC in the INFO column.

Thank you Eric and sridhar56, If possible, can you provide a small VCF that follows the proper specs as an example? It would things much clearer.

Gil

Just as a reference, here is the GATK command I used to extract high-quality heterozygous SNP from HaplotypeCaller output:

java -jar GenomeAnalysisTK.jar \
-R reference.fasta \
-T SelectVariants \
-V haplotype_caller.vcf \
-o het.vcf \
--excludeFiltered \
--selectTypeToInclude SNP \
--restrictAllelesTo BIALLELIC \
-select '(vc.getGenotype("normal_name").isHet())&&(vc.getGenotype("normal_name").getAD().1>={params.min_normal_ALT})&&(vc.getGenotype("tumor_name").getDP()>{params.min_tumor_DP})'

Yes, this is similar to what CNVkit does internally when you give it a VCF.

Does this command line:

cnvkit.py export theta Sample_T.cns reference.cnn -v Sample_Paired.vcf

currently support the VCF outputs from Mutect2 now? A unfiltered output VCF file from Mutect2 should also contain germline variants (as indicated by "germlink_risk" in the FILTER column.

May be I'm wrong?

You'd think so, but Mutect also tends to filter the germline variants even when you tell it not to, leaving relatively few SNPs that CNVkit can use for the BAF calculation. It's better to use HaplotypeCaller to get comprehensive germline SNP calls.

Log in to answer this question.