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).
Installation
rexposome requires R version equal or newer than 3.0. The following script allows to install rexposome dependencies:
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:
Juan R. Gonzalez | juanr.gonzalez < at > isglobal < dot > org
Loading Exposome
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.frames, those can be converted to an ExposomeSet using the function loadExposome.
Exposome Characterization
The characterization of the exposome is done with a bunch of functions that follows:
The functions tableMissings and plotMissings allows to quantify the amount of missing data.
The functions tableLOD and plotLOD 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 and ilod 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 and plot3PCA allows to draw a 2D and 3D scatter plot for the result of the PCA.
Functions plotPHE and plotEXP allows to draw the association and the correlation between phenotypes and exposures to the principal components.
Exposome-Phenotype Association
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 both exwas and m_exwas).
plotEffect allows to plot the effects of each exposure. It can also be used to compare two models.
rexposome
Summary
rexposomeis an R package for exposome characterization and exopsome-outcome test association. It depends in a series of third party R packages to provide:Installation
rexposomerequires R version equal or newer than 3.0. The following script allows to installrexposomedependencies:The package can be installed using the R package
devtools.devtoolscan be installed win the following code:Due to the publication process of
rexposomeat Biocondcuto, the requirment is set to R-3.4. For those using R-3.4, the following code installsrexposome:For those using an older version of R (but newer than R-3.o) the following code installs
rexposome:Details
Authors
carles.hernandez < at > isglobal < dot > orgjuanr.gonzalez < at > isglobal < dot > orgLoading Exposome
In
rexposomethe exposome is understood as a set of three files:The exposome is loaded from files using the function
readExposome. If the information is stored in standard Rdata.frames, those can be converted to anExposomeSetusing the functionloadExposome.Exposome Characterization
The characterization of the exposome is done with a bunch of functions that follows:
tableMissingsandplotMissingsallows to quantify the amount of missing data.tableLODandplotLODallows to quantify the amount of measurements under limit of detection (if provided in description-file).normalityTestallows to test normality on the exposures.imputeandilodallows to impute missing data and values under LOD.plotFamilyallows to draw a cumulative bar plot for categorical exposures and a box-plot for continuous exposures.correlationallows to compute the correlation between exposures.plotCorrelationallows to draw a circos or a matrix plot for the computed correlations.pcaperforms a Principal Component Analysis in the exposome.plotPCAandplot3PCAallows to draw a 2D and 3D scatter plot for the result of the PCA.plotPHEandplotEXPallows to draw the association and the correlation between phenotypes and exposures to the principal components.Exposome-Phenotype Association
exwasallows to perform an Exposome-Wide Association Study by testing the association of each exposure with a given phenotype.m_exwasallows to perform a MultiVariate Exposome-Wide Association Study by using ElasticNet methods.plotExwasallows to plot a Manhattan plot of the result of an ExWAS (for bothexwasandm_exwas).plotEffectallows to plot the effects of each exposure. It can also be used to compare two models.