- Go to Interactive Condor and do the following:
- [John@build]$ tar -xzf R-3.6.0.tar.gz
- [John@build]$ cd R-3.6.0
- [John@build]$ ./configure --with-recommended-packages=no --without-x --with-cairo --with-libpng --with-libtiff --with-jpeglib --enable-R-shlib--prefix=$(pwd)
// if not enable cairo, png function can not work in wgcna
- [John@build]$ make
- [John@build]$ make install
- [John@build]$ cd ..
- Open R program in condor:
- [John@build]$ R-3.6.0/lib64/R/bin/R
install.packages('package_name') ...... (needed packages names in library.txt file, RODBC is not availabe since it needs sudo authoriaty)
source("http://bioconductor.org/biocLite.R") biocLite(ask = FALSE) biocLite(c("AnnotationDbi", "impute", "GO.db", "preprocessCore"), ask = FALSE) biocLite("org.Mm.eg.db") biocLite("BiocGenerics") biocLite("S4Vectors")
install.packages("parallel") install.packages("stats4")
install.packages("plyr") install.packages("dplyr") install.packages("tidyr") install.packages("stringr") install.packages("magrittr") install.packages("reshape2") install.packages("data.table") install.packages("optparse") install.packages("WGCNA") install.packages("flashClust")
install.packages (c("dynamicTreeCut","qvalue","Hmisc"))
exit the R
q()
- change RHOME directory
- [John@build]$ nano R-3.6.0/lib64/R/bin/R
change from : R_HOME_DIR=/var/lib/condor/execute/slot1/dir_554715/R-3.1.0/lib64/R change to: R_HOME_DIR=$(pwd)/R
- [John@build]$ mv R-3.6.0/lib64/R ./
- [John@build]$ tar -czvf R.tar.gz R/
- [John@build]$ exit
- The R.tar.gz will be transfered back to home directory after exit condor
- R.tar.gz (with all necessary libraries for WGCNA) is in E:/condor_tools
For example of running on our server: see REACTIVE_HDMP_NETWORKS
For example of running on clusters: see INDIVIDUAL_NETWORKS or ChickMungeretal2016
If the number of probes is large > 4000, then need to run code separately on the clusters
When running pipeline on the clusters, transfer the following files
- corresponding network_expr_data.Rdata
- corresponding affy_data.csv
- all files in wgcna pipeline folder
- wgcna.sh
- wgcna.sub
On the cluster
- make a separate directory called wgcna/
- make a separate directory called node_files/ inside the wgcna/ directory
- transfer all R, Rdata, csv files into node_files/ directory
- edit the wgcna.sh file: in the last line change the name of the wgcna_network script to the correct file
- edit the wgcna.sub file: change the queue number to the number of data sets (ie the length of the list expr_data, contained inside network_expr_data)
- copy R.tar.gz from cluster into the wgcna/ directory
- run the command
condor_submit wgcna.sub