calc_prop_poly | R Documentation |
Calculates the proportion of polymorphic (genotyped) loci for any combination
of SNP and sample facets. Note: per window counts of polymorphic loci can be
calculated using calc_tajimas_d
.
calc_prop_poly(x, facets = NULL)
x |
snpRdata object |
facets |
facets over which to check for polymorphic loci. Can be any
combination of SNP/sample facets.
See |
Note that per window counts of polymorphic loci can be calculated using
calc_tajimas_d
(contained in the num_seg
column).
Dividing this by the n_snps
column will return the proportion of
polymorphic loci in each window if that is desired!
A snpRdata object with prop_poly merged into the weighted.means slot.
William Hemstrom
# base facet
x <- calc_prop_poly(stickSNPs)
get.snpR.stats(x, stats = "prop_poly")$weighted.means
# multiple facets
x <- calc_prop_poly(stickSNPs, c("pop", "fam", "pop.fam",
"pop.fam.chr", "chr"))
get.snpR.stats(x, c("pop", "fam", "pop.fam", "pop.fam.chr", "chr"),
stats = "prop_poly")$weighted.means
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.