Filter raw.vcf (post GenotypeGVCF) with the PASS variants (post VQSR)

manolismanolis Member ✭✭
edited October 2018 in Ask the GATK team

GATK 4.0.10.0; 105 WES

Hi,

after VQSR steps I went to exctract the PASS variants from the raw VCF (post GenotypeGVCF)

#Raw vcf after GenotypeGVCF: raw.vcf
grep -v "^#" raw.vcf | wc -l #994879 variants

#Output file from the VQSR steps: vqsr.vcf
grep -v "^#" vqsr.vcf | wc -l #994879 variants

#Get only the "PASS" variants from the vqsr.vcf
${GATK4} SelectVariants -R ${GENOME} -V vqsr.vcf -O passVQSR.vcf -select "vc.getFilters().size() == 0" #904406 variants

#Get genome coordinates of the PASS variants
grep -v "^#" passVQSR.vcf | awk '{print $1":"$2"-"$2}' > passVQSRcoord.list #904406 sites

#Extract from the raw vcf only the PASS variants in the VQSR step
${GATK4} SelectVariants -R ${GENOME} -V raw.vcf -O RAWpassVQSR.vcf -L passVQSRcoord.list #904504 variants

As you can see the number of the PASS variants after VQSR is 904406, while the number of the raw variants after filtering with the coordinates of the PASS VQSR variants is higher, 904504... they have to be the same, no?

Any advice is welcome!
Thanks

Tagged:

Issue · Github
by shlee

Issue Number
3163
State
closed
Last Updated
Assignee
Array
Closed By
sooheelee

Best Answers

Answers

Sign In or Register to comment.