perm_neighbor {rNeighborQTL} | R Documentation |
Permutation tests for neighbor effects with a QTL model
Description
A function to calculate a genome-wide LOD threshold using permutation tests for self or neighbor effects.
Usage
perm_neighbor(
genoprobs,
pheno,
smap,
scale,
addcovar = NULL,
addQTL = NULL,
intQTL = NULL,
grouping = rep(1, nrow(smap)),
response = c("quantitative", "binary"),
type = c("neighbor", "self", "int"),
times = 99,
p_val = 0.05,
n_core = 1L,
contrasts = NULL
)
Arguments
genoprobs |
Conditional genotype probabilities as taken from |
pheno |
A vector of individual phenotypes. |
smap |
A matrix showing a spatial map for individuals. The first and second column include spatial positions along an x-axis and y-axis, respectively. |
scale |
A numeric scalar indicating the maximum spatial distance between a focal individual and neighbors to define neighbor effects. |
addcovar |
An optional matrix including additional non-genetic covariates. It contains no. of individuals x no. of covariates. |
addQTL |
An optional vector containing marker names that are considered covariates. Namely, this option allows composite interval mapping (Jansen 1993). |
intQTL |
An option when using |
grouping |
An optional integer vector assigning each individual to a group. This argument can be used when |
response |
An optional argument to select trait types. The |
type |
Select |
times |
No. of permutation iterations. Default at 99 times |
p_val |
A vector indicating upper quantiles for permutation LOD scores |
n_core |
No. of cores for a parallel computation. This does not work for Windows OS. Default is a single-core computation. |
contrasts |
An optional vector composed of three TRUE/FALSE values, which represents the presence/absence of specific genotypes as c(TRUE/FALSE, TRUE/FALSE, TRUE/FALSE) = AA, AB, BB. If |
Value
LOD thresholds at given quantiles by p-val
Author(s)
Yasuhiro Sato (sato.yasuhiro.36c@kyoto-u.jp)
See Also
plot_nei
scan_neighbor
int_neighbor
Examples
set.seed(1234)
test_map <- qtl::sim.map(len=rep(20,5),n.mar=3,include.x=FALSE)
test_cross <- qtl::sim.cross(test_map,n.ind=50)
test_smap <- cbind(runif(50,1,100),runif(50,1,100))
test_genoprobs <- qtl::calc.genoprob(test_cross,step=2)
test_perm <- perm_neighbor(genoprobs=test_genoprobs,
pheno=test_cross$pheno$phenotype,
smap=test_smap,scale=20,
times=3, p_val=c(1.0,0.5)
)