Hi all! This is my first time using nf-core and wr...
# rnaseq
m
Hi all! This is my first time using nf-core and writing slurm scripts. After successfully running the test profile on my hpc, I am having some issues with the pipeline exiting without (seemingly) any error messages. I am using paired end sequences from one run downloaded from European Nucleotide Archive. The slurm .out file generated appears as though I was looking at it mid-run (for example, the last line is: 29 processes waiting for tasks...). Here is the end of my .nextflow.log file:
Copy code
Oct-01 14:34:32.612 [Actor Thread 13] DEBUG nextflow.container.SingularityCache - Singularity found local store for image=https://depot.galaxyproject.org/sin
gularity/salmon:1.10.1--h7e5ed60_0; path=/home/x-mkogan/nf-core/nf-core-rnaseq-3.14.0/workflow/../singularity-images/depot.galaxyproject.org-singularity-salm
on-1.10.1--h7e5ed60_0.img
Oct-01 14:34:32.615 [Actor Thread 13] DEBUG nextflow.file.SortFileCollector - FileCollector temp dir not removed: null
Oct-01 14:34:32.623 [Actor Thread 17] INFO  nextflow.processor.TaskProcessor - [d1/795685] Cached process > NFCORE_RNASEQ:RNASEQ:QUANTIFY_STAR_SALMON:SALMON_
QUANT (SRR14330018_2)
Oct-01 14:34:32.660 [Task submitter] DEBUG n.executor.local.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Oct-01 14:34:32.661 [Task submitter] INFO  nextflow.Session - [cb/7f8532] Submitted process > NFCORE_RNASEQ:RNASEQ:ALIGN_STAR:BAM_SORT_STATS_SAMTOOLS:SAMTOOL
S_SORT (SRR14330018_2)
Oct-01 14:34:32.671 [Task submitter] DEBUG n.executor.local.LocalTaskHandler - Launch cmd line: /bin/bash -ue .command.run
Oct-01 14:34:32.671 [Task submitter] INFO  nextflow.Session - [b6/1e453e] Submitted process > NFCORE_RNASEQ:RNASEQ:QUANTIFY_STAR_SALMON:SALMON_QUANT (SRR1433
0018_1)
Oct-01 14:34:36.948 [Actor Thread 20] WARN  nextflow.Nextflow - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Biotype attribute 'gene_biotype' not found in the last column of the GTF file!
  Biotype QC will be skipped to circumvent the issue below:
  https://github.com/nf-core/rnaseq/issues/460
  Amend '--featurecounts_group_type' to change this behaviour.
