{:toc}
$ MEANQUAL=$(awk '{ if ($1 !~ /#/) { total += $6; count++ } } END { print total/count }' sample.concordance.raw.vcf)
$ java -jar GenomeAnalysisTK.jar \
-R ref.fa \
-T VariantFiltration \
--filterExpression "QD < 20.0 || ReadPosRankSum < -8.0 || FS > 10.0 || QUAL < $MEANQUAL" --filterName LowQualFilter \
--missingValuesInExpressionsShouldEvaluateAsFailing \
--variant sample.concordance.raw.vcf \
--logging_level ERROR -o sample.concordance.flt.vcf \
-log ./log/sample.concordance.flt.vcf.log
$ grep -v "Filter" sample.concordance.flt.vcf > sample.concordance.flt.knowsites.vcf
关于SNP的过滤(1):如何使用vcftools进行SNP过滤
关于SNP的过滤(2):如何使用vcftools进行SNP过滤