From e8c8356924248e6b91312e77e674b111aa89fb5e Mon Sep 17 00:00:00 2001 From: Princy Parsana Date: Fri, 5 Oct 2018 15:31:53 -0400 Subject: [PATCH] adding shellscripts for power version of wgcna, and pr shellscripts --- shellscripts/pr_power_wgcna.sh | 28 +++++++++++++++++ shellscripts/pr_shared.sh | 32 ++++++++++++++++++++ shellscripts/pr_signed_wgcna.sh | 28 +++++++++++++++++ shellscripts/signed_wgcna.sh | 26 ++++++++++++++++ shellscripts/submit_jobs_wgcna_power_vary.sh | 17 +++++++++++ shellscripts/template_power_vary_wgcna.sh | 13 ++++++++ 6 files changed, 144 insertions(+) create mode 100644 shellscripts/pr_power_wgcna.sh create mode 100644 shellscripts/pr_shared.sh create mode 100644 shellscripts/pr_signed_wgcna.sh create mode 100644 shellscripts/signed_wgcna.sh create mode 100644 shellscripts/submit_jobs_wgcna_power_vary.sh create mode 100644 shellscripts/template_power_vary_wgcna.sh diff --git a/shellscripts/pr_power_wgcna.sh b/shellscripts/pr_power_wgcna.sh new file mode 100644 index 0000000..7e70baf --- /dev/null +++ b/shellscripts/pr_power_wgcna.sh @@ -0,0 +1,28 @@ +#!/bin/sh +#SBATCH --time=26:0:0 +#SBATCH --mem=80G +#SBATCH --partition=shared + +source ~/.bash_profile +source /work-zfs/abattle4/parsana/networks_correction/shellscripts/dirconfig + +cd $scriptDir + +Rscript compute_pr.R Subcutaneous $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_subcutaneous power_wgcna FALSE >$logDir/pr_canonical_power_wgcna_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_lung power_wgcna FALSE >$logDir/pr_canonical_power_wgcna_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_thyroid power_wgcna FALSE >$logDir/pr_canonical_power_wgcna_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_muscle power_wgcna FALSE >$logDir/pr_canonical_power_wgcna_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_blood power_wgcna FALSE >$logDir/pr_canonical_power_wgcna_blood.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_artery power_wgcna FALSE >$logDir/pr_canonical_pathways_merged_power_wgcna_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_nerve power_wgcna FALSE >$logDir/pr_canonical_pathways_merged_power_wgcna_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_skin power_wgcna FALSE >$logDir/pr_canonical_pathways_merged_power_wgcna_skin.log + + +Rscript compute_pr.R Subcutaneous $datDir/genesets/tft.txt $plotDir $resultDir tft_subcutaneous power_wgcna FALSE >$logDir/pr_tft_power_wgcna_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/tft.txt $plotDir $resultDir tft_lung power_wgcna FALSE >$logDir/pr_tft_power_wgcna_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/tft.txt $plotDir $resultDir tft_thyroid power_wgcna FALSE >$logDir/pr_tft_power_wgcna_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/tft.txt $plotDir $resultDir tft_muscle power_wgcna FALSE >$logDir/pr_tft_power_wgcna_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/tft.txt $plotDir $resultDir tft_blood power_wgcna FALSE >$logDir/pr_tft_power_wgcna_blood.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/tft.txt $plotDir $resultDir tft_artery power_wgcna FALSE >$logDir/pr_tft_power_wgcna_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/tft.txt $plotDir $resultDir tft_nerve power_wgcna FALSE >$logDir/pr_tft_power_wgcna_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/tft.txt $plotDir $resultDir tft_skin power_wgcna FALSE >$logDir/pr_tft_power_wgcna_skin.log diff --git a/shellscripts/pr_shared.sh b/shellscripts/pr_shared.sh new file mode 100644 index 0000000..ed8c7cc --- /dev/null +++ b/shellscripts/pr_shared.sh @@ -0,0 +1,32 @@ +#!/bin/sh +#SBATCH --time=46:0:0 +#SBATCH --mem=80G +#SBATCH --partition=shared + +source ~/.bash_profile +source /work-zfs/abattle4/parsana/networks_correction/shellscripts/dirconfig + +cd $scriptDir + + +Rscript compute_pr.R Subcutaneous $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_subcutaneous wgcna-signed TRUE >$logDir/pr_shared_wgcna-signed_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_lung wgcna-signed TRUE >$logDir/pr_shared_wgcna-signed_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_thyroid wgcna-signed TRUE >$logDir/pr_shared_wgcna-signed_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_muscle wgcna-signed TRUE >$logDir/pr_shared_wgcna-signed_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_blood wgcna-signed TRUE >$logDir/pr_shared_wgcna-signed_blood.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_artery wgcna-signed TRUE >$logDir/pr_shared_pathways_merged_wgcna-signed_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_nerve wgcna-signed TRUE >$logDir/pr_shared_pathways_merged_wgcna-signed_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_skin wgcna-signed TRUE >$logDir/pr_shared_pathways_merged_wgcna-signed_skin.log + + +Rscript compute_pr.R Subcutaneous $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_subcutaneous glasso TRUE >$logDir/pr_shared_glasso_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_lung glasso TRUE >$logDir/pr_shared_glasso_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_thyroid glasso TRUE >$logDir/pr_shared_glasso_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_muscle glasso TRUE >$logDir/pr_shared_glasso_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_blood glasso TRUE >$logDir/pr_shared_glasso_blood.log +od.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_artery glasso TRUE >$logDir/pr_shared_glasso_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_nerve glasso TRUE >$logDir/pr_shared_glasso_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/edges_in_twopathways.txt $plotDir $resultDir shared_skin glasso TRUE >$logDir/pr_shared_glasso_skin.log + + diff --git a/shellscripts/pr_signed_wgcna.sh b/shellscripts/pr_signed_wgcna.sh new file mode 100644 index 0000000..82a15f7 --- /dev/null +++ b/shellscripts/pr_signed_wgcna.sh @@ -0,0 +1,28 @@ +#!/bin/sh +#SBATCH --time=26:0:0 +#SBATCH --mem=80G +#SBATCH --partition=shared + +source ~/.bash_profile +source /work-zfs/abattle4/parsana/networks_correction/shellscripts/dirconfig + +cd $scriptDir + +Rscript compute_pr.R Subcutaneous $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_subcutaneous wgcna-signed FALSE >$logDir/pr_canonical_wgcna-signed_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_lung wgcna-signed FALSE >$logDir/pr_canonical_wgcna-signed_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_thyroid wgcna-signed FALSE >$logDir/pr_canonical_wgcna-signed_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_muscle wgcna-signed FALSE >$logDir/pr_canonical_wgcna-signed_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_blood wgcna-signed FALSE >$logDir/pr_canonical_wgcna-signed_blood.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_artery wgcna-signed FALSE >$logDir/pr_canonical_pathways_merged_wgcna-signed_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_nerve wgcna-signed FALSE >$logDir/pr_canonical_pathways_merged_wgcna-signed_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/canonical_pathways_merged.txt $plotDir $resultDir canonical_skin wgcna-signed FALSE >$logDir/pr_canonical_pathways_merged_wgcna-signed_skin.log + + +Rscript compute_pr.R Subcutaneous $datDir/genesets/tft.txt $plotDir $resultDir tft_subcutaneous wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_subcutaneous.log +Rscript compute_pr.R Lung $datDir/genesets/tft.txt $plotDir $resultDir tft_lung wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_lung.log +Rscript compute_pr.R Thyroid $datDir/genesets/tft.txt $plotDir $resultDir tft_thyroid wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_thyroid.log +Rscript compute_pr.R Muscle $datDir/genesets/tft.txt $plotDir $resultDir tft_muscle wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_muscle.log +Rscript compute_pr.R Blood $datDir/genesets/tft.txt $plotDir $resultDir tft_blood wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_blood.log +Rscript compute_pr.R Artery_tibial $datDir/genesets/tft.txt $plotDir $resultDir tft_artery wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_srtery.log +Rscript compute_pr.R Nerve_tibial $datDir/genesets/tft.txt $plotDir $resultDir tft_nerve wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_nerve.log +Rscript compute_pr.R Skin $datDir/genesets/tft.txt $plotDir $resultDir tft_skin wgcna-signed FALSE >$logDir/pr_tft_wgcna-signed_skin.log diff --git a/shellscripts/signed_wgcna.sh b/shellscripts/signed_wgcna.sh new file mode 100644 index 0000000..a5a158e --- /dev/null +++ b/shellscripts/signed_wgcna.sh @@ -0,0 +1,26 @@ +#!/bin/sh +#SBATCH --time=72:0:0 +#SBATCH --mem=70G +#SBATCH --partition=shared + +source ~/.bash_profile +source /work-zfs/abattle4/parsana/networks_correction/shellscripts/dirconfig + +cd $scriptDir + +## WGCNA networks +mkdir $networksDir/raw/ +mkdir $networksDir/rin/ +mkdir $networksDir/gc/ +mkdir $networksDir/pc/ +mkdir $networksDir/halfpc/ +mkdir $networksDir/quarterpc/ +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/raw_subset.Rdata signed $networksDir/raw/signed_wgcna_networks.Rdata >$logDir/raw_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/rin_corrected.Rdata signed $networksDir/rin/signed_wgcna_networks.Rdata >$logDir/rin_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/gc_corrected.Rdata signed $networksDir/gc/signed_wgcna_networks.Rdata >$logDir/gc_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/exonicRate_corrected.Rdata signed $networksDir/exonicRate/signed_wgcna_networks.Rdata >$logDir/exonicRate_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/mc_corrected.Rdata signed $networksDir/mc/signed_wgcna_networks.Rdata >$logDir/mc_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/pc_corrected.Rdata signed $networksDir/pc/signed_wgcna_networks.Rdata >$logDir/pc_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/halfpc_corrected.Rdata signed $networksDir/halfpc/signed_wgcna_networks.Rdata >$logDir/halfpc_signed_wgcna.log 2>&1 +Rscript --no-save --no-restore --verbose infer_wgcna.R $datDir/quarterpc_corrected.Rdata signed $networksDir/quarterpc/signed_wgcna_networks.Rdata >$logDir/quarterpc_signed_wgcna.log 2>&1 + diff --git a/shellscripts/submit_jobs_wgcna_power_vary.sh b/shellscripts/submit_jobs_wgcna_power_vary.sh new file mode 100644 index 0000000..6509f7c --- /dev/null +++ b/shellscripts/submit_jobs_wgcna_power_vary.sh @@ -0,0 +1,17 @@ +sbatch --job-name=raw_wgcna_varypower template_power_vary_wgcna.sh raw_subset.Rdata signed raw/power_wgcna_networks.Rdata r2_varypowerraw_wgcna.log + +sbatch --job-name=rin_wgcna_varypower template_power_vary_wgcna.sh rin_corrected.Rdata signed rin/power_wgcna_networks.Rdata r2_varypowerrin_wgcna.log + +sbatch --job-name=gc_wgcna_varypower template_power_vary_wgcna.sh gc_corrected.Rdata signed gc/power_wgcna_networks.Rdata r2_varypowergc_wgcna.log + +sbatch --job-name=mc_wgcna_varypower template_power_vary_wgcna.sh mc_corrected.Rdata signed mc/power_wgcna_networks.Rdata r2_varypowermc_wgcna.log + +sbatch --job-name=exonicRate_wgcna_varypower template_power_vary_wgcna.sh exonicRate_corrected.Rdata signed exonicRate/power_wgcna_networks.Rdata r2_varypowerexonicRate_wgcna.log + +sbatch --job-name=pc_wgcna_varypower template_power_vary_wgcna.sh pc_corrected.Rdata signed pc/power_wgcna_networks.Rdata r2_varypowerpc_wgcna.log + +sbatch --job-name=halfpc_wgcna_varypower template_power_vary_wgcna.sh halfpc_corrected.Rdata signed halfpc/power_wgcna_networks.Rdata r2_varypowerhalfpc_wgcna.log + +sbatch --job-name=quarterpc_wgcna_varypower template_power_vary_wgcna.sh quarterpc_corrected.Rdata signed quarterpc/power_wgcna_networks.Rdata r2_varypowerquarterpc_wgcna.log + + diff --git a/shellscripts/template_power_vary_wgcna.sh b/shellscripts/template_power_vary_wgcna.sh new file mode 100644 index 0000000..99489b1 --- /dev/null +++ b/shellscripts/template_power_vary_wgcna.sh @@ -0,0 +1,13 @@ +#!/bin/sh +#SBATCH --time=72:0:0 +#SBATCH --mem=70G +#SBATCH --partition=parallel + +source ~/.bash_profile +source /work-zfs/abattle4/parsana/networks_correction/shellscripts/dirconfig + +cd $scriptDir + +test=$logDir/$4 +echo $test +Rscript --no-save --no-restore --verbose infer_wgcna_vary_power.R $datDir/$1 $2 $networksDir/$3 >$logDir/$4