Skip to content

collectFile Error - "no such file or directory" #4559

Discussion options

You must be logged in to vote

The problem is I had a newline in the closure (csv_file + '\n') which I had copied from the nextflow docs example, but that example was operating on strings not files. Removing that fixed it:

workflow DEBUG {
    input = [ [id: 'sample1', rep: 1],
              [id: 'sample1', rep: 2],
              [id: 'sample2', rep: 1],
              [id: 'sample2', rep: 2] ]
    WRITE_CSV( input ).csv
        .collectFile(storeDir: "output/") { meta, csv_file ->
            [ "${meta.id}.csv", csv_file ]
        }
}

Thanks @slsevilla for spotting the error!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kelly-sovacool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant