Question: Extracting heterozygous genotype from vcf file and compare 2 files
gravatar for priya
20 months ago by
priya0 wrote:

Hi all,

I have a vcf file and would like to extract certain chromosomes, say chr16 and only GT = 1/1. I tried using grep and it worked fine. However when I try to use these vcf files created by using grep, to compare the SNPs between 2 such files using vcftools, it shows me an error in the file format, which makes me think grep is not being able to keep the same format of vcf. Could anybody suggest the best possible way to do that?

My end goal is to compare 2 vcf files (from different samples but same chromosome 16) and find an intersection of SNPs between the files containing 1/1 genotype from say chr16.

Best, Priya

genotype snps vcf • 653 views
ADD COMMENTlink modified 20 months ago by Dan Gaston6.9k • written 20 months ago by priya0
gravatar for Dan Gaston
20 months ago by
Dan Gaston6.9k
Dan Gaston6.9k wrote:

You should use one of the many different tool sets out there that have been developed for working with VCF files and doing filtering on them. A variety to check out would be:

VCFTools BCFTools SNPSift

ADD COMMENTlink written 20 months ago by Dan Gaston6.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1760 users visited in the last hour