Skip to content

Add mifaser#11643

Open
vinisalazar wants to merge 11 commits into
nf-core:masterfrom
vinisalazar:add_mifaser
Open

Add mifaser#11643
vinisalazar wants to merge 11 commits into
nf-core:masterfrom
vinisalazar:add_mifaser

Conversation

@vinisalazar
Copy link
Copy Markdown
Contributor

Description

Adds mifaser for functional annotation of metagenomic reads via EC number assignment (DOI: 10.1093/nar/gkx1209).

Work towards nf-core/funcprofiler#52, nf-core/funcprofiler#58

Notes on container

The bioconda package (mifaser=1.60) and the tool's own container (ghcr.io/vdblab/mifaser:1.64d) have incompatible --databasefolder semantics:

  • 1.60 (bioconda/bromberglab): resolves --databasefolder relative to the Python package install directory (os.path.join(pkg_dir, 'database', args.databasefolder)), making it unusable with a user-provided database path unless an absolute path is passed.
  • 1.64d (vdblab): resolves the flag as a direct filesystem path, which is the expected behaviour.

This module uses ghcr.io/vdblab/mifaser:1.64d to work around the 1.60 bug. This fails the container_links lint check. A proper fix would require either:

  1. A biocontainers-compatible release of mifaser ≥ 1.64, or
  2. A patch to the 1.60 bioconda package.

Currently the mifaser code is available on BitBucket: https://bitbucket.org/bromberglab/mifaser/ and version 1.64 is available, but the bioconda recipe points to the PyPI release which is still 1.60

@nickp60 do you think we could set the bioconda recipe to get the tarball from a bitbucket tag endpoint instead? For example, a link from https://bitbucket.org/bromberglab/mifaser/downloads/?tab=tags

vinisalazar and others added 5 commits May 12, 2026 14:06
Co-authored-by: Nick Waters <nickp60@gmail.com>
Co-authored-by: Mirae Baichoo <miraep8@gmail.com>
Co-authored-by: Nick Waters <nickp60@gmail.com>
Co-authored-by: Mirae Baichoo <miraep8@gmail.com>
Co-authored-by: Nick Waters <nickp60@gmail.com>
Co-authored-by: Mirae Baichoo <miraep8@gmail.com>
Co-authored-by: Nick Waters <nickp60@gmail.com>
Co-authored-by: Mirae Baichoo <miraep8@gmail.com>
Co-authored-by: Nick Waters <nickp60@gmail.com>
Co-authored-by: Mirae Baichoo <miraep8@gmail.com>
@vinisalazar vinisalazar requested review from miraep8 and nickp60 May 14, 2026 01:25
@vinisalazar vinisalazar added the WIP Work in progress label May 14, 2026
@vinisalazar vinisalazar marked this pull request as draft May 14, 2026 01:25
@nickp60
Copy link
Copy Markdown

nickp60 commented May 14, 2026

Thanks @vinisalazar! I emailed the authors of Mifaser to ask them to push a new version to pypi. The Bioconda folks want stuff coming direct from Pypi so their recipe updater bots can keep things current.

In the meantime, could you maybe set the command to prepend the database with $PWD in the script section instead so it has an absolute path to work with?

And just FYI their is an official docker container https://hub.docker.com/r/bromberglab/mifaser/tags. I built the ghcr.io/vdblab/mifaser:1.64d container because I needed version tagged versions rather than the "latest" or "dev" tags.

Use quay.io/biocontainers/mifaser:1.60--pyh106432d_0 instead of
ghcr.io/vdblab/mifaser:1.64d. Prepend \$PWD to staged db path so
mifaser 1.60 resolves --databasefolder as absolute path rather than
relative to its Python package directory.

Co-authored-by: Nick Waters <nickp60@gmail.com>
@vinisalazar
Copy link
Copy Markdown
Contributor Author

vinisalazar commented May 15, 2026

Thanks @nickp60, I ended up going with 1.60 and Biocontainers (instead of the official Docker image you linked) as that is a requirement from the linter. Biocontainers consumes from Bioconda so we will need an update to the recipe in order to get 1.64. I added the $PWD fix you suggested.

@vinisalazar
Copy link
Copy Markdown
Contributor Author

Also, on the PyPI requirement for Bioconda: completely reasonable, but while there isn't an automated routine for the mifaser BitBucket repo to push new tags to PyPI, I'd argue that in the meantime, using the BitBucket tags would make more sense, even if it requires manually updating the recipe (the lack of the automated routine I mentioned already implies the need for manual update step)

@vinisalazar vinisalazar marked this pull request as ready for review May 15, 2026 04:26
@vinisalazar vinisalazar added Ready for Review and removed WIP Work in progress labels May 15, 2026

input:
tuple val(meta), path(reads)
path db
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need to use the database for every incoming sample ( sample 1, sample 2, etc.), you need to use each : https://docs.seqera.io/nextflow/process#input-repeaters-each
Otherwise, the process will only run for the first incoming sample and not for potentially more


input:
tuple val(meta), path(reads)
path db
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path db
each path(db)

@nickp60
Copy link
Copy Markdown

nickp60 commented May 15, 2026

Also, on the PyPI requirement for Bioconda: completely reasonable, but while there isn't an automated routine for the mifaser BitBucket repo to push new tags to PyPI, I'd argue that in the meantime, using the BitBucket tags would make more sense, even if it requires manually updating the recipe (the lack of the automated routine I mentioned already implies the need for manual update step)

They already pushed the version so you should be good to go with using official pypi/conda/biocontainers 1.64!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants