Entering edit mode
8.3 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
I have exactly the same question about DP filter. Did you find some way to filter it?
$ bcftools view -i 'FORMAT/DP>10' input.vcf > output.vcf
Or do I misunderstood something? This command will createoutput.vcf
which contains only variants where the read depth for sample is greater 10.fin swimmer