BulkSeq Studiov0.37.0

Reference

Cluster settings and commands

Every cluster setting with its default, per-step resources, the Slurm commands that work on a BulkSeq run, and troubleshooting.

On this page

The guided walkthrough for running BulkSeq on a Slurm cluster is on Run on a Slurm cluster. This page is for looking things up: every setting and its default, the resources each step asks for, the Slurm commands that work on a run, and what to do when something goes wrong.

Every cluster setting#

Use this section to find a setting’s name, default and effect. All site settings live in the project’s config/config.yaml, under execution, never in the copied workflow: an edit under workflow/ changes the recorded workflow digest and the project then refuses to run. Set them with bulkseq config set -C PATH execution.<setting> <value>, or in the desktop interface under Analysis setup, Compute resources, Cluster (Slurm) settings. A value that starts with --, such as --mail-type=FAIL, needs -- in front of it so the command does not read it as an option. A structured value (a list or a mapping) is given as YAML or JSON in quotes. In the desktop interface, Save Cluster Settings checks these settings and the per-step table and writes them to the project; Copy Cluster Commands copies the login-node commands that check and run the project (bulkseq check, a dry run, bulkseq run --exec-profile slurm and bulkseq slurm-script --submit).

bulkseq config set -C PATH execution.slurm_partition PARTITION
bulkseq config set -C PATH execution.slurm_account myproject
bulkseq config set -C PATH execution.slurm_extra -- --mail-type=FAIL
bulkseq config set -C PATH execution.rule_resources '{"star_align": {"slurm_partition": "bigmem"}}'
bulkseq config show -C PATH --section execution

Where jobs go#

Setting (execution.…)DefaultWhat it does
slurm_partition
Partition
emptySlurm partition (queue) for every job, or a comma-separated list Slurm may choose from. Empty uses the cluster's default. List them with sinfo -s.
slurm_account
Account
emptyAccount (project) charged for the jobs, passed as -A. Most centres require it; sacctmgr show assoc user=$USER format=account, or the centre's own command, lists yours.
slurm_no_account
Submit without an account
falsePasses --slurm-no-account for clusters that have no accounts. The 2.8.0 executor plugin defines the flag but does not yet act on it: with no account it still tries to guess one and submits without -A when that fails.
slurm_qos
Quality of service
emptyQOS name passed as --qos, where the site requires one.
slurm_constraint
Node features
emptyFeature expression passed as --constraint, e.g. a node type on a partition that mixes several.
slurm_clusters
Cluster
emptyFor federated sites: the cluster name passed as --clusters.
slurm_reservation
Reservation
emptyAn advance reservation the jobs should run in.
slurm_exclude_nodes
Exclude nodes
emptyNodes never to use, e.g. a017,a[040-042].
slurm_extra
Other sbatch options
emptyFurther options such as --nice=10 or --mail-type=FAIL. Options the settings above or the executor manage (account, partition, QOS, memory, CPUs, time, output) are refused here.

Job sizes and limits#

