diff --git a/README.md b/README.md index 440efee..aa2dccb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +## Summary + +This script is dedicated to allow one to quickly and efficiently run a Copasi parameter estimation task on a computing cluster. Running 1000 parameter estimations in minutes and automatically summarising the results allows you to test a lot of hypothesis in a single day! Please enjoy and fork/pull request if you can see some obvious improvements! + ## Prerequisites 1. [LSF](http://www-03.ibm.com/systems/platformcomputing/products/lsf/) or [SGE](http://www.oracle.com/us/products/tools/oracle-grid-engine-075549.html) cluster @@ -37,4 +41,4 @@ where **n** is number of parameter estimations and **c** is your cluster queuing Authors: [Vladimir Kiselev](www.genat.uk), Marija Jankovic -Acknowledgments: Martina Fröhlich +Acknowledgments: Martina Fröhlich, Nicolas Rodriguez diff --git a/coparaest.sh b/coparaest.sh index 2e8e677..38401a0 100644 --- a/coparaest.sh +++ b/coparaest.sh @@ -5,9 +5,11 @@ mkdir results out err if [ $2 = "lsf" ]; then bsub -J "parameter-estimation[1-$1]" -o out/%I -e err/%I sh scripts/parameter-estimation.sh bsub -w "ended(parameter-estimation*)" -J "get-obj-values" -o out/get-obj-values -e err/get-obj-values perl scripts/get-obj-values.pl - bsub -w "ended(get-obj-values)" -J "analyse-results" -o out/analyse-results -e err/analyse-results /nfs/users/nfs_v/vk6/R-3.2.0/bin/Rscript scripts/analyse-results.R + bsub -w "ended(get-obj-values)" -J "analyse-results" -o out/analyse-results -e err/analyse-results Rscript scripts/analyse-results.R fi if [ $2 = "sge" ]; then - echo "sh scripts/job.sh" | qsub -t 1-$1 -cwd -V -o out/%I -e err/%I + echo "sh scripts/parameter-estimation.sh" | qsub -t 1-$1 -N "parameter_estimation" -cwd -V -o "out/parameter-estimation-${SGE_TASK_ID}" -e "err/parameter-estimation-${SGE_TASK_ID}" + echo "perl scripts/get-obj-values.pl" | qsub -hold_jid "parameter_estimation" -N "get_obj_values" -cwd -V -o out/get-obj-values -e err/get-obj-values + echo "Rscript scripts/analyse-results.R" | qsub -hold_jid "get_obj_values" -N "analyse_results" -cwd -V -o out/analyse-results -e err/analyse-results fi diff --git a/scripts/parameter-estimation.sh b/scripts/parameter-estimation.sh index 2ae4d70..c61cb10 100644 --- a/scripts/parameter-estimation.sh +++ b/scripts/parameter-estimation.sh @@ -1,5 +1,11 @@ -mkdir results/$LSB_JOBINDEX -cp model/* results/$LSB_JOBINDEX -cd results/$LSB_JOBINDEX +JOB_INDEX=${LSB_JOBINDEX} + +if [ "x${LSB_JOBINDEX}" == "x" ]; then + JOB_INDEX=${SGE_TASK_ID} +fi + +mkdir results/$JOB_INDEX +cp model/* results/$JOB_INDEX +cd results/$JOB_INDEX file=`ls *.cps` -/nfs/users/nfs_v/vk6/COPASI-4.15.95-Linux-64bit/bin/CopasiSE -s $file $file +CopasiSE -s $file $file