Entering edit mode
6.4 years ago
michelle.zl.kee
•
0
Hi,
I have 3 vcf files from different samples and would like to get a file with an intersection of common SNPs found in all 3 samples.
I have used bcftools isec for 2 samples first, took the intersection (either 0002.vcf or 0003.vcf generated from this) and then did another bcftools isec with the 3rd sample. However, I realised that only the samples present only belonged to the last sample group.
Could anyone advise on a way where I could receive an intersection of common SNPs found in all 3 samples with all samples present in the file?
Thank you very much!
Are your VCF files single-sample files? Your phrasing makes it sound that way.
You could take the file that you got after your intersections and then use BEDtools intersect:
-wb will make BEDtools print the intersection and the entire entry of the vcf in which the isec was found. *.vcf are the three original VCF files. The cut should then print the output of -wb, so the entries from B that isec with -A.
EDIT: Not sure if -f11-, so check the output from which column on the B entries start.