Setting (execution.…)DefaultWhat it does
jobs
Jobs in the queue at once
16Maximum number of jobs submitted at the same time. Keep it below the site's per-user limit.
min_cpus_per_job
Minimum CPUs per job
0Smallest CPU request of any job (0 = each step's own thread count). Set it to the partition's minimum where the centre sets one.
default_runtime_min
Default walltime (min)
240Walltime of a step with no walltime of its own (see the per-step table).
default_mem_mb
Default memory floor (MB)
4000Memory of a step that declares none: the larger of this and twice the step's input size.
retries
Retries
1Times a failed job is submitted again. A retry asks for the attempt number times the walltime (the step's own or the default one), capped by the walltime cap when set.
max_runtime_min
Walltime cap (min)
0Upper bound for a retried job's walltime (0 = no cap). Set it to the partition's time limit.
max_mem_mb
Memory cap for retries (MB)
0When set, a retried job also asks for more memory, up to this value (e.g. the node's memory). 0 keeps the memory of a retry unchanged.
tmpdir
Temporary directory
emptyAbsolute directory for each job's temporary files (STAR and samtools sort spill). Empty keeps the node's own. Quotes and '$' are not accepted, so a variable cannot be used here.

Executor behaviour#

Setting (execution.…)DefaultWhat it does
slurm_requeue
Requeue
site-defaultsite-default leaves it to the cluster; requeue lets Slurm restart a job after a node failure or pre-emption; no-requeue forbids it.
slurm_status_command
Job-state command
autoauto uses sacct when present. Choose squeue on a cluster without job accounting.
slurm_array_jobs
Submit as job arrays
emptyEmpty, all, or comma-separated step or rule names whose jobs are grouped into Slurm job arrays (a step name such as fastp covers every rule that reads its settings).
slurm_array_limit
Array size limit
0Largest array per submission (0 = the executor's default).
slurm_jobname_prefix
Job-name prefix
emptyPrefix shown in squeue (letters, digits, _ and -).
slurm_pass_command_as_script
Pass commands as scripts
falseFeeds each job's command to sbatch on standard input, for sites with a short command-line limit.
slurm_efficiency_report
Efficiency report
falseWrites logs/slurm/efficiency_report_.csv with each job's CPU and memory use at the end of the run.
slurm_partition_config
Partition limits file
emptyOptional YAML file (path relative to the project) describing partition limits, so the executor chooses a partition for each job by its size.
latency_wait_s
Shared-filesystem wait (s)
60How long to wait for a finished job's output to appear on the shared filesystem.
local_cores
Login-node cores
2Cores the steps that run on the submitting host may use together (downloads, enrichment).

Internet access#

Setting (execution.…)DefaultWhat it does
network_rules_on_submit_host
Run online steps on the login node
trueDownloads, GEO retrieval, enrichment, STRING and the MSigDB Hallmark set run where the run was started, because compute nodes often have no internet.
compute_nodes_have_internet
Compute nodes have internet
falseSingle-allocation mode only: when false, the job leaves the online steps, and the figures, check summary and reports that depend on them, for a finishing run on the login node.

Single-allocation mode (bulkseq slurm-script)#

Setting (execution.…)DefaultWhat it does
allocation_cpus
CPUs
0CPUs of the one job (0 = the whole node, --exclusive).
allocation_mem_gb
Memory (GB)
0Memory of the one job (0 = all of the node's memory).
allocation_time_min
Walltime (min)
1440Walltime of the one job. A run that needs longer is continued by submitting the script again.
container_image
Container image
emptyApptainer/Singularity image (.sif) to run the workflow in, for sites that forbid conda installs. Empty runs the installed environment.
container_runtime
Container command
apptainerapptainer or singularity, whichever the cluster provides.
container_binds
Container bind paths
[]Further directories the container must see, comma-separated absolute paths. The project folder, the temporary directory and the folders of the configured reference and FASTQ files are bound already.

Per-step threads, memory, walltime and placement#

Use this section to size one step or send it to another partition. Each heavy step declares its own threads, memory and walltime; every executor reads them. Change one with bulkseq config set -C PATH rule_memory_gb.star_index 160, rule_threads.star_align 16 or rule_runtime_min.star_index 1440. A step without a walltime gets execution.default_runtime_min; one without memory gets the larger of execution.default_mem_mb and twice its input size. To send one step to another partition, QOS or node type, set execution.rule_resources.<step>.<field> with field slurm_partition, slurm_account, qos, constraint, clusters or slurm_extra. Some step keys cover several workflow rules, so one setting sizes all of them: fastqc (raw and trimmed reports), fastp (also the Trim Galore and Trimmomatic rules, single-end and paired-end), sortmerna (also its index and the RiboDetector rules) and deseq2 (also the limma, voom and edgeR differential-expression rules).

StepDefault walltime (rule_runtime_min)Default memory (rule_memory_gb)
star_index720 min24 GB
hisat2_index720 min16 GB
salmon_index480 min16 GB
star_align360 min24 GB
hisat2_align360 min8 GB
salmon_quant240 min8 GB
sortmerna360 min12 GB
featurecounts240 min8 GB
deseq2240 min12 GB

Large genomes#

Use this section when the genome is larger than a typical mammalian one. Maize (about 2.2 Gb) and bread wheat (about 14.5 Gb) need far more than the defaults. On the bundled reference catalogue, STAR’s index build for maize peaked at 57.9 GB on the reference PC; wheat could not be indexed in 64 GB. The STAR manual asks for at least 32 GB for the 3.1 Gb human genome, roughly 10 bytes per base, which suggests on the order of 150 GB for wheat; treat that as an estimate to confirm on a first run, not a measurement. BulkSeq passes STAR a genome-generation limit of 90% of rule_memory_gb.star_index whenever that is above STAR’s 31 GB default, that is from 35 GB, so raising the memory is enough. Because the flag changes the STAR command, a project that already holds an index built with 35 GB or more rebuilds it once after this release. Aligning to a wheat STAR index also holds the whole index in memory, one alignment at a time per node; Salmon and HISAT2 need much less. Bread wheat and barley chromosomes exceed the 229−1 bp (about 537 Mb) a BAI index can address, so their BAMs are indexed as CSI automatically; another genome with such a sequence needs reference.bam_index csi, and the reference check stops the run with that instruction before alignment.

GenomeSuggested settingBasis
Maize, STARrule_memory_gb.star_index 72, star_align 40Index peak measured at 57.9 GB on the reference PC under STAR’s default limit; 72 GB gives STAR a 64.8 GB limit with headroom. Alignment is estimated from the index size
Wheat, STARrule_memory_gb.star_index 200, star_align 180, walltimes of a day or moreEstimated from the STAR manual’s human figure; not measured
Wheat, SalmonDefaults, with more walltime for salmon_indexThe route the benchmark plan uses for wheat on one PC

Run stages#

Use stages when only part of a run can happen on a given host, for example downloads on the login node and computation elsewhere. --stage prefetch runs only the downloads. --stage compute runs everything except the online analysis steps (enrichment, annotation transfer, STRING and MSigDB) and what depends on them: their figures, the check summary and the reports. --stage online runs only those online steps. --stage all, or no --stage, does whatever is still missing. A staged run uses the local executor, so give --stage only with the default --exec-profile local; with another profile the command stops with an error. --cores and --memory-gb size a local run for one launch without changing the project. Inside the single-allocation job the stage is the script’s first argument: sbatch config/slurm_allocation.sbatch all runs every step, including the online ones.

bulkseq run -C PATH --stage prefetch --cores 2
bulkseq run -C PATH --stage compute --cores 128 --memory-gb 240
bulkseq run -C PATH --stage online --cores 2
bulkseq run -C PATH --cores 2

Follow, inspect and control a run#

Use this section while a run is in progress or after it ended. Every job BulkSeq submits is an ordinary Slurm job, so the site’s own commands work on it. Per-step jobs are named by the run’s identifier and carry the step name in their comment; the one-allocation job is named bulkseq-<project>.

ToUse
List your jobs and their statessqueue --me
See why a job is pendingsqueue --me -o "%i %j %T %r" (reasons such as Resources, AssocGrpCPUMinutesLimit)
Inspect a job’s request and nodescontrol show job JOBID
Accounting after a job ends (state, time, peak memory)sacct -j JOBID -o JobID,JobName%30,State,Elapsed,MaxRSS,ReqMem,AllocCPUS
Live memory of a running jobsstat -j JOBID.batch -o MaxRSS,AveCPU
Efficiency of finished jobsseff JOBID where installed, or execution.slurm_efficiency_report true for logs/slurm/efficiency_report_<run id>.csv
Read what a job printedlogs/slurm/rule_<step>/[<sample>/]<jobid>.log; one allocation: logs/slurm/allocation-<jobid>.log
Read a tool’s own loglogs/<step>.log, as in a local run
Read the run loglogs/bulkseq_run_<time>_<profile>_<stage>.log
Hold or release a queued jobscontrol hold JOBID / scontrol release JOBID
Cancel jobsCtrl-C in the running bulkseq run (it cancels every job it submitted), or scancel JOBID / scancel --me
Debug one step interactivelysrun -p PARTITION -A ACCOUNT -c 4 --mem 8G --pty bash, then run the command from bulkseq print-command with --until STEP
See partitions and their limitssinfo -s, sinfo -o "%P %m %c %l"
See your accounts and quotassacctmgr show assoc user=$USER, or your centre’s own account command

Disconnects, stopping and resuming#

Use this section after a dropped connection, an interruption or a failed job. Closing the terminal, a dropped SSH session or kill stops a per-step run the same way Ctrl-C does: Snakemake cancels the jobs it submitted, so none is left running unattended. To survive a disconnect, run inside tmux or screen, or use one allocation. Resume with --mode resume, which unlocks the project and repeats incomplete steps. A failed job is submitted again execution.retries times with more walltime; a genuine tool error fails again and stops that branch while independent steps continue.

bulkseq run -C PATH --exec-profile slurm --mode resume

The exit status is that of a local run: 0 on success, 2 for a usage error, 3 when the project, its configuration or this host cannot be used, 5 when the workflow fails and 130 when interrupted. Exit codes and statuses lists each with what to do next.

Troubleshooting#

Use this table when a launch warning, a job state or an error message does not match what you expected. Find the message in the first column.

What you seeCauseWhat to do
'sbatch' is not on PATH, exit 3The command runs on a workstation, or Slurm’s commands are not loaded.Run it on the login node; load the site’s Slurm module if it has one.
executor plugin … cannot be imported, exit 3The environment predates 0.36.0 or is incomplete.Rerun bash scripts/setup_wsl_bioenv.sh bulkseq full from this release’s checkout.
The setup says it installs from the floating spec, not the lockThe host’s glibc is older than 2.28, or it is not linux-64.Use the Apptainer image, whose environment is the pinned one.
Invalid account or account/partition combinationThe account is missing, wrong or closed.Set execution.slurm_account to an open project.
A launch warning names a step that asks for more than the partition’s nodesThat step’s memory, CPUs or walltime exceed the partition.Lower it, or place the step elsewhere with execution.rule_resources.<step>.slurm_partition.
Jobs stay PENDING with reason Resources or a memory limitA job asks for more than any free node offers.Lower rule_memory_gb or rule_threads for that step, or choose another partition.
Jobs pend with AssocGrpCPUMinutesLimit or AssocGrpCpuLimitThe project’s core-hour quota or concurrent-core limit is reached.Wait, lower execution.jobs, or ask the centre for more.
A partition refuses jobs below a core countThe partition has a minimum per job.Set execution.min_cpus_per_job, or use one allocation.
A job ends TIMEOUTThe step needed longer than its walltime.Raise rule_runtime_min.<step> or execution.default_runtime_min, then resume.
A job ends OUT_OF_MEMORYThe step needed more than it requested.Raise rule_memory_gb.<step>, or execution.default_mem_mb for a step without one, then resume.
limitGenomeGenerateRAM … is too small from STARThe index build needs more memory than the step reserves.Raise rule_memory_gb.star_index; the STAR limit follows it.
samtools index fails with a region too large for BAIA chromosome exceeds 512 Mb and the genome was not recognised as long.Set reference.bam_index csi.
A download or enrichment step cannot connectThe host running it has no outbound access.Keep network_rules_on_submit_host true and run from a login node with internet, or stage inputs in advance.
Output files are reported missing after a job succeededThe shared filesystem showed them late.Raise execution.latency_wait_s.
slurm_extra may not set --qosThe executor or a dedicated setting manages that option.Use execution.slurm_qos (likewise slurm_constraint, slurm_clusters).
The project refuses to run after an edit under workflow/The recorded workflow digest no longer matches.Restore the copied workflow and put the setting in execution instead.

Kubernetes#

The kubernetes profile is a starting point, not a supported route. Its executor plugin is not part of the environment, and every pod would need a container image carrying the full tool stack. bulkseq run --exec-profile kubernetes exits 3 while the plugin is missing; it cannot detect a missing image. Read workflow/profiles/site/kubernetes/config.yaml before attempting it.

What has been verified#

Use this section to see what the cluster support has and has not been tested against. Both modes were run on a single-node Slurm 23.11 test cluster with job accounting, under WSL2 (Ubuntu 24.04), on a synthetic 3-versus-3 paired-end project. Per-step mode submitted 53 jobs, all of which completed; sacct shows the configured partition, account, QOS, job-name prefix and the two-CPU minimum on every job, and the step placed through rule_resources carried its extra option. Single-allocation mode ran the whole offline part of the same project in one job and a login-node run finished the remainder; a script submitted from another directory logged into the project, a job stopped part-way resumed when submitted again, and the online stage followed by a job submitted with all finished a project. The count matrix and the DESeq2 table of the local, per-step and single-allocation runs are byte-identical. A hangup signal to a per-step run cancelled its 14 queued jobs. A project finished under 0.36.0, upgraded, saved by the interface and given new scheduling settings had nothing to rerun. The revised lock installed in that environment, changing only the two header packages, and solves in a dry run for glibc 2.28, 2.34 and 2.39. CSI indexing under the .bai name was checked with samtools 1.22.1 and pysam on a 600 Mb synthetic sequence. In 0.36.0 the same test cluster ran synthetic FASTQ and count-matrix projects in 54 and 16 jobs with results identical to local runs. No production cluster has been used. The Apptainer image is built and self-tested by the Environment CI workflow only, never run under a cluster’s Apptainer. Kubernetes execution has not been tested.

Search the documentation

Type to search every page.

Figure viewer

100%