Learn R Programming

epistasis (version 0.0.1-1)

epistasis: Detecting epistatic selection from multi-loci genotype data

Description

This is the main function of the epistasis package. Two methods are available to detect epistatic selection, including (1) approximation method, and (2) gibbs sampling within the Gaussian copula graphical model. Both methods are able to deal with missing genotypes.

Usage

epistasis(y, method = "approx", rho = NULL, n.rho = NULL, rho.ratio = NULL, ncores = NULL, em.iter = 10, em.tol = .001, verbose = TRUE)

Arguments

y
An ($n \times p$) matrix or a data.frame corresponding to the data matrix ($n$ is the sample size and $p$ is the number of variables). It also could be an object of class "episim". Input data can contain missing values.
method
Detecting epistatic selection with two methods: "gibbs" and "approx". The default method is "approx".
rho
A decreasing sequence of non-negative numbers that control the sparsity level. Leaving the input as rho = NULL, the program automatically computes a sequence of rho based on n.rho and rho.ratio. Users can also supply a decreasing sequence values to override this.
n.rho
The number of regularization parameters. The default value is 10.
rho.ratio
Determines distance between the elements of rho sequence. A small value of rho.ratio results in a large distance between the elements of rho sequence. And a large value of rho.ratio results into a small distance between elements of rho. The default value is 0.3.
ncores
The number of cores to use for the calculations. Using ncores = NULL automatically detects number of available cores and runs the computations in parallel on (available cores - 1).
em.tol
A criteria to stop the EM iterations. The default value is .001.
em.iter
The number of EM iterations. The default value is 10.
verbose
Providing a detail message for tracing output. The default value is TRUE.

Value

An object with S3 class "epi" is returned:

Details

Viability is the phenotype that is considered. This function detects the conditional dependent short- and long-range linkage disequilibrium structure of genomes and thus reveals aberrant marker-marker associations that are due to epistatic selection. This function can be used to estimate conditional independence relationships between partially observed data that not follow Gaussianity assumption (e.g. continuous non-Gaussian, discrete, or mixed dataset).

References

1. P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016. 2. D. Witten and J. Friedman. New insights and faster computations for the graphical lasso. Journal of Computational and Graphical Statistics, to appear, 2011. 3. J. Friedman, T. Hastie and R. Tibshirani. Sparse inverse covariance estimation with the lasso, Biostatistics, 2007. 4. Guo, Jian, et al. "Graphical models for ordinal data." Journal of Computational and Graphical Statistics 24.1 (2015): 183-204.

See Also

episelect

Examples

Run this code
## Not run: 
# #simulate data
# D <- episim(p=50, n=100, k= 3, adjacent = 3, alpha = 0.06 , beta = 0.06)
# plot(D)
# 
# #epistasis path estimation using approx
# out1 <-  epistasis(D$data, method="approx", n.rho= 5)
# plot(out1)
# 
# #epistasis path estimation using gibbs
# out2  <-  epistasis(D$data, method="gibbs", n.rho= 5, ncores= 1)
# plot(out2)
# ## End(Not run)

Run the code above in your browser using DataLab