nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Ignore conda directive when running with stubs

Open nh13 opened this issue 3 years ago • 7 comments
trafficstars

I would like the option to ignore any conda directive with nextflow run -stub .. I want rapid feedback on the plumbing and data flow of my pipelines, and don't care that the conda environments exist or are activated. Is there a way to ignore the conda directive in process definitions when I run nextflow run -stub .?

nh13 avatar Jul 13 '22 00:07 nh13

NB: I see -without-docker and -without-podman, so I am hoping for a -without-conda.

nh13 avatar Jul 13 '22 00:07 nh13

I wouldn't be opposed to the best practice solution to be (1) moving the conda directive out of each process definition, then (2) specifying a conda profile where the per-process conda environment is specied, and finally (3) specifying -profile conda to utilize conda environments. To ignore conda environments, just have a dummy "test" profile that's empty. Is this a valid work around?

nh13 avatar Jul 13 '22 00:07 nh13

Yeah, in the past we discussed the convenience to add -with/without-conda but was decided no. May be we have to reconsider this.

pditommaso avatar Jul 13 '22 12:07 pditommaso

I wouldn't be opposed to the best practice solution to be (1) moving the conda directive out of each process definition, then (2) specifying a conda profile where the per-process conda environment is specied, and finally (3) specifying -profile conda to utilize conda environments. To ignore conda environments, just have a dummy "test" profile that's empty. Is this a valid work around?

This approach seems to be standard among the nf-core pipelines, for example in rnaseq:

https://github.com/nf-core/rnaseq/blob/89bf536ce4faa98b4d50a8ec0a0343780bc62e0a/nextflow.config#L140-L147

bentsherman avatar Jul 13 '22 15:07 bentsherman

I've added a PR implementing this. See #3073. tagging @mribeirodantas @christopher-hakkaart for info.

Now @drpatelh and @ewels will say that I'm a bad guy because they asked it ages ago #749.

pditommaso avatar Jul 28 '22 08:07 pditommaso

longtime-titanic

ewels avatar Jul 28 '22 09:07 ewels

pditommaso avatar Jul 28 '22 09:07 pditommaso

Solved by https://github.com/nextflow-io/nextflow/pull/3073.

pditommaso avatar Oct 11 '22 12:10 pditommaso