Entering edit mode
3.3 years ago
sumudu_rangika
▴
50
Hi All,
I need to filter my variants based on the following criteria.
1) Include SNP sites with at least one heterozygous with allele balance(AB) > 0.15 or at least one homozygous variant
2) Include INDEL sites with at least one heterozygous with allele balance(AB) > 0.20 or at least one homozygous variant
This is the bcftools command I am trying to use. Allele Balance was taken as: No of reads with Alt allele/Total no of reads
bcftools view --threads 10 -i '(TYPE="SNP" && N_PASS(GT="het" & FMT/AD[*:1]/(FMT/AD[*:0]+FMT/AD[*:1])>=0.15) >= 1) || (TYPE="SNP" && COUNT(GT="AA") >= 1) || (TYPE="INDEL" && N_PASS(GT="het" & FMT/AD[*:1]/(FMT/AD[*:0]+FMT/AD[*:1])>=0.20) >= 1) || (TYPE="INDEL" && COUNT(GT="AA") >= 1)' -Oz -o $in/fil1/input.vcf.gz
Just want to confirm what I am doing is correct. Appreciate your feedback.
Thank you Best, Sumudu
I am wondering why we set AB>0.15 without AB<0.85?? Thanks