Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set publishDir mode based on config #21

Closed
kelly-sovacool opened this issue Aug 22, 2023 · 3 comments
Closed

set publishDir mode based on config #21

kelly-sovacool opened this issue Aug 22, 2023 · 3 comments
Labels
enhancement New feature or request LowPriority
Milestone

Comments

@kelly-sovacool
Copy link
Member

kelly-sovacool commented Aug 22, 2023

It would be handy to set the publishDir mode based on a parameter, e.g.

in the process:

publishDir "$params.outdir/$sample_id", mode: "$params.filePublishMode"

in nextflow.config:

params {
    filePublishMode: 'copy'
    adapters = '/opt2/TruSeq_and_nextera_adapters.consolidated.fa'
}

However, this does not work

ERROR ~ Error executing process > 'FASTQC_RAW (SRR1822157_1)'

Caused by:
  No enum constant nextflow.processor.PublishDir.Mode.NULL


 -- Check '.nextflow.log' file for details

The docs state that mode must be a string literal, i.e. it cannot be a parameter.
The Nextflow team is aware and appears to have plans to make it possible to set the mode and other publishDir options in the config file. Once they implement it we can update our usage too.

See nextflow-io/nextflow#4186

@kelly-sovacool kelly-sovacool added the enhancement New feature or request label Aug 22, 2023
kelly-sovacool added a commit that referenced this issue Aug 22, 2023
@vinegang
Copy link

vinegang commented Aug 24, 2023

Give this a try
filePublishMode = "copy"

@kelly-sovacool
Copy link
Member Author

that fixed it, thanks @vinegang!

@kelly-sovacool
Copy link
Member Author

fixed by 79eefdf

@kopardev kopardev added this to the 2023w35_0901 milestone Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LowPriority
Projects
None yet
Development

No branches or pull requests

3 participants