plr | R Documentation |
Fit pairwise allelic presence/absence data with Firth's penalised logistic regression without a control for bacterial population structure. Because this function is not the focus of GeneMates, it takes as inputs the outputs of the lmm or findPhysLink function. As a result, users must run either function before calling this one.
Dependency: parallel, logistf and data.table
plr(pat, tests.pat, tests.allele, n.cores = -1, p.adj.method = "bonferroni")
pat |
An uncentred matrix of patterns of the allelic presence/absence status Expect every cell of this matrix to be a dichotomous variable. |
tests.pat |
A data frame specifying pairs of patterns whose association will be tested for with the logistic regression. |
tests.allele |
A data frame recording pairs of alleles whose association have been tested for by the findPhysLink function. |
n.cores |
Number of cores used to run GEMMA in parallel where possible. -1: automatically detect the number of available cores N, but use N - 1 cores (recommended) 0: automatically detect the number of available cores and use all of them. Be careful when the current R session is not running through SLURM. >= 1: use the number of cores as specified. n.cores is reset to the maximum number of available cores N when n.cores > N. |
p.adj.method |
Method for correcting p-values. Refer to the base function p.adjust for legitimate values of this argument. |
Yu Wan (wanyuac@126.com)
assoc <- findPhysLink(...) lr <- plr(pat = assoc$alleles$B, tests.pat = assoc$lmms.pat$dif$h1[, c("y_pat", "x_pat")], tests.allele = assoc$tests$dif$tests, n.cores = 8, p.adj.method = "bonferroni")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.