2
$\begingroup$

I have exome data 32 patients. My aim is to identify unique somatic mutations in each patients. For this I have completed my pipeline for Whole Exome Data analysis using various tools like BWA mem, picard, gatk etc. Now I have VCF and gVCF file of each patient.

For Variant Quality Score recalibration (VQSR), as per the doccumentation, we should have at least 30 patient data for good recalibration. So in order to perform VQSR, I combined gVCF of all 32 patients using genotypeGVCFs tool of gatk and done with VQSR. But now I have cohort of all patient data (a large combined vcf file).

I don't know how variant sub-class tool or other extraction tool work to extract all of the unique and related features to each patient. I know how to get significant mutations using mutect but here it is combined file but I want to get it for each one individually.

How can I get a vcf file for each patient (without missing a single variant associated to that patient) ?

$\endgroup$
4
$\begingroup$

If what you want is to split the main VCF file into 1 file per sample, you could use bcftools query and view commands.

A similar question was asked on biostars, adapting Jorge Amigo's solution to your situation, you might use:

for sample in $(bcftools query -l $combined_vcf)
do
    bcftools view -c1 -Ov -s $sample -o ${$sample.vcf} $file
done
$\endgroup$
1
  • $\begingroup$ Thanks for the nice solution. Is there any similar way to combine two vcf file for one subject (one vcf file is having SNP+Indel obtained from GATK HaplotypeCaller, GenotypeGVCF and another vcf file is having SVs from GenomeStrip). I'll definitely try this way as many researchers have suggested in Biostar also. Thanks. $\endgroup$ Apr 16 '18 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.