4

I am trying to run a nexflow pipeline on some data via the Linux command line, but when I do so, it fails because it fails to create the Conda environment.

It looks like it tries to run the pipeline anyway, despite the environment not being set up properly, and so generates an error message. Any help would be much appreciated. Here is the error message:

Error executing process > 'my_process (1)'
Caused by:
  Failed to create Conda environment
  command: conda env create --prefix /my_file_path-6bf38a923b48a255f96ea3d66d372e6c --file /my_file_path/environment.yml
  status : 143
  message:

Here is my environment.yml file:

name: pipeline_name
channels:
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - filtlong
  - blast==2.5
  - minimap2 
  - samtools 
  - pysam 
  - pandas 
  - matplotlib 
  - pysamstats
  - seaborn 
  - medaka
  - bedtools
  - bedops
  - seqtk
  - bioawk
  - sniffles

user8144422
  • 101
  • 1
  • 8
  • This is [a `nextflow` error message](https://github.com/nextflow-io/nextflow/blob/e4529d451abb64cded59258f5a2db15bffee27d7/modules/nextflow/src/main/groovy/nextflow/conda/CondaCache.groovy#L283). If you would like help from Conda users, I'd suggest including the YAML file for the environment trying to be created. – merv Dec 20 '20 at 19:16
  • Thanks for adding the YAML. It creates fine for me on **osx-64** using `conda env create -f env.yaml`. I do have minor notes (not addressing the problem): 1) the official Bioconda channel order should be `conda-forge` then `bioconda` then `defaults`; 2) Conda YAML, unlike Pip requirements files, uses single `=` when not exactly specifying; the `==` should only be used when fully specifying version, e.g., `blast==2.5.0`. For now, this doesn't impact things, but if it was `bedtools==2.29` this would lead you to getting `2.29.0`, whereas `bedtools=2.29` will let you get `2.29.3`. – merv Dec 20 '20 at 23:51
  • 1
    Verified `conda env create -f env.yaml` also works fine on **linux-64**. So it's not an issue with Conda solving for the environment. – merv Dec 21 '20 at 00:38
  • Do you get a more descriptive error message in your `.nextflow.log`? It would be great if you could attach it above. Are you able to create the environment yourself on the machine that the job lands on? – Steve Dec 21 '20 at 03:31
  • 2
    Thanks for the help all. This was solved by re-ordering the priority of channels that each program was being downloaded from with Conda. – user8144422 Dec 21 '20 at 19:39

1 Answers1

0

Not an answer to this question, but if you get a similar failure with a different exit status (120, not 143), try the fix in this thread. Reposting it here:

conda environment from file not working using nextflow · Issue #1081 · nextflow-io/nextflow: https://github.com/nextflow-io/nextflow/issues/1081

pditommaso commented on Mar 18, 2019
The 120 exit status signals that it was reached the creation timeout. Try increasing it, eg.

conda.createTimeout = '1 h'

Timur Shtatland
  • 12,024
  • 2
  • 30
  • 47