Filtering with vcftools by QUAL, Does not produce an output file
2
1
Entering edit mode
6 weeks ago
Michal Nevo ▴ 70

Hello, I want to filter my VCF file by QUAL >10 . AND GET AN OUTPUT VCF FILE so I could continue with my pipeline

When I try to use this command there are no errors but no result either:

vcftools --vcf $VCF_IN --minQ $10 --recode-INFO-all > $VCF_OUT

And when I use bcftools query it outputs only the records..but it is not an vcf file..

bcftools query -i 'QUAL>10' -f '%CHROM\t%POS\t%REF\t%ALT\t%QUAL\t%FILTER\t%INFO\t%FORMAT\n' $VCF_IN --output $VCF_OUT

VCF_OUT:

NC_048323.1     461     G       T       28.1057 . AB=0;ABP=0;AC=4;AF=1;AN=4;AO=2;CIGAR=1X;DP=2;DPB=2;DPRA=0;EPP=3.0103;EPPR=0;GTI=0;LEN=1;MEANALT=1;MQM=29;MQMR=0;NS=1;NUMALT=1;ODDS=5.46822;PAIRED=1;PAIREDR=0;PAO=0;PQA=0;PQR=0;PRO=0;QA=51;QR=0;RO=0;RPL=0;RPP=7.35324;RPPR=0;RPR=2;RUN=1;SAF=1;SAP=3.0103;SAR=1;SRF=0;SRP=0;SRR=0;TYPE=snp        GT:DP:AD:RO:QR:AO:QA    1/1/1/1:2:0,2:0:0:2:51 
Filter vcftools QUAL • 243 views
ADD COMMENT
3
Entering edit mode
6 weeks ago
4galaxy77 ★ 1.2k

bcftools query doesn't output a vcf, it outputs a formatted string. If you want to filter the vcf, just do bcftools view -i 'QUAL>10' $VCF_IN --output $VCF_OUT.

And vcftools is deprecated, use bcftools instead.

ADD COMMENT
0
Entering edit mode

Thank you! it is working:)

ADD REPLY
0
Entering edit mode
5 weeks ago
Michal Nevo ▴ 70

What is the standard QUAL filtering? 10/15/20/30?

ADD COMMENT

Login before adding your answer.

Traffic: 2386 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