Skip to content

Nextflow is publishing output files in wrong directory #6627

@henryone0910

Description

@henryone0910

Bug report

My output files should be published in their right directory. But somehow, some of them was published in random directory.

Expected behavior and actual behavior

For instances, the syntax of a process is:
publishDir: "${params.outdir}/trimming", mode: 'copy'

Said that I have an example output:
output:
tuple val(sample), file("{sample}_trimmed_R1.fastq.gz"), file("{sample}_trimmed_R2.fastq.gz"), emit: trimmed_ch
I had 10 paired-end fastq samples as inputs for this process. Then it must publish 10 paired-end trimmed fastq to folder "trimming", as what we expected. But the actual result was that 9 output files were in their right destination, the remainder of them was published in somewhere in other process's directory.

Steps to reproduce the problem

The problem occured regardless of the first run or rerun.

Program output

I didn't have the problem of program output, nextflow often publish some files that didn't follow the pattern was set before.

Environment

  • Nextflow version: 24.10.2
  • Java version: openjdk 17.0.10-internal 2024-01-16
  • Operating system: linux system.
  • Bash version: (use the command $SHELL --version)
    GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)

Additional context

(Add any other context about the problem here)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions