epistasis: Detecting epistatic selection from multi-loci genotype data

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/epistasis.R

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

1
2
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.

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).

Value

An object with S3 class "epi" is returned:

Theta

A list of estimated p by p precision matrices corresponding to rho.

path

A list of estimated p by p adjacency matrices. This is the graph path corresponding to rho.

Sigma

A list of estimated p by p covariance matrices corresponding to rho.

ES

A list of estimated p by p conditional expectation corresponding to rho.

Z

A list of n by p transformed data based on Gaussian copula.

rho

A n.rho dimensional vector containing the penalty terms.

loglik

A n.rho dimensional vector containing the maximized log-likelihood values along the graph path.

data

The n by p input data matrix.

Note

This function estimates the graph path . To select an optimal graph please refer to episelect.

Author(s)

Pariya Behrouzi and Ernst C. Wit
Maintainers: Pariya Behrouzi pariya.behrouzi@gmail.com

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

epistasis documentation built on May 2, 2019, 5:09 a.m.