rexposome
is an R package for exposome characterization and exopsome-outcome test association. It depends in a series of third party R packages to provide:
- A basic pipeline for missing-data imputation in exposome, include the imputation of values under limit of detection.
- A series of functions to describe and characterize the exposome, including PCA in exposures and samples space, correlation between exposures and clustering of samples through exposure levels.
- Two different approaches to test the association exposome-diseasom in terms of Exposome-Wide Association Studies (ExWAS and mExWAS).
rexposome
requires R version equal or newer than 3.0. The following script allows to install rexposome
dependencies:
if (!requireNamespace("BiocManager", quietly=TRUE))
install.packages("BiocManager")
packages = c('Biobase', 'mice', 'MultiDataSet', 'lsr', 'FactoMineR',
'stringr', 'circlize', 'corrplot', 'ggplot2', 'reshape2', 'pryr',
'scales', 'imputeLCMD', 'scatterplot3d', 'glmnet', 'gridExtra',
'grid', 'Hmisc', 'gplots', 'gtools', 'S4Vectors'
)
for( pkg in packages ) {
if( !pkg %in% rownames( installed.packages() ) ) {
message( "Installing ", pkg )
BiocManager::install( pkg )
}
}
The package can be installed using the R package devtools
. devtools
can be installed win the following code:
install.packages("devtools")
Due to the publication process of rexposome
at Biocondcuto, the requirment is set to R-3.4. For those using R-3.4, the following code installs rexposome
:
devtools::install_github("isglobal-brge/rexposome")
For those using an older version of R (but newer than R-3.o) the following code installs rexposome
:
devtools::install_github("isglobal-brge/rexposome", ref="R-3.0")
- Carles Hernandez-Ferrer |
carles.hernandez < at > isglobal < dot > org
- Juan R. Gonzalez |
juanr.gonzalez < at > isglobal < dot > org
In rexposome
the exposome is understood as a set of three files:
- The exposure file: A matrix files with the exposures' measurements, having the individuals as rows and the exposures as columns.
- The phenotype file (diseasome file): A matrix with the phenotypes or diseases description, having the individuals as rows and the phenotypes as columns.
- The description file: A table describing the exposures. It must have, at last, two columns: one with the exposures and one with the family/group of exposures. The order of the exposures must be the same as in exposure-file.
The exposome is loaded from files using the function readExposome
. If the information is stored in standard R data.frame
s, those can be converted to an ExposomeSet
using the function loadExposome
.
The characterization of the exposome is done with a bunch of functions that follows:
- The functions
tableMissings
andplotMissings
allows to quantify the amount of missing data. - The functions
tableLOD
andplotLOD
allows to quantify the amount of measurements under limit of detection (if provided in description-file). normalityTest
allows to test normality on the exposures.- The two function
impute
andilod
allows to impute missing data and values under LOD. plotFamily
allows to draw a cumulative bar plot for categorical exposures and a box-plot for continuous exposures.correlation
allows to compute the correlation between exposures.- The function
plotCorrelation
allows to draw a circos or a matrix plot for the computed correlations. pca
performs a Principal Component Analysis in the exposome.plotPCA
andplot3PCA
allows to draw a 2D and 3D scatter plot for the result of the PCA.- Functions
plotPHE
andplotEXP
allows to draw the association and the correlation between phenotypes and exposures to the principal components.
- The function
exwas
allows to perform an Exposome-Wide Association Study by testing the association of each exposure with a given phenotype. m_exwas
allows to perform a MultiVariate Exposome-Wide Association Study by using ElasticNet methods.plotExwas
allows to plot a Manhattan plot of the result of an ExWAS (for bothexwas
andm_exwas
).plotEffect
allows to plot the effects of each exposure. It can also be used to compare two models.