| Title: | Detecting Epistatic Selection with Partially Observed Genotype Data |
|---|---|
| Description: | An efficient multi-core package to reconstruct an underlying network of genomic signatures of high-dimensional epistatic selection from partially observed genotype data. The phenotype that we consider is viability. The network captures 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. We target on high-dimensional genotype data where number of variables (markers) is larger than number of sample sizes (p >> n). The computations is memory-optimized using the sparse matrix output. Compatibility updates by Renova. |
| Authors: | Pariya Behrouzi [aut, cre], Danny Arends [aut], Ernst C. Wit [aut] |
| Maintainer: | Pariya Behrouzi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.0.1.1.9001 |
| Built: | 2026-11-13 17:47:40 UTC |
| Source: | https://github.com/renova-r/epistasis |
A package for reconstructing an underlying network of genomic signatures of high-dimensional epistatic selection from multi-locus genotype data. The package is implemented the recent improvement in the analysis of high-dimensional partially observed genotype data Behrouzi and Wit (2016). The network captures the conditionally dependent short- and long-range linkage disequilibrium structure of a genomes and reveals aberrant marker-marker associations that are due to epistatic selection rather than gametic linkage.
Pariya Behrouzi, Danny Arends, and Ernst C. Wit
Maintainers: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
The genotype data for family B73 x ki11 Recombinant Inbred Line (RIL) from NAM population.
data(B73Ki11)data(B73Ki11)
The format is a list containing two matrices. 1. the data matrix with 1106 single-nucleotide polymorphism (SNP) markers for 191 individuals. 2. Information about the SNP markers regarding their location in the genome.
The Nested Association Mapping (NAM) initiative in maize populations is designed to reveal the genetic structure of underlying complex traits in maize. As part of this study, an inbred Ki11 maize line was crossed with the B73 reference line. This genotype data contains 1106 markers genotyped for 193 individuals. The B73 x Ki11 RIL is a diploid population with three possible genotypes, k = 3. This data set can be used to detect epistatic selection, short- and long- range linkage disequilibrium between 1106 SNP markers.
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
It is publicly available at http://datacommons.cyverse.org/browse/iplant/home/shared/panzea/genotypes
1. P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
2. McMullen, M. D., S. Kresovich, H. S. Villeda, P. Bradbury, H. Li, Q. Sun, S. Flint-Garcia, J. Thornsberry, C. Acharya, C. Bottoms, et al. (2009). Genetic properties of the maize nested association mapping population. Science 325 (5941), 737-740.
3. Rodgers-Melnick, E., P. J. Bradbury, R. J. Elshire, J. C. Glaubitz, C. B. Acharya, S. E. Mitchell, C. Li, Y. Li, and E. S. Buckler (2015). Recombination in diverse maize is stable, predictable, and associated with genetic load. Proceedings of the National Academy of Sciences 112 (12), 3823-3828.
data(B73Ki11) image(B73Ki11$data, ylab="Markers" , xlab= "Individuals") B73Ki11$infodata(B73Ki11) image(B73Ki11$data, ylab="Markers" , xlab= "Individuals") B73Ki11$info
Calculates cut-points of ordinal variables with respect to the Gaussian copula.
cutoffs(y)cutoffs(y)
y |
An ( |
The relationship between th variable and th latent variable is expressed through this set of cut-points.
cutoffs |
A |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi <[email protected]>
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
lower.upper and epistasis-package.
## Not run: D <- episim(p = 100, n = 50, k = 3) cutoffs(D$data) ## End(Not run)## Not run: D <- episim(p = 100, n = 50, k = 3) cutoffs(D$data) ## End(Not run)
The genotype data of the Cvi-0 x Col-0 Recombinant Inbred Line (RIL) population.
data(CviCol)data(CviCol)
The format is a matrix containing 90 single-nucleotide polymorphism (SNP) markers for 367 individuals.
The Arabidopsis thaliana genotype data is derived from a RIL cross between Columbia-0 (Col-0) and the Cape Verde Island (Cvi-0), where 367 individuals were genotyped for 90 genetic markers. This is a diploid population with three possible genotpe states (k = 3), where the genotypes coded as {0, 1, 2}, where 0 and 2 represent the homozygous genotypes and 1 defines the heterozygous genotype.
This data set can be used to detect epistatic selection, short- and long- range linkage disequilibrium between 90 SNP markers.
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
It is publicly available at http://publiclines.versailles.inra.fr/page/8
1. P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
2. Simon, M., et al. "QTL mapping in five new large RIL populations of Arabidopsis thaliana genotyped with consensus SNP markers." Genetics 178 (2008): 2253-2264.
## Not run: data(CviCol) # Graph path epi <- epistasis(CviCol, method="approx", rho.ratio=0.2) epi plot(epi) sel <- episelect(epi) plot(sel) ## End(Not run)## Not run: data(CviCol) # Graph path epi <- epistasis(CviCol, method="approx", rho.ratio=0.2) epi plot(epi) sel <- episelect(epi) plot(sel) ## End(Not run)
Estimate the optimal regularization parameter at EM convergence based on different information criteria .
episelect(epi.object, criteria = NULL, ebic.gamma = 0.5, loglik_Y = FALSE, ncores = NULL)episelect(epi.object, criteria = NULL, ebic.gamma = 0.5, loglik_Y = FALSE, ncores = NULL)
epi.object |
An object with S3 class "epi" |
criteria |
Model selection criteria. "ebic" and "aic" are available. BIC model selection can be calculated by fixing |
ebic.gamma |
The tuning parameter for ebic. The |
loglik_Y |
Model selection based on either log-likelihood of observed data ( |
ncores |
The number of cores to use for the calculations. Using |
This function computes extended Bayesian information criteria (ebic), Bayesian information criteria, Akaike information criterion (aic) at EM convergence based on observed or joint log-likelihood. The observed log-likelihood can be obtained through
Where can be calculated from epistasis function and H function is
The "ebic" and "aic" model selection criteria can be obtained as follow
where refers to the number of non-zeros offdiagonal elements of , and . Typical value for for ebic.gamma is 1/2, but it can also be tuned by experience. Fixing ebic.gamma = 0 results in bic model selection.
An object with S3 class "episelect" is returned:
opt.path |
The optimal graph selected from the graph path |
opt.theta |
The optimal precision matrix from the graph path |
opt.Sigma |
The optimal covariance matrix from the graph path |
ebic.scores |
Extended BIC scores for regularization parameter selection at the EM convergence. |
opt.index |
The index of optimal regularization parameter. |
opt.rho |
The selected regularization parameter. |
and anything else that is included in the input epi.object.
Pariya Behrouzi and Ernst C.Wit
Maintainer: Pariya Behrouzi [email protected]
1. P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
2. Ibrahim, Joseph G., Hongtu Zhu, and Niansheng Tang. "Model selection criteria for missing-data problems using the EM algorithm." Journal of the American Statistical Association (2012).
3. D. Witten and J. Friedman. New insights and faster computations for the graphical lasso. Journal of Computational and Graphical Statistics, to appear, 2011.
4. J. Friedman, T. Hastie and R. Tibshirani. Sparse inverse covariance estimation with the lasso, Biostatistics, 2007.
5. Foygel, R. and M. Drton (2010). Extended bayesian information criteria for Gaussian graphical models. In Advances in Neural Information Processing Systems, pp. 604-612.
## Not run: #simulate data D <- episim(p=50, n=100, k= 3, adjacent = 3, alpha = 0.06 , beta = 0.06) plot(D) #detect epistatic selection path out <- epistasis(D$data, method="gibbs", n.rho= 5, ncores= 1) #different graph selection methods sel.ebic1 <- episelect(out, criteria="ebic") plot(sel.ebic1) sel.ebic2 <- episelect(out, criteria="ebic", loglik_Y=TRUE) plot(sel.ebic2) sel.aic <- episelect(out, criteria="aic") plot(sel.aic) sel.bic <- episelect(out, criteria="ebic", ebic.gamma = 0) plot(sel.bic) ## End(Not run)## Not run: #simulate data D <- episim(p=50, n=100, k= 3, adjacent = 3, alpha = 0.06 , beta = 0.06) plot(D) #detect epistatic selection path out <- epistasis(D$data, method="gibbs", n.rho= 5, ncores= 1) #different graph selection methods sel.ebic1 <- episelect(out, criteria="ebic") plot(sel.ebic1) sel.ebic2 <- episelect(out, criteria="ebic", loglik_Y=TRUE) plot(sel.ebic2) sel.aic <- episelect(out, criteria="aic") plot(sel.aic) sel.bic <- episelect(out, criteria="ebic", ebic.gamma = 0) plot(sel.bic) ## End(Not run)
Generating discrete ordinal data based on underlying "genome-like" graph structure. The procedure of simulating data relies on a continues variable, which can be simulated from either multivariate normal distribution, or multivariate t-distribution with d degrees of freedom.
episim ( p = 90, n = 200, k = NULL, g = NULL, adjacent = NULL, alpha = NULL , beta = NULL, con.dist = "Mnorm", d = NULL, vis = FALSE)episim ( p = 90, n = 200, k = NULL, g = NULL, adjacent = NULL, alpha = NULL , beta = NULL, con.dist = "Mnorm", d = NULL, vis = FALSE)
p |
The number of variables. The default value is 90. |
n |
The number of sample size (observations). The default value is 200. |
k |
The number of states (categories). The default value is 3. |
g |
The number of groups (chromosomes) in the graph. The default value is about |
adjacent |
The number of adjacent variable(s) to be linked to a variable. For example, if |
alpha |
A probability that a pair of non-adjacent variables in the same group is given an edge. The default value is 0.01. |
beta |
A probability that variables in different groups are linked with an edge. The default value is 0.02. |
con.dist |
The distribution of underlying continuous variable. If |
d |
The degrees of freedom of the continuous variable, only applicable when
|
vis |
Visualize the graph pattern and the adjacency matrix of the true graph structure. The default value is FALSE. |
The graph pattern is generated as below:
"genome-like": The p variables are evenly partitions variables into g disjoint groups; the adjacent variables within each group are linked via an edge. With a probability alpha a pair of non-adjacent variables in the same group is given an edge. Variables in different groups are linked with an edge with a probability of beta.
An object with S3 class "episim" is returned:
data |
The generated data as an |
Theta |
A |
adj |
A |
Sigma |
A |
n.groups |
The number of groups. |
groups |
A vector that indicates each variable belongs to which group. |
sparsity |
The sparsity levels of the true graph. |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi <[email protected]>
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
epistasis, and epistasis-package
## Not run: #genome-like graph structure sim1 <- episim(alpha = 0.01, beta = 0.02) plot(sim1) #genome-like graph structure with more edges between variables in a same or different groups sim2 <- episim(adjacent = 3, alpha = 0.02 , beta = 0.03) plot(sim2) ## End(Not run)## Not run: #genome-like graph structure sim1 <- episim(alpha = 0.01, beta = 0.02) plot(sim1) #genome-like graph structure with more edges between variables in a same or different groups sim2 <- episim(adjacent = 3, alpha = 0.02 , beta = 0.03) plot(sim2) ## End(Not run)
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.
epistasis(y, method = "approx", rho = NULL, n.rho = NULL, rho.ratio = NULL, ncores = NULL, em.iter = 10, em.tol = .001, verbose = TRUE)epistasis(y, method = "approx", rho = NULL, n.rho = NULL, rho.ratio = NULL, ncores = NULL, em.iter = 10, em.tol = .001, verbose = TRUE)
y |
An ( |
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 |
n.rho |
The number of regularization parameters. The default value is |
rho.ratio |
Determines distance between the elements of |
ncores |
The number of cores to use for the calculations. Using |
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 |
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).
An object with S3 class "epi" is returned:
Theta |
A list of estimated p by p precision matrices corresponding to |
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 |
ES |
A list of estimated p by p conditional expectation corresponding to |
Z |
A list of n by p transformed data based on Gaussian copula. |
rho |
A |
loglik |
A |
data |
The |
This function estimates the graph path . To select an optimal graph please refer to episelect.
Pariya Behrouzi and Ernst C. Wit
Maintainers: Pariya Behrouzi [email protected]
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.
## 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)## 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)
Calculates lower and upper bands for each data point, using a set of cut-points which is obtained from the Gaussian copula.
lower.upper(y)lower.upper(y)
y |
An ( |
lower |
A |
upper |
A |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi <[email protected]>
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
cutoffs and epistasis-package.
## Not run: D <- episim(p = 100, n = 50, k = 3) lower.upper(D$data) ## End(Not run)## Not run: D <- episim(p = 100, n = 50, k = 3) lower.upper(D$data) ## End(Not run)
Plot the graph path which is the output of two functions epistasis.
## S3 method for class 'epi' plot( x, n.markers=NULL , ... )## S3 method for class 'epi' plot( x, n.markers=NULL , ... )
x |
An object from "epi" class. |
n.markers |
A vector containing number of variables/markers in each group/chromosome. For example, the CviCol dataset that is provided in the package contains 5 chromosomes/ groups which the total number of markers is |
... |
System reserved (No specific usage) |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
Plot the optimal graph by model selection
## S3 method for class 'episelect' plot(x, n.markers = NULL, vertex.size=NULL, vertex.label = FALSE, ...)## S3 method for class 'episelect' plot(x, n.markers = NULL, vertex.size=NULL, vertex.label = FALSE, ...)
x |
An object with S3 class "episelect" |
n.markers |
A vector containing number of variables/markers in each group/chromosome. For example, the CviCol dataset that is provided in the package contains 5 chromosomes/ groups which the total number of markers is |
vertex.size |
The size of vertices in the graph visualization. The default value is 7. |
vertex.label |
Assign names to the vertices. Default is FALSE. |
... |
System reserved (No specific usage) |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
S3 class "episim" Visualizes the pattern of the true graph, the adjacency matrix, precison matrix and the covariance matrix of the simulated data.
## S3 method for class 'episim' plot(x, layout = layout.fruchterman.reingold, ...)## S3 method for class 'episim' plot(x, layout = layout.fruchterman.reingold, ...)
x |
An object of |
layout |
The default is |
... |
System reserved (No specific usage) |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
## Not run: # Generating discrete ordinal data with "genome-like" graph structure data.sim <- episim(alpha = 0.01, beta = 0.02) plot( data.sim ) ## End(Not run)## Not run: # Generating discrete ordinal data with "genome-like" graph structure data.sim <- episim(alpha = 0.01, beta = 0.02) plot( data.sim ) ## End(Not run)
Print a summary of simulated data from function epistasis.
## S3 method for class 'epi' print(x, ...)## S3 method for class 'epi' print(x, ...)
x |
An object with S3 class |
... |
System reserved (No specific usage) |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
Print a summary of simulated data from function episim.
## S3 method for class 'episim' print(x, ...)## S3 method for class 'episim' print(x, ...)
x |
An object with S3 class |
... |
System reserved (No specific usage) |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
This function implements the approximation method within the Gaussian copula graphical model to estimate the conditional expectation for the data that not follow Gaussianity assumption (e.g. ordinal, discrete, continuous non-Gaussian, or mixed dataset).
R.approx(y, Z = NULL, Sigma=NULL, rho = NULL, ncores = NULL )R.approx(y, Z = NULL, Sigma=NULL, rho = NULL, ncores = NULL )
y |
An ( |
Z |
A ( |
Sigma |
The covariance matrix of the latent variable given the data. If |
rho |
A (non-negative) regularization parameter to calculate |
ncores |
If |
ES |
Expectation of covariance matrix( diagonal scaled to 1) of the Gaussian copula graphical model. |
Z |
New transformation of the data based on given or default |
Pariya Behrouzi and Ernst C. Wit
Maintainer: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
## Not run: D <- episim(p = 100, n = 50, k = 3) R.approx(D$data) ## End(Not run)## Not run: D <- episim(p = 100, n = 50, k = 3) R.approx(D$data) ## End(Not run)
This function implements the Gibbs sampling method within Gaussian copula graphical model to estimate the conditional expectation for the data that not follow Gaussianity assumption (e.g. ordinal, discrete, continuous non-Gaussian, or mixed dataset).
R.gibbs(y, theta, gibbs.iter = 1000, mc.iter = 500, ncores = NULL, verbose = TRUE)R.gibbs(y, theta, gibbs.iter = 1000, mc.iter = 500, ncores = NULL, verbose = TRUE)
y |
An ( |
theta |
A |
gibbs.iter |
The number of burn-in for the Gibbs sampling. The default value is 1000. |
mc.iter |
The number of Monte Carlo samples to calculate the conditional expectation. The default value is 500. |
ncores |
If |
verbose |
If |
This function calculates using Gibbs sampling method within the E-step of EM algorithm, where
which is the number of sample size and is the latent variable which is obtained from Gaussian copula graphical model.
ES |
Expectation of covariance matrix ( diagonal scaled to 1) of the Gaussian copula graphical model |
Pariya Behrouzi, Danny Arends and Ernst C. Wit
Maintainers: Pariya Behrouzi [email protected]
P. Behrouzi and E. C. Wit. Detecting Epistatic Selection with Partially Observed Genotype Data Using Copula Graphical Models. arXiv, 2016.
## Not run: D <- episim(p = 100, n = 50, k = 3) R.gibbs(D$data, ncores=1) ## End(Not run)## Not run: D <- episim(p = 100, n = 50, k = 3) R.gibbs(D$data, ncores=1) ## End(Not run)