informloci | R Documentation |
This function will facilitate in removing phylogenetically uninformative loci
from a genclone
or genind
object.
The user has the ability to define what uninformative means by setting a
cutoff value for either percentage of differentiating genotypes or minor
allele frequency.
informloci(pop, cutoff = 2/nInd(pop), MAF = 0.01, quiet = FALSE)
pop |
a |
cutoff |
|
MAF |
|
quiet |
|
This function will remove uninformative loci using a traditional MAF
cutoff (using isPoly
from adegenet) as well
as analyzing the number of observed genotypes in a locus. This is important
for clonal organisms that can have fixed heterozygous sites not detected by
MAF methods.
A genind
object with user-defined informative loci.
This will have a few side effects that affect certain analyses. First, the number of multilocus genotypes might be reduced due to the reduced number of markers (if you are only using a genind object). Second, if you plan on using this data for analysis of the index of association, be sure to use the standardized version (rbarD) that corrects for the number of observed loci.
Zhian N. Kamvar
# We will use a dummy data set to demonstrate how this detects uninformative
# loci using both MAF and a cutoff.
genos <- c("A/A", "A/B", "A/C", "B/B", "B/C", "C/C")
v <- sample(genos, 100, replace = TRUE)
w <- c(rep(genos[2], 99), genos[3]) # found by cutoff
x <- c(rep(genos[1], 98), genos[3], genos[2]) # found by MAF
y <- c(rep(genos[1], 99), genos[2]) # found by both
z <- sample(genos, 100, replace = TRUE)
dat <- df2genind(data.frame(v = v, w = w, x = x, y = y, z = z), sep = "/")
informloci(dat)
## Not run:
# Ignore MAF
informloci(dat, MAF = 0)
# Ignore cutoff
informloci(dat, cutoff = 0)
# Real data
data(H3N2)
informloci(H3N2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.