How to allele frequency for each variant in VCF file
I have a VCF file, and I need to calculate allele frequency for each variant by using code/script, I have the values for AN and AC within the file.
vcf
variant
genome
gene
perl
• 4,788 views
•
link
written
by
Nyksubuz •
0 answers
No answers yet.
Log in to answer this question.
More posts like this
-
How to Calulate Allele Frequency from a VCF File?
written by Emoji •I have a VCF file with 200 samples (mitochondrial genome of Plasmodium falciparum). Here is a pic to take a look at: ![enter image description …
-
How do I annotate 1000 genomes VCF with superpopulation minor allele frequency?
written by Isobel •Hi everyone, I am working with the 1000 Genomes VCFs from the New York Genome Center (30x on GRCh38). The VCF obviously provides overall and …
-
adding allele frequencies to a vcf
written by erl1977 •Hi all, I have a vcf file generated from a few hundred samples. For each variant within the file, I would like to calculate the …
-
Help Unerstanding Allele Count and Allele Frequency in VCF
written by arielI'm working in bioinformatics, but my computational skills far outstrip my knowledge of biology or genomics. So forgive the dumb question. According to the [VCF …
-
Calculating minor allele frequency for GnomAD VCF file
written by Jamie Watson •I have downloaded GnomAD vcf file and want to calculate the minor allele frequency of each variant in that file. But I am not quite …
-
VCF file analysis
written by Nyksubuz •I have a VCF file and have few queries to solves. Can someone help me to proceed with the same? The questions are as following: …
-
tools to calculate Exac population specific frequency
written by janHI, I have 500+ MAF files of exome sequencing. I want to get the allele frequency for all population in Exac. I have used awk …
-
Get alternate / total allele counts for 1000 Genomes super-populations
written by SeanI would like to get the alternate allele counts (AC) and the total allele counts (AN) for any variant in each of the five 1000 …
-
Allele frequencies for ALL of the variants in 1000Genomes: direct download?
written by lillo.sim •Hi, I am trying to find the minor allele frequency of all of the SNPs and INDELs from the 1000Genomes EUR reference. It was taking …
-
Summarising Whole Genome Allele Frequency Spectrum from VCF file
written by RubalHello Everyone, I have a VCF with multiple individuals from multiple populations and I would like to get a summary of the allele frequency spectrum …
What have you tried on your own? Why do you want to use perl?
Can you give us a list of tools you've looked at that can manipulate VCF files? You've been given this advice before - google as much as you can.
I don't want to use a tool, i want to write a script to do the same
Use a tool. Do not reinvent the wheel. If you insist on scripting it yourself, read the VCF documentation and figure out how to calculate AF from AC and AN.
it is possible to calculate allele frequency by dividing AC/AN, I just need help with writing the script to do the same
What exactly have you tried? Show us your script and where you need help specifically - we are not going to do your homework for you.
first of all its not a home work question, im learning variant analysis, idk why you are getting so offended
I apologize - questions need to be more specific and show that the asker has invested effort in trying to solve things themselves, which this post lacks. Add that and we're all open to helping you.
I did this much, it's pretty long, i need modify it or find any other way to calculate AF
You should replace your
awkwithbcftools query. That will make this simple.Of course, the above can be used to maybe generate a histogram of AF, not map anything back to any locus, because you're literally just calculating the AF, not storing it in any meaningful way.
ok, thank you, that helps a lot
I tried using grep and awk to extract the vaues from the columns, im stuck with the division of column by column
awkcan do division (see example below). Show us your script and an example where it fails.