Question: Extracting Individual Allele Frequencies From A Vcf File
1
gravatar for Jitendra
6.9 years ago by
Jitendra50
India
Jitendra50 wrote:

Hi all, I have used SAMtools to identify SNPs within 3 separate individuals and have generated a VCF file. I am able to extract the depth for each individual but am struggling to get the allele frequency at each SNP for each individual. The VCF contains an overall alternative allele frequency but I would like this broken down per individual. If anybody knows if this is possible and how to do it I'd be grateful for any advice. Thanks!

vcf samtools snp • 10k views
ADD COMMENTlink written 6.9 years ago by Jitendra50
3

Just a couple quick questions to clarify: Does each individual have their own VCF file? Are you looking for the allele frequency for each SNP in the general population -- or in each individual? Generally the last columns in the VCF (the ones that start [1/1] or [0/1] etc) are the allele frequencies in the individual for that variant. Maybe to clarify even more you could post a couple lines from your VCF.

ADD REPLYlink written 6.9 years ago by Alex Paciorkowski3.3k

Using this command "vcftools --vcf aln.vcf --freq" I have got only 3 types of allele frequencies: 0, 0.5 and 1. Could somebody advice me how to get real frequencies at certain posiitions? Thanks a lot.

ADD REPLYlink written 6.5 years ago by Biomonika (Noolean)3.0k

Yes, you will get 3 frequencies only, either homozygous SNPs (0 and 1) and heterozygous SNPs (0.5 and 0.5)

ADD REPLYlink written 2.8 years ago by rse70
4
gravatar for Maxime Lamontagne
6.9 years ago by
Qu├ębec
Maxime Lamontagne2.1k wrote:

I think this should work. You need vcftools to do this.

The first command will isolate the genotype for Subject1:

.../tabix-0.2.3/vcftools_0.1.4a/perl/vcf-subset -c Subject1 genotypes.vcf > temp.vcf

The second one will transform the data in frequency:

.../tabix-0.2.3/vcftools_0.1.4a/cpp/vcftools --vcf temp.vcf --freq --out Subject1.SNP.allelefrequencies
ADD COMMENTlink written 6.9 years ago by Maxime Lamontagne2.1k
Please log in to add an answer.

Help
Access

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