Skip to content

Parks-Laboratory/wgcna_pipeline

Repository files navigation

Generate R tarball for upload to condor

  • Go to Interactive Condor and do the following:
  1. [John@build]$ tar -xzf R-3.6.0.tar.gz
  2. [John@build]$ cd R-3.6.0
  3. [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

  1. [John@build]$ make
  2. [John@build]$ make install
  3. [John@build]$ cd ..
  • Open R program in condor:
  1. [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")

packages for meta analysis:

install.packages (c("dynamicTreeCut","qvalue","Hmisc"))

exit the R

q()

  • change RHOME directory
  1. [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

  1. [John@build]$ mv R-3.6.0/lib64/R ./
  2. [John@build]$ tar -czvf R.tar.gz R/
  3. [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

Running the WGCNA Pipeline

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

  1. make a separate directory called wgcna/
  2. make a separate directory called node_files/ inside the wgcna/ directory
  3. transfer all R, Rdata, csv files into node_files/ directory
  4. edit the wgcna.sh file: in the last line change the name of the wgcna_network script to the correct file
  5. 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)
  6. copy R.tar.gz from cluster into the wgcna/ directory
  7. run the command condor_submit wgcna.sub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published