Skip to content

Commit

Permalink
Merge pull request #167 from CCBR/iss-125
Browse files Browse the repository at this point in the history
refactor: consolidate build_cluster.json into main cluster.json
  • Loading branch information
kelly-sovacool authored Nov 7, 2024
2 parents 06fd833 + eb1977f commit 7cc0322
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 43 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## RENEE development version

- Consolidate `build_cluster.json` into `cluster.json`. (#167, @kelly-sovacool)

## RENEE 2.6.1

- New contributing guide available on GitHub and the documentation website. (#159, @kelly-sovacool)
Expand Down
24 changes: 20 additions & 4 deletions resources/cluster.json → config/cluster.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"__default__": {
"gres": "lscratch:256",
"mem": "48g",
"gres": "lscratch:128",
"mem": "8g",
"partition": "norm",
"threads": "4",
"threads": "1",
"time": "4:00:00",
"name": "{rule}.{wildcards}",
"output": "logfiles/slurmfiles/${{SLURM_JOBID}}.%j.{rule}.{wildcards}.out",
Expand Down Expand Up @@ -50,9 +50,13 @@
"threads": "16",
"time": "1-00:00:00"
},
"qualimapinfo": {
"mem": "20g"
},
"rsem": {
"gres": "lscratch:500",
"threads": "16",
"mem": "48g",
"threads": "32",
"time": "1-00:00:00"
},
"star1p": {
Expand All @@ -78,6 +82,18 @@
"threads": "32",
"time": "2-00:00:00"
},
"star_rl": {
"mem": "48g",
"gres": "lscratch:128",
"threads": "32",
"time": "12:00:00"
},
"star_genome": {
"mem": "48g",
"gres": "lscratch:128",
"threads": "32",
"time": "12:00:00"
},
"arriba": {
"gres": "lscratch:256",
"mem": "110g",
Expand Down
2 changes: 1 addition & 1 deletion config/templates/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"MINSAMPLES": "0.5",
"annotation": "",
"binset": "standard-bin",
"cluster": "resources/cluster.json",
"cluster": "config/cluster.json",
"contrasts": {
"rcontrasts": ""
},
Expand Down
32 changes: 0 additions & 32 deletions resources/build_cluster.json

This file was deleted.

4 changes: 2 additions & 2 deletions resources/builder
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function submit(){
--output "$3"/logfiles/snakemake.log --error "$3"/logfiles/snakemake.log \
snakemake --latency-wait 120 -s "$3"/workflow/rules/build.smk -d "$3" \
--use-singularity --singularity-args "'-B $4'" --configfile="$3"/config/build.yml \
--printshellcmds --cluster-config "$3"/resources/build_cluster.json \
--printshellcmds --cluster-config "$3"/config/cluster.json \
--cluster "${CLUSTER_OPTS}" \
$triggeroptions \
--keep-going --restart-times 3 -j 500 --rerun-incomplete --stats "$3"/logfiles/runtime_statistics.json \
Expand All @@ -221,7 +221,7 @@ function submit(){
--output "$3"/logfiles/snakemake.log --error "$3"/logfiles/snakemake.log \
snakemake --latency-wait 120 -s "$3"/workflow/rules/build.smk -d "$3" \
--use-singularity --singularity-args "'-B $4'" --configfile="$3"/config/build.yml \
--printshellcmds --cluster-config "$3"/resources/build_cluster.json \
--printshellcmds --cluster-config "$3"/config/cluster.json \
--cluster "${CLUSTER_OPTS}" \
$triggeroptions \
--keep-going --restart-times 3 -j 500 --rerun-incomplete --stats "$3"/logfiles/runtime_statistics.json \
Expand Down
4 changes: 2 additions & 2 deletions resources/runner
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function submit(){
--output "$3"/logfiles/snakemake.log --error "$3"/logfiles/snakemake.log \
snakemake --latency-wait 120 -s "$3"/workflow/Snakefile -d "$3" \
--use-singularity --singularity-args "'-B $4'" --configfile="$3"/config.json \
--printshellcmds --cluster-config "$3"/resources/cluster.json \
--printshellcmds --cluster-config "$3"/config/cluster.json \
--cluster "${CLUSTER_OPTS}" \
$triggeroptions \
--keep-going --restart-times 3 -j 500 --rerun-incomplete --stats "$3"/logfiles/runtime_statistics.json \
Expand All @@ -224,7 +224,7 @@ function submit(){
--output "$3"/logfiles/snakemake.log --error "$3"/logfiles/snakemake.log \
snakemake --latency-wait 120 -s "$3"/workflow/Snakefile -d "$3" \
--use-singularity --singularity-args "'-B $4'" --configfile="$3"/config.json \
--printshellcmds --cluster-config "$3"/resources/cluster.json \
--printshellcmds --cluster-config "$3"/config/cluster.json \
--cluster "${CLUSTER_OPTS}" \
$triggeroptions \
--keep-going --restart-times 3 -j 500 --rerun-incomplete --stats "$3"/logfiles/runtime_statistics.json \
Expand Down
2 changes: 1 addition & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tmpdir = config['options']['tmp_dir'] # Temporary directory
# threads, mem, walltimes, etc.
# TODO: Add handler for when the
# mode is set to local.
with open(join('resources', 'cluster.json')) as fh:
with open(join('config', 'cluster.json')) as fh:
cluster = json.load(fh)

# Check for SE or PE FastQ files:
Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/build.smk
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ workdir:OUTDIR
# threads, mem, walltimes, etc.
# TODO: Add handler for when the
# mode is set to local.
with open(join(OUTDIR, 'resources', 'build_cluster.json')) as fh:
with open(join(OUTDIR, 'config', 'cluster.json')) as fh:
cluster = json.load(fh)

# Ensures backwards compatibility
Expand Down

0 comments on commit 7cc0322

Please sign in to comment.