This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filtering multisample VCF based on genotype using SnpSift filter

Hi all,

I have a VCF for 20 samples. Then I extracted three samples (sample 1,23 and 46) from it. My aim is to filter "0/1, 1/1, 1/2, etc" i.e. (NonRef) from the multisample VCF file. So I used the following script to do it.

$ java -Xmx12G -jar snpEff/SnpSift.jar filter "isVariant( GEN[ * ] ) | isHet( GEN[ * ] )" WES01.WES23.WES46.recal.PASS.filtered.snpEff.exonic.vcf > WES01.WES23.WES46.recal.PASS.NonRef.filtered.snpEff.exonic.vcf

Original input VCF file: enter image description here enter image description here enter image description here enter image description here

In the input VCF file, for position "10371", sample1's genotype is "0/0", sample2's genotype is "0/1" and sample3's genotype is "1/1". Which need to be present in the output VCF file. I used "GEN[ * ] for any matches in the sample genotype. But why didn't I get it in my output VCF?

I assume, the SnpSift.jar file just looked into the first sample's genotype, which is 0/0, so it didn't include in the output VCF.

Output VCF file: enter image description here

vcf snpsift genotype dnaseq snps

You may want to check out your images - they lead to 404s.

Nope, nothing still.

0 answers

No answers yet.

Log in to answer this question.