The R scripts in the examples
directory perform the simulation studies described in Gossmann et. al. FDR-Corrected Sparse Canonical Correlation Analysis with Applications to Imaging Genomics (2017). Code to generate visualizations from the simulation results, as presented in the paper, is provided in this repository as well.
The R scripts have been written with the intention of running them on the high performance computing cluster Cypress at Tulane University, which uses the Slurm resource management system.
Many functions (see the R
directory), which are used to implement the simulations in the examples
directory, are provided in form of an R package. The R package FDRcorrectedSCCA
can be installed using devtools
in R (see below). However, this should not be necessary in order to run the scripts from the examples
directory, because within those scripts all functions from the FDRcorrectedSCCA
package are loaded with devtools::load_all()
.
However, if you have trouble running the example scripts (ahem Windows ahem...), try installing the required functions as an R package following the instructions below. In that case the line devtools::load_all()
has to be replaced with library(FDRcorrectedSCCA)
in the example codes.
The R package FDRcorrectedSCCA
can be installed form a running R session with:
# install.packages("devtools") # if devtools is not installed
library(devtools)
install_github("agisga/FDRcorrectedSCCA")
-
Install the
devtools
R package (if you don't have it installed already):install.packages("devtools")
-
Open the file
FDRcorrectedSCCA.Rproj
in RStudio (if no Rproj file is available, you can create the Rproj file from RStudio viaFile > New Project > Existing Directory
). -
Then run
devtools::document()
-
Still in RStudio press CTRL-Shift-B. (If any of steps 1-4 fail, you are probably missing some other R packages, see the Error or Warning messages. Install the missing packages and try again from step 2.)