nf-core / ampliseq

Amplicon sequencing analysis workflow using DADA2 and QIIME2
https://nf-co.re/ampliseq
MIT License
188 stars 119 forks source link

nf-core/ampliseq with conda - change bioconductor-biostrings #686

Closed ulrichmarkus closed 10 months ago

ulrichmarkus commented 10 months ago

Description of the bug

Two small issues when using conda as tool for the pipeline ampliseq:

package biostrings

When I run the standard test command with conda for nf-core/ampliseq the pipeline finishes with an error at the process NFCORE_AMPLISEQ:AMPLISEQ:FILTER_SSU. The error indicated that it couldnt resolve a new conda environment containing the package biostrings. The bioconductor package biostrings is loaded with bioconductor-biostrings instead of bioconductor::biostrings. Therefore you need to change line 5 in the file .nextflow/assets/nf-core/ampliseq/modules/local/filter_ssu.nf from conda "bioconductor::biostrings=2.58.0" to conda "bioconductor-biostrings=2.58.0".

That worked for me at least.

Command used and terminal output

# command
nextflow run nf-core/ampliseq -r 2.7.1 -profile test,conda --outdir ~/test
.
.
.

# error
Jan-10 17:25:35.973 [Actor Thread 132] DEBUG nextflow.Session - Session aborted -- Cause: java.lang.IllegalStateException: Failed to create Conda environment
  command: conda create --mkdir --yes --quiet --prefix /mnt/localdata/homes/home/work/conda/env-856a0caae6be6f7049bb6d74c7579578 bioconductor::biostrings=2.58.0
  status : 1
  message:
    Collecting package metadata (current_repodata.json): ...working... failed

    UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel bioconductor <https://conda.anaconda.org/bioconductor>

    The channel is not accessible or is invalid.

    You will need to adjust your conda configuration to proceed.
    Use `conda config --show channels` to view your configuration's current state,
    and use `conda config --show-sources` to view config file locations.

package multiqc

When I run the standard test command with conda for nf-core/ampliseq the pipeline finishes with an error at the process NFCORE_AMPLISEQ:AMPLISEQ:MULTIQC . The error indicated that it couldnt find a module imp. The imp issue came with the update from python to 3.12 (see issue https://github.com/MultiQC/MultiQC/issues/2112) When updating line 4 in the file .nextflow/assets/nf-core/ampliseq/modules/nf-core/multiqc/main.nf from conda "bioconda::multiqc=1.15" to conda "bioconda::multiqc=1.17" it should work again.

Command used and terminal output

# command
nextflow run nf-core/ampliseq -r 2.7.1 -profile test,conda --outdir ~/test
.
.
.

# error
Jan-11 16:19:31.365 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_AMPLISEQ:AMPLISEQ:MULTIQC'

Caused by:
  Process `NFCORE_AMPLISEQ:AMPLISEQ:MULTIQC` terminated with an error exit status (1)

Command executed:

  multiqc \
      --force \
       \
      --config multiqc_config.yml \
       \
      .

  cat <<-END_VERSIONS > versions.yml
  "NFCORE_AMPLISEQ:AMPLISEQ:MULTIQC":
      multiqc: $( multiqc --version | sed -e "s/multiqc, version //g" )
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  Traceback (most recent call last):
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/bin/multiqc", line 6, in <module>
      from multiqc.__main__ import run_multiqc
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/__init__.py", line 16, in <module>
      from .multiqc import run
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/multiqc.py", line 30, in <module>
      from .plots import table
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/plots/table.py", line 9, in <module>
      from multiqc.plots import beeswarm, table_object
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/plots/beeswarm.py", line 9, in <module>
      from multiqc.plots import table_object
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/plots/table_object.py", line 9, in <module>
      from multiqc.utils import config, report
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/multiqc/utils/report.py", line 18, in <module>
      import lzstring
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/lzstring/__init__.py", line 11, in <module>
      from future import standard_library
    File "/mnt/localdata/homes/home/work/conda/env-10d4fae4844a755261b1f32805a44b21/lib/python3.12/site-packages/future/standard_library/__init__.py", line 65, in <module>
      import imp
  ModuleNotFoundError: No module named 'imp'

Work dir:
  /mnt/localdata/homes/home/work/30/45a7e25e55c1bbf9cf7badb7ec554f

Relevant files

No response

System information

No response

d4straub commented 10 months ago

Thanks for reporting! Indeed, running with conda is not as good monitored as singularity (I use that when developing) and docker (github tests), therefore some errors slip through occasionally.

About multiqc: thanks, thats already updated in the dev branch, but didnt know that it made actual problems. I'll plan a release soonish so that this is resolved.

d4straub commented 10 months ago

Fixed in the dev banch, so I close that issue now.