How to calculate MAF from vcf files ? (SNPVersity from maizeGDB)
1
0
Entering edit mode
7 months ago
Joséphine • 0

Hi!

I'm using curently SNPs datasets (.vcf) download from SNPVersity 2.0. I tried to calculate the MAF to select SNPs not to rare for a genotyping design. I'm using the package vcfR. Everything is fine except for maf(). It returns only NA.

maf(vcf, element = 2)
              nAllele NA Count Frequency
chr1_10071575      NA NA    NA        NA
chr1_10071587      NA NA    NA        NA
chr1_10071622      NA NA    NA        NA
chr1_10071633      NA NA    NA        NA
chr1_10071653      NA NA    NA        NA
chr1_10071822      NA NA    NA        NA
chr1_10071825      NA NA    NA        NA
chr1_10071826      NA NA    NA        NA
chr1_10071904      NA NA    NA        NA
chr1_10072180      NA NA    NA        NA
chr1_10072242      NA NA    NA        NA

Do you think it is because the dataset simply doesn't allows this or I made a mistake?

Thanks for your reply!

SNPs vcf MAF cfR • 550 views
ADD COMMENT
1
Entering edit mode
7 months ago

if the INFO/AF field is not already in the VCF:

bcftools +fill-tags in.bcf -Ob -o out.bcf -- -t AF
ADD COMMENT

Login before adding your answer.

Traffic: 4031 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6