Hi, first, thanks so much for creating and maintai...
# rnaseq
r
Hi, first, thanks so much for creating and maintaining nf-core 🙂 I've been using the RNAseq pipeline without too many issues but am now having missing tmp files problems with umi_tools , here are the error messages that I am getting:
Copy code
Error executing process > 'NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP (BiA_rep3)'

Caused by:
  Process `NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP (BiA_rep3)` terminated with an error exit status (1)


Command executed:

  PYTHONHASHSEED=0 umi_tools \
      dedup \
      -I BiA_rep3.sorted.bam \
      -S BiA_rep3.umi_dedup.transcriptome.sorted.bam \
      -L BiA_rep3.umi_dedup.transcriptome.sorted.log \
       \
      --paired \
      --unpaired-reads=discard --chimeric-pairs=discard --method='unique' --random-seed=100
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_RNASEQ:RNASEQ:BAM_DEDUP_UMI_STAR:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP":
      umitools: $( umi_tools --version | sed '/version:/!d; s/.*: //' )
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  INFO:    Environment variable SINGULARITYENV_TMP is set, but APPTAINERENV_TMP is preferred
  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
  WARNING: While bind mounting '/shared:/shared': destination is already in the mount point list
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/slurm_rcoux_61729854.tmp/tmp5jr86ohm'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/local/bin/umi_tools", line 11, in 
      sys.exit(main())
    File "/usr/local/lib/python3.9/site-packages/umi_tools/umi_tools.py", line 61, in main
      module.main(sys.argv)
    File "/usr/local/lib/python3.9/site-packages/umi_tools/dedup.py", line 378, in main
      pysam.sort("-o", sorted_out_name, "-O", sort_format, "--no-PG", out_name)
    File "/usr/local/lib/python3.9/site-packages/pysam/utils.py", line 70, in __call__
      retval, stderr, stdout = _pysam_dispatch(
    File "pysam/libcutils.pyx", line 425, in pysam.libcutils._pysam_dispatch
    File "pysam/libcutils.pyx", line 422, in pysam.libcutils._pysam_dispatch._collect
  FileNotFoundError: [Errno 2] No such file or directory: '/tmp/slurm_rcoux_61729854.tmp/tmp5jr86ohm'

Work dir:
  /shared/ifbstor1/projects/nbl_nc_o4/RNAseq_RX/JCG/work/3d/5f8b398c9984f5eda69f36810fc168
resuming the pipeline gives the same errors, I can cd to the work diretory and sbatch .command.sh that will produce the dedup bam files (but they're not indexed so resuming the pipeline after that fails again - I have several samples so I'd like to run them all simultaneously). I am running 3.18.0 / nextflow 24.04.4 on a slurm hpc (these were the versions of my last successful run sometimes in the spring - I'm using the same fastqs to be sure) - also tried running with 3.21.0 / 25.04.7 to no avail my command is: export NXF_SINGULARITY_HOME_MOUNT=true (same error without) nextflow run \ nf-core/rnaseq -r 3.18.0 \ --input samplesheet.csv \ --outdir results \ --gtf genome/Mus_musculus.GRCm39.103.gtf \ --fasta genome/Mus_musculus.GRCm39.dna.primary_assembly.fa \ --transcript_fasta genome/genome.transcripts.fa \ --star_index genome/index/star/ \ --rsem_index genome/rsem/ \ --with_umi \ --umitools_grouping_method=unique \ --umitools_extract_method "regex" \ --umitools_bc_pattern "(?P<discard_1>.*)(?P<discard_2>ATTGCGCAATG){s<=2}(?P<umi_1>.{8})(?P<discard_3>G{3,5}).*" \ -profile ifb_core \ I attached full error and nexflow.log. Could you please let me know if I'm doing something wrong or if you have any idea what could cause the issue? Any help ot feedback is appreciated. Many thanks in advance,
m
I do not see a reason, why the actual error should be anything but what is said in the output: The file in
/tmp
went missing while it was still in use by the pipeline. A somewhat random guess is, that your cluster is actually set up with a different location than
/tmp
that should be used for temporary data - like
/scratch
. Subsequently, the automatic cleanup started aggressively removing stuff when the size grew too big for its capacity. Please consult the manuals or admins of your cluster check if that may be the case. If you indeed should use a different path for storing temporary data, you need to update the
ifb_core
profile to reflect this - #configs is the place to ask for help along this line. If I compare our profile with that of your institution, I see for example no explicit specification of the temporary directory. In the Uppmax profile, we for example have
Copy code
singularity {
    enabled      = true
    envWhitelist = 'SNIC_TMP'
}

process {
    ….
    // Use node local storage for execution.
    scratch        = '$SNIC_TMP'
}
because on our cluster, the environment variable
$SNIC_TMP
defines a specific temporary directory to use.
r
great I will get in touch with my cluster admins thanks
well a simple TMPDIR="/workdo/tmp/" TMP="${TMPDIR}" mkdir -p "${TMPDIR}" export TMPDIR TMP at the beginning of my bash script did the trick, the errors were not about tmp space running out so I assumed it wasn't the case. Apologies I could have figured this out myself 😅 thanks again for the help
m
No worries, great to hear that it worked. If you think that there is a suitable location that can be generalized for your cluster's setup, I encourage you to adapt the config profile as well, so others won't have to go through your hassle again.
p
Setting those for the nextflow monitoring process is actually likely to be unrelated to it working. If you didn't run with work directory in
/tmp
(which is typically not shared and so not a good place for a work directory in a cluster setup), it was likely a transient error and just rerunning solved it (either because your job ended up on a healthy node or because the problem was gone from the previous, or it was a random error that only affected your job somehow).