GATK DP filter for multiple samples
0
0
Entering edit mode
7.7 years ago
sun.nation ▴ 140

I used GATK to call SNPs and filter based on DP < 10. I did get SNPs but having problems to get filtered SNPs.

Command to filter SNPs:

$java -jar $gatk \
   -T VariantFiltration \
   -R Corca1_AssemblyScaffolds.fa \
   -o snpsDPlt10.vcf \
   --variant snps.vcf \
   --genotypeFilterExpression "DP < 10" \
   --genotypeFilterName "DP-lt10" \
   --setFilteredGtToNocall

$java -jar $gatk \
   -T SelectVariants \
   -R Corca1_AssemblyScaffolds.fa \
   -V snpsDPlt10.vcf  \
   -o snpsDPlt10-noCall.vcf \
   --setFilteredGtToNocall

$java -jar $gatk \
   -T SelectVariants \
   -R Corca1_AssemblyScaffolds.fa \
   -V snpsDPlt10-noCall.vcf  \
   -o snpsDPlt10-final-lt10DP.vcf \
   --excludeNonVariants

Final VCF file has annotated SNPs, how can I get SNPs with DP>10:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  cotton3.fastq_1.paired.trimmed  cotton4.fastq_1.paired.trimmed
scaffold_1      67871   .       G       A       485.77  PASS    AC=1;AF=1.00;AN=1;DP=13;Dels=0.00;FS=0.000;HaplotypeScore=0.0000;MLEAC=2;MLEAF=1.00;MQ=
60.00;MQ0=0;QD=32.77;SOR=1.609  GT:AD:DP:FT:GQ:PL       ./.:0,3:3:DP-lt10:99:118,0      1:0,10:10:PASS:99:396,0
scaffold_1      67878   .       T       A       485.77  PASS    AC=1;AF=1.00;AN=1;DP=13;Dels=0.00;FS=0.000;HaplotypeScore=0.0000;MLEAC=2;MLEAF=1.00;MQ=
60.00;MQ0=0;QD=30.77;SOR=1.609  GT:AD:DP:FT:GQ:PL       ./.:0,3:3:DP-lt10:99:122,0      1:0,10:10:PASS:99:392,0
gatk snps • 3.7k views
ADD COMMENT
0
Entering edit mode

I have exactly the same question about DP filter. Did you find some way to filter it?

ADD REPLY
0
Entering edit mode

$ bcftools view -i 'FORMAT/DP>10' input.vcf > output.vcf Or do I misunderstood something? This command will create output.vcf which contains only variants where the read depth for sample is greater 10.

fin swimmer

ADD REPLY

Login before adding your answer.

Traffic: 2966 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6