Looking in that last work directory [b6/1e453e], the following file types and folders are present: filtered.gtf, transcripts.fa, dummy_file.txt, Aligned.toTranscriptome.out.bam, and a folder named after the forward gene sequence. Here is the .command.log of that work directory:
Copy code
INFO:    Environment variable SINGULARITYENV_TMPDIR is set, but APPTAINERENV_TMPDIR is preferred
INFO:    Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
Version Info: This is the most recent version of salmon.
# salmon (alignment-based) v1.10.1
# [ program ] => salmon 
# [ command ] => quant 
# [ geneMap ] => { GCF_000001735.4_TAIR10.1_genomic.filtered.gtf }
# [ threads ] => { 6 }
# [ libType ] => { SF }
# [ targets ] => { genome.transcripts.fa }
# [ alignments ] => { SRR14330018_1.Aligned.toTranscriptome.out.bam }
# [ output ] => { SRR14330018_1 }
Logs will be written to SRR14330018_1/logs
Library format { type:single end, relative orientation:none, strandedness:sense }
[2025-10-01 14:34:33.113] [jointLog] [info] setting maxHashResizeThreads to 6
[2025-10-01 14:34:33.113] [jointLog] [info] Fragment incompatibility prior below threshold.  Incompatible fragments will be ignored.
[2025-10-01 14:34:33.113] [jointLog] [info] numQuantThreads = 3
parseThreads = 3
Checking that provided alignment files have consistent headers . . . done
Populating targets from aln = "SRR14330018_1.Aligned.toTranscriptome.out.bam", fasta = "genome.transcripts.fa" . . .
Finally, here is my script. It's my first one so please feel free to correct me on anything! #!/bin/bash #SBATCH -A __ #SBATCH --job-name=__ #SBATCH --output=__ #SBATCH --error=_____ #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --cpus-per-task=12 #SBATCH --mem=72G #SBATCH --time=240000 #SBATCH --mail-type=all export NXF_JVM_ARGS="-Xms2g -Xmx6g" /anvil/projects/specific_dir/nextflow run \ /home/x-mkogan/nf-core/nf-core-rnaseq-3.14.0/workflow \ -profile singularity \ --input input_data.csv \ --outdir /anvil/projects/specific_dir/rnaseq_results \ --gtf ncbi_dataset/data/GCF_000001735.4/genomic_edited.gtf \ --fasta ncbi_dataset/data/GCF_000001735.4/GCF_000001735.4_TAIR10.1_genomic.fna \ --igenomes_ignore \ -resume \ -with-trace /anvil/projects/specific_dir/rnaseq_results/trace.txt \ -with-report /anvil/projects/specific_dir/rnaseq_results/report.txt I attempted to increase the heap memory in this last run for the same result but did not have that line previously. If anyone has any tips or info, please let me know!
t
Correct me if I am wrong, but it looks like you are submitting everything to one node, where the pipeline is then running all of its processes. On a cluster this is not efficient or fast -- what you want to do is submit the main Nextflow job (which needs 1CPU and 2-4 GB) and have that farm the processes out to the compute nodes. For that to work, you'll need a profile or a config file, have a look at the info here (some may be a bit dated, but the general principles still apply) and let us know if you have questions. Regarding your current run, are you sure the pipeline is done? Because from what you show, it looks like it was still running. Have a look at the
.nextflow.log
in the dir where you started the pipeline -- it should say "Pipeline completed" (either successfully or unsuccessfully) near the bottom. Also check if the job you submitted has completed (e.g. with
squeue --me
and/or
sacct -j <jobnum>
). If it was killed by SLURM, the log likely will not show "completed".
m
Hi Thomas! Thank you so much for your detailed response. You are right, I am running everything on one node. I was following this example as I am trying to run this on Anvil's cluster. As for this current run, that's the weird thing! The snippet from the .nextflow.log file I shared (from the launch directory) was the end of the file. I do think slurm killed the job because I got an email with the subject Slurm Job_id=14015154 Name=rnaseqtest Failed, Run time 000027, FAILED, ExitCode 1 but if I try to see my past jobs with sacct or squeue I get an empty list. I am clearly not configuring this right and I read through the links you sent, thank you. I have looked into the institutional profiles and unfortunately my institution does not have one. I read the tutorial on how to configure/write my own but felt a bit out of my element. I do have a few questions as this is my first time using an hpc. I thought I had to write this slurm script and use sbatch to run it so that I wouldn't run a big job on the head node. Instead, do I need to just edit the nextflow.config file to specify the executor and queue and then just wrap the nextflow run command in a script and run it? and Nextflow will handle submitting jobs/tasks as needed? Thank you again for your help!
t
sacct -j 14015154
(with additional options to see more) should show that job. With
-o JobID,JobName,AllocCPUS,MaxRSS,ReqMem,Start,End,Timelimit,State,ExitCode
you can see if it was pushing memory or time limits, but I wouldn't waste too much time on it. That example you followed is the result of someone trying to be helpful without a full understanding how things work. I would look at some SLURM clusters in https://nf-co.re/configs to see which settings could be useful and make a config file (e.g.
anvil.config
), then run with
-c anvil.config
. Note that if you want to set any parameters for that (
params {}
clauses or
params.something
), it is safer to put those into a JSON or YAML file and use that with
-params-file
. Alternatively, if you installed the pipeline as in your instructions, you could make a an
anvil.config
with everything in it and then edit the installation to add you file to the profiles, so you can just use
-profile anvil
. Definitely make sure your config sets the
executor = slurm
in the
process
scope, and make sure that the
resourceLimits
are set to something reasonable, i.e. the max you can use on most nodes of your cluster. If you need to select a partition, you can set
queue
, and things like
--qos
or other special
sbatch
parameters can go into
custerOptions
(but your examples shows none of these). Once you have it running to your satisfaction (in your script, use only 1-2 CPUs and 2-4 GB of RAM, not 12/72GB), then send that config to your IT people in charge of the knowledge base, so that anyone else using it may benefit. If they are interested, they (or even you!) can make a profile and submit it to https://github.com/nf-core/configs (maybe discuss in #configs first), so it is "built into" all nf-core pipelines (if locally installed, you need to install with the configs --
-c yes
, I think).
m
@Thomas Danhorn Thank you so much for your help! I feel a bit out of my element but hopefully I can figure this out soon!
t
You are welcome. I know, it is a bit much all at once, but you can start with something very basic and add to it if necessary:
Copy code
process {
    executor = SLURM
    resourceLimits = [
        cpus: ??,       // use whatever the maximum is for a node (at least 12, according to your original script)
        memory: ??.GB,  // maximum RAM a job can ask for, at least 72.GB
        time: 24.h      // not sure what your limit is, adjust accordingly
    ]
}
Put that in
anvil.config
and use as
nextflow run nf-core/rnaseq -c /path/to/anvil.config --input ...
. If you have questions or run into issues, feel free to ask. 🤞
❤️ 1