This repository contains a template for running multiple CoGAPS jobs on MARCC.
- clone repository (change
project_nameto your project name)
git clone https://github.com/FertigLab/MARCC_SCRIPTS_FOR_COGAPS.git
mv MARCC_SCRIPTS_FOR_COGAPS project_name
cd project_name
chmod +x run
- delete
.git- you no longer need access to this repository
rm -rf .git
- (optional) Create a new git repository to push your result to
git init
git add -A
git commit -m "first commit message"
git remote add origin https://github.com/username/new_repo
git push origin master
Your directory structure should now look like this (if you have tree installed you can see this with tree ..)
..
βββ project_name
βββ README.md
βββ run
βββ scripts
βββ job_script.sh
βββ R_script.R
Now that you have the directory structure set up, you can use the run script to submit jobs as follows:
- modify the parameter values
R_script.Rfor your specific case - modify the job parameters (i.e. #SBATCH ...) in
job_script.sh - modify the modules in
job_script.shto specify version of R to use - execute
./run run_name run_id
This will copy over the scripts and run everything in a new directory called run_name/run_id. With these scripts you can quickly fire off multiple runs and all information (including log files) will be stored in a separate, well-structured directory.
Inside R_script.R and job_script.sh you can find instructions on how to modify those files.
For more information use ./run --help
After modifying R_script.R and job_script.sh you might set off a few runs like this:
./run MySingleCellAnalysis 1
modify parameters again
./run MySingleCellAnalysis 2
and the result will be a directory like this:
βββ MySingleCellAnalysis
βΒ Β βββ run_1
βΒ Β βΒ Β βββ logs
βΒ Β βΒ Β βΒ Β βββ slurm-31515407_1.out
βΒ Β βΒ Β βΒ Β βββ slurm-31515407_2.out
βΒ Β βΒ Β βΒ Β βββ slurm-31515407_3.out
βΒ Β βΒ Β βββ result_1
βΒ Β βΒ Β βΒ Β βββ sc_analysis_result.RData
βΒ Β βΒ Β βββ result_2
βΒ Β βΒ Β βΒ Β βββ sc_analysis_result.RData
βΒ Β βΒ Β βββ result_3
βΒ Β βΒ Β βΒ Β βββ sc_analysis_result.RData
βΒ Β βΒ Β βββ scripts
βΒ Β βΒ Β βββ job_script.sh
βΒ Β βΒ Β βββ R_script.R
βΒ Β βββ run_2
βΒ Β βββ logs
βΒ Β βΒ Β βββ slurm-31558492_1.out
βΒ Β βΒ Β βββ slurm-31558492_2.out
βΒ Β Β Β βββ result_1
βΒ Β Β Β βΒ Β βββ sc_analysis_result.RData
βΒ Β Β Β βββ result_2
βΒ Β Β Β βΒ Β βββ sc_analysis_result.RData
βΒ Β βββ scripts
βΒ Β βββ job_script.sh
βΒ Β βββ R_script.R
The SLURM log files are sent to run_id/logs and the scripts used to set off the run are sent to run_id/scripts. All results are sent to run_id/result_id where the
CogapsResult object is saved to an RData file. The number of results is determined by how many parameters are being looped over in R_script.R.
Please let me know on Slack or at tomsherman159@gmail.com if there are any bugs in these scripts or if there any features you'd like to see added