I'm writing a pipeline in Nextflow and want to use multiple different conda (existing) environments to avoid inconsistencies in tool installation and for sharing specific modules of the pipeline. The Nextflow docs state that the best practise is to specify the conda environment in the nextflow.config
- see here.. However, the declaration is just process.conda
and seems to apply to all processes rather than being process specific.
I know I can just specify an existing conda environment in each process but I'm trying to adhere to the best practises for portability.
As I haven't been able to find any documentation online for this specific issue, I have tried the following declarations in the config file:
profiles {
conda {
process.conda = "something" // works but single env for all processes
fastqc.conda = "something" // where fastqc is the name of the process - FAILS
process.fastqc.conda = "something" // FAILS
}
}
I have also tried:
profiles {
conda {
process {
withName: fastqc {
process.conda = "something"
}
}
}
}
which also fails with the error: unknown config attribute withName
Interestingly,
process {
conda {
withName: fastqc {
process.conda = "something"
}
}
}
does allow me to run different conda environments for each process but cannot be turned on and off by the -profile
option (because specifying a profile block breaks it).