This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can i get a common variants of three samples in a VCF file from a large number of samples?

Hi I'm studying about sequencing data analysis. I performed a series of analysis and i finally get multi-sample VCF file with 100 samples. Then i want to get common variants of three samples. so i conducted some method of select variants ,but i did not get the results, as i wanted. Is there any methods to know the common variants of three samples from a multi-samples? I will be happy if anybody suggest me idea regarding this. Thank you.

next-gen sequencing

1 answer

If I did understand right, you can use vcf-merge:

Merges two or more VCF files into one so that, for example, if two source files had one column each, on output will be printed a file with two column

you can use it where the input is the three files that you are interested in

vcf-merge A.vcf.gz B.vcf.gz C.vcf.gz | bgzip -c > out.vcf.gz

and you can the see what is common or unique between them

another why is to use vcf-isec:

Creates intersections and complements of two or more VCF files. Given multiple VCF files, it can output the list of positions which are shared by at least N files, at most N files, exactly N files, etc.

Log in to answer this question.