I have a problem with <https://github.com/nf-core/...
# help
d
I have a problem with https://github.com/nf-core/ampliseq/pull/948 I added a tool (I thought as usual) and I get for CI tests
ERROR ~ Failed to publish file: /home/runner/_work/ampliseq/ampliseq/~/tests/c9d5acf2cf81a683aba1961b3c3d778c/work/50/8f8e733de5a1fc60d475327ab47ec3/decontaminated.tsv; to: /home/runner/_work/ampliseq/ampliseq/~/tests/c9d5acf2cf81a683aba1961b3c3d778c/output/decontam/decontaminated.tsv [copy] -- See log file for details
locally it works all fine. I used here in slack the search function & googled it but didnt find a solution. Whats unusual might be that I use
ch_decontam_metadata.subscribe{ it -> if(it.countLines() > 1) file(it).copyTo("${params.outdir}/decontam") }
(in workflows/ampliseq.nf ) and later (via config/modules.config):
Copy code
publishDir = [
            path: { "${params.outdir}/decontam" },
            mode: params.publish_dir_mode,
            saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
        ]
maybe those two pulishing into the same directory causes the error?
Update: with singularity it works, with docker I can reproduce it also locally, that makes testing easier!
It appears like
file(it).copyTo("${params.outdir}/decontam") }
followed by a process that uses
publishDir
to copy into the same directory fails with docker but not singularity with
ERROR ~ Failed to publish file:
. I didnt find that issue in the nextflow docs or online. Is that an nf-core template permission bug for docker? A nextflow bug? Or did I use
copyTo
inappropriate?