How To Filter Vcf By Coverage?
2
0
Entering edit mode
10.1 years ago
newDNASeqer ▴ 760

I used GATK to make variant calling on an exome-seq data set that has 10 samples. I copied one line (for an SNP identified) from the VCF output as shown below. The genotype is indicated (for example 0/1 for heterozygous mutant). The reference and variant reads are shown immediately after the genotype 0/1 (for example).

My question is how do you filter the VCF by the coverage (ref reads + variant reads ?). What to do if some of the samples pass the filtration and other samples fail to pass?

0/1:2,10:12:28:256,0,28    0/1:13,18:31:99:427,0,315    0/1:6,9:15:99:246,0,155    0/1:8,8:16:99:176,0,187    0/0:8,0:8:24:0,24,259    0/1:5,6:11:99:144,0,136    0/1:5,5:10:99:103,0,110    0/1:4,6:10:99:161,0,103    0/0:10,0:10:30:0,30,277    0/1:16,7:23:99:192,0,529
vcf coverage • 8.8k views
ADD COMMENT
0
Entering edit mode

Hi Pierre, Could you please inform me how i can filter my multi-sample vcf file (250 samples) for only variants with at five homozygous REF and five homozygous ALT call using VCFFilterJS. Thank you !

ADD REPLY
0
Entering edit mode

this is a new question, please open this as a new question: https://www.biostars.org/p/new/post/

ADD REPLY
0
Entering edit mode

Could you please inform me how i can filter my multi-sample vcf (250 samples) file for only variants with at least five homozygous REF and five homozygous ALT call using VCFFilterJS.

ADD REPLY
0
Entering edit mode

again, I'll give you the answer, but please, askthis a different question ( https://www.biostars.org/p/new/post/ ) (it's not How To Filter Vcf By Coverage? ). Ask your question as a NEW question. So everybody can contribute and follow the new thread. Thanks.

ADD REPLY
1
Entering edit mode
10.1 years ago

You could use the parameter "--max-indv-meanDP" from vcftools.

--max-indv-meanDP <float> Calculate the mean coverage on a per-individual basis. Only individuals with coverage within the range specified by these options are included in subsequent analyses.

Source: http://manpages.ubuntu.com/manpages/trusty/man1/vcftools.1.html

ADD COMMENT
0
Entering edit mode

thanks, but I found the latest version of vcftools does not support --max-indv-meanDP http://vcftools.sourceforge.net/man_latest.html

ADD REPLY
1
Entering edit mode
10.1 years ago

I wrote a tool VCFFilterJS to filter a VCF file with a javascript program/expression.

See https://github.com/lindenb/jvarkit/wiki/VCFFilterJS and A: GATK multi-sample VCF VariantFiltration for an example.

ADD COMMENT

Login before adding your answer.

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