This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcflib-popstats to calculate FIS of a subpopulation

Dear Biostars

I used the vcflib-popstats to calculate FIS of a subpopulation but I have same FIS number for positions with the different number of hets (4th column). also, which formula did it use to the calculation Fis?

would you have any idea?

Thanks

 target_allele_frequency    expected_heterozygosity observed_heterozygosity number_of_hets  number_of_homozygous_ref    number_of_homozygous_alt    target_Fis
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   27  0   0   1.00E-05
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   29  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   30  0   0   1.00E-05
    0.5 0.5 1   25  0   0   1.00E-05
    0.5 0.5 1   19  0   0   1.00E-05
    0.5 0.5 1   28  0   0   1.00E-05
vcflib popstats

1 answer

Hi Sam,

The genotype object, stored in var.cpp, contains the methods to calculate various statistics. I used the equation below to calculate FIS, where nhet is the count of the heterozygous genotypes, and ngeno is the number of called genotypes, af, is the allele frequency.

  fis = ( 1 - ((nhet/ngeno) / (2*af*(1 - af))));

Log in to answer this question.