Skip to content

Commit

Permalink
Refine default resource config
Browse files Browse the repository at this point in the history
  • Loading branch information
lczech committed Dec 16, 2024
1 parent 020d97c commit 0a56b7b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
8 changes: 4 additions & 4 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ params:
# Used only if settings:mapping-tool == bowtie2
# See bowtie2 manual: http://bowtie-bio.sourceforge.net/bowtie2/index.shtml
bowtie2:
threads: 12
threads: 10

# Extra parameters. We internally already set `--rg` and `--rg-id`, using read group ("@RG")
# tags "ID" and "SM", and potentially "PL".
Expand All @@ -523,7 +523,7 @@ params:
# Used only if settings:mapping-tool == bwaaln
# See bwa manual: http://bio-bwa.sourceforge.net/
bwaaln:
threads: 4
threads: 10

# Extra parameters for bwa aln, which maps the reads and produces intermediate *.sai files.
extra: ""
Expand All @@ -544,7 +544,7 @@ params:
# Used only if settings:mapping-tool == bwamem
# See bwa manual: http://bio-bwa.sourceforge.net/
bwamem:
threads: 12
threads: 10

# Extra parameters for bwa mem.
# We internally already set `-R` to use read group ("@RG") tags "ID" and "SM",
Expand All @@ -561,7 +561,7 @@ params:
# Used only if settings:mapping-tool == bwamem2
# See bwa manual: https://github.com/bwa-mem2/bwa-mem2
bwamem2:
threads: 12
threads: 10

# Extra parameters for bwa mem.
# We internally already set `-R` to use read group ("@RG") tags "ID" and "SM",
Expand Down
33 changes: 29 additions & 4 deletions workflow/profiles/slurm/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,67 @@ local-cores: 1
# For now, we do not separate between the global and the workflow profile,
# as it seems that the whole profiles setup of Snakemake is in active development,
# and so we do not bother just yet to put in the effort
# to comply with their ever changing requirements...
# to fully comply with their ever changing requirements...
# See https://snakemake.readthedocs.io/en/stable/executing/cli.html#profiles
# Here, we simply put in all the configuration in one file.
# Feel free though to use this profile as a basis for your own more specific setup.

# As of now, it seems that the Snakemake slurm plugin only understands MB and minutes,
# instead of the more convenient resource specifications that slurm offers,
# see https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/175
# So, for now, please convert everything to these units.

# Furthermore, there is a bug in the snakemake slurm submission, where the number
# of cores on the login node (where typically snakemake is being run, and from which
# the slurm jobs are hence submitted) is used as a limitation check for the number
# of cores a job can request, in order to avoid over-allocation.
# Of course, on many clusters, the login node might have way fewer cores than the
# compute nodes, and so this prevents us of submitting jobs that need more cores
# than the login node has. Silly.
# See: https://github.com/snakemake/snakemake/issues/2997
# The workaround for this is to run snakemake with `--cores 1024` or some other
# large number - those cores might however be used for some local rules, which
# however should not lead to issues on the login node.

# Default resources applied for all rules that are not explicitly specified below.
# In particlar, set the slurm accounting information here as needed.
# Any category from here can be overwritten by creating a rule-specific config below.
default-resources:
slurm_account: "your_account"
slurm_partition: "your_partition"
mem_mb: 10000 # Memory in megabytes
runtime: 120 # Runtime in minutes
runtime: 180 # Runtime in minutes
cpus_per_task: 1
nodes: 1
tasks: 1

# Overrides for specific tasks
set-resources:

# Single end trimming
trim_reads_se:
mem_mb: 5000
cpus_per_task: 4

# Paired end trimming
trim_reads_pe:
mem_mb: 5000
cpus_per_task: 4

# Read mapping tool
map_reads:
cpus_per_task: 4
cpus_per_task: 10

# Group job: Read mapping and sorting, needs to be
# at least one greater than the above `map_reads`
mapping:
cpus_per_task: 12

# Variant calling
call_variants:
runtime: 1440 # One day
runtime: 1440 # One day
cpus_per_task: 4

# For GATK HaplotypeCaller
combine_calls:
runtime: 1440

0 comments on commit 0a56b7b

Please sign in to comment.