VCF with SNP- count number of 100% missing genotypes
4
0
Entering edit mode
6.4 years ago
misterie ▴ 110

Hey,

I am using a VCF Tools for SNPs filtering. I need to count (or extract) a variable which have 100% missing genotypes (I have multisample VCF).

In VCF I know a command --max.missing, but I can define only a max missing, without a min number.

It is important for me, because I have 1 big VCF with 8 breeds' SNP's, and I would like to get information, how many SNP's are exactly in each breeds.

Thank you in advance!

vcf SNP • 2.4k views
ADD COMMENT
0
Entering edit mode
6.4 years ago

genomic loci which have 100% missing coverage (or all reference calls) would not show up in a VCF anyway

ADD COMMENT
0
Entering edit mode
6.4 years ago

You can dump the list of SNPs which are less than 100% missing, and then --exclude that list.

ADD COMMENT
0
Entering edit mode

Which command allow me to exclude this 100% missing data?

ADD REPLY
0
Entering edit mode
6.4 years ago
misterie ▴ 110

Look up. I told I am extracting from multisample file each breed and it generate empty variable. In my VCF file I have many breeds. I am extracting just one, and this file contain a null variable, but other breed in the same position, SNP was detected.

ADD COMMENT
0
Entering edit mode
6.4 years ago

using vcffilterjdk: http://lindenb.github.io/jvarkit/VcfFilterJdk.html

 java -jar dist/vcffilterjdk.jar -e 'return !variant.getGenotypes().stream().anyMatch(G->G.isCalled());' in.vcf
ADD COMMENT
0
Entering edit mode

I can not use it on my server. I can not install new softs. Exist any other option, to get this 100% missing data, using any bash, vcftools, beagle or another?

ADD REPLY
0
Entering edit mode

I can not install new softs

you don't have to install it on the server, you can always install it just for you. (and in fact, it is installed where it's compiled... )

ADD REPLY
0
Entering edit mode

but it will be impossible to run this on my files, which are on the server. I can't download it, because its too big file :(

ADD REPLY
0
Entering edit mode
wget -O - "http://a.c.d/path/to/file.vcf.gz" | gunzip -c |  java -jar dist/vcffilterjdk.jar -e 'return !variant.getGenotypes().stream().anyMatch(G->G.isCalled());'
ADD REPLY

Login before adding your answer.

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