Hi Luis,
Apologies for jumping in on another thread, but I am also having an issue with calculating individual observed heterozygosity (Ho) per individual: namely, that the function does not return standardized metrics even when the number of invariant sites are specified. However, the method works fine when calculating adjusted metrics at the population level. E.g.:
"gl.report.heterozygosity(x = rh10, n.invariant = ld.report[7, 2], method = "pop", nboots = 100, conf = 0.95, CI.type = "norm")" returns a data frame with 14 rows (the number of pops) x 37 columns (including Ho.adj, etc.)
"gl.report.heterozygosity(x = rh10, n.invariant = ld.report[7, 2], method = "ind", nboots = 100, conf = 0.95, CI.type = "norm")" returns:
Starting gl.report.heterozygosity
Processing genlight object with SNP data
Calculating observed heterozygosity for individuals
Note: No adjustment for invariant loci (n.invariant set to 0)
Starting gl.colors
Selected color type 2
Completed: gl.colors
and a data frame with 94 rows (the number of individuals) x 4 columns (
ind.name, Ho, f.hom.ref, f.hom.alt).
I've tried using both traditional dartR and the dartRverse packages, but have the same result. Is this a known issue, and/or is there a work-around? Happy to send the full code/data if needed.
Thanks,
Sean.