Hello, Emmanuel Paradis has recently updated the haplotype() function in pegas 0.13 to account for base ambiguities, gaps and Ns. Thank you Emmanuel!
The argument 'strict' simply considers or ignores all gaps and ambiguities, but does this also consider/ignore Ns? The 'trailingGapsAsN' simply treats leading and trailing gaps as Ns, ignoring internal gaps. This argument is set to TRUE by default. >From the above, it appears that 'strict' ignores Ns. If 'strict' is set to TRUE, does this mean that TRUE/FALSE assignment 'trailingGapsAsN' is ignored as well? The reason I ask is because I use haplotype() in one of my R packages to compute optimal sample sizes for genetic diversity assessment (HACSim). Currently in my package, R throws a warning to users if missing data or base ambiguities are present within DNA alignments. Given Emmanuel's changes, it seems the warning in my package will not be needed once I set 'strict = TRUE'. I am unsure however on how to properly set 'trailingGapsAsN' to ensure that gaps do not affect haplotype calculation if they are left in the alignment. Gaps, ambiguities and Ns will cause an overestimation of haplotypes, and therefore an inflation of standing genetic variation. Can someone weigh in on this? Thanks! Cheers, Jarrett [[alternative HTML version deleted]] _______________________________________________ R-sig-phylo mailing list - R-sig-phylo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-phylo Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/