Skip to content

Feature/euks support - #104

Open
KateSakharova wants to merge 27 commits into
devfrom
feature/euks-support
Open

KateSakharova wants to merge 27 commits into
devfrom
feature/euks-support

Conversation

@KateSakharova

@KateSakharova KateSakharova commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Working on #40
Current steps order in GENOMESUBMIT:

  1. coverage - unchanged
  2. taxonomy assignment - unchanged
  3. domain decision added - meta.domain assigned to arc/bac/euk depending on taxa
  4. RNA detection
  • trnascan added argument ext.args = { [euk: '-E', arc: '-A', bac: '-B'].get(meta.domain, '-G') } what set to use depending on domain
  • barrnap: changed run argument to [meta, fasta, meta.domain]
  • count_rna script changed to support different domain rna sets
  1. Evaluation separated into prok and euk subwfs
  • added argument eukaryotic_completeness_tool. Default: eukcc. If that arg would be set to "busco" then BUSCO would be used as completeness. Contamination always set with EukCC. If contamination is provided by user - it is not assigned by pipeline. Stats tools are concatenated with ;
  • added db support as link to directory or tar.gz (took idea from nf-core/mag).

In addition:

  • Added tests for rna-detection and -stub test for genome_evaluation because it requires databases
  • Updated docs

Tests:

  • Added eukaryotic genome to no_rna test. Now that test is running 2 genomes.

  • Added test for euk_quality with small eukcc_db created only for fungi (but removed it from GA because DB is still big)

  • Removed any ENA interaction in tests (REGISTERSTUDY|SUBMIT|CREATE_MANIFESTS):

    • mag_no_rna_presence.nf.test
    • mag_no_taxonomy.nf.test
    • mag_no_quality_euk.nf.test
    • mag_no_coverage_pe.nf.test
    • mag_no_coverage_se.nf.test
  • Renamed those tests to no_ena_queries to better reflect changes

Additionally:

TODO:
Check with ENA about RNA rules for euks

@KateSakharova
KateSakharova marked this pull request as draft October 14, 2026 17:06
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit bae8270

+| ✅ 272 tests passed       |+
#| ❔   9 tests were ignored |#
!| ❗   4 tests had warnings |!
Details

❗ Test warnings:

  • nextflow_config - Config manifest.version should end in dev: 1.0.0
  • readme - README contains the placeholder zenodo.XXXXXXX. This should be replaced with the zenodo doi (after the first release).
  • pipeline_todos - TODO string in README.md: Add citation for pipeline after first release. Uncomment lines below and update Zenodo doi and badge at the top of this file.
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here

❔ Tests ignored:

  • files_exist - File is ignored: conf/igenomes.config
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_exist - File is ignored: .github/workflows/linting_comment.yml
  • nextflow_config - Config variable ignored: params.input
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: assets/nf-core-seqsubmit_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-seqsubmit_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-seqsubmit_logo_dark.png
  • container_configs - container_configs

✅ Tests passed:

Run details

  • nf-core/tools version 4.1.0
  • Run at 2026-10-30 16:23:19

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

❌ nf-test failed with latest Nextflow version

Note

Tests with Nextflow's latest version failed but it will not cause a CI workflow failure.
Please check if the failure is expected with newer (edge-)releases of Nextflow or if it needs fixing.

  • ❌ docker | latest-everything | Shard 2/7

See the full run for details.

Comment thread conf/test_mag_no_rna_presence.conf Outdated
@KateSakharova
KateSakharova requested a review from dezordi October 20, 2026 11:53

@dezordi dezordi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice work Kate! I put some suggestions and questions, and also I would like to known if you have you considered, at any point, keeping genome_evaluation as two separate subworkflows (prok and euks)?

I know there are some functions shared between the two, and keeping them together allows for code reuse, however, in my opnion, this makes long-term maintenance more difficult. It also means that submissions for prokaryotes might receive parameters intended for eukaryotes, and vice versa.

Finally, I noticed that in cases where eukcc fails to estimate completeness and contamination, the workflow continues and attempts to submit genomes with NA values ​​for these metrics, is that correct? Perhaps we should consider a way to exclude such genomes from the submission pipeline while keeping a record of them in the logs.

Comment thread modules/local/eukcc/single/main.nf Outdated
Comment thread nextflow_schema.json Outdated
Comment thread nextflow.config Outdated
Comment thread workflows/genomesubmit.nf Outdated
Comment thread workflows/genomesubmit.nf Outdated
Comment thread docs/methods.md

Before classification, input FASTA files are normalized to a `.fasta` suffix by `RENAME_FASTA_FOR_CATPACK`. Classification is then run in bin mode (`CAT_pack bins`, followed by `CAT_pack add_names`).

Database input is taken from `--cat_db` when provided; otherwise the workflow builds CAT_pack database from NCBI non-redundant protein database (`nr`). See [CAT_pack documentation](https://github.com/MGXlab/CAT_pack#downloading-preconstructed-database-files). There are two options available: `nr` - NCBI non-redundant protein database and `gtdb` (Genome Taxonomy Database (GTDB) proteins). We use NCBI proteins because ENA supports only NCBI format of taxonomy for submission. The resulting classification table is parsed, and the lineage field is written to `NCBI_lineage`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

when we run CAT for euks, it uses prodigal which can raise this error for long contigs hyattpd/Prodigal#54

This could entail a limitation on the submission of eukaryotic genomes. I see three alternatives here:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good point!
I wanted to run "universal" tool and then make a decision. If I will run eukcc on prokaryotes it might give weird result, no?
I also thought to run metaeuk separately and pass those proteins to eukcc (would it work with --AA?) and to cat_pack. But ideally we also should not run metaeuk for proks? :confuced:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes, it’s a complicated issue... EukCC would return results with NA metrics for proks, and MetaEuk would require a reference database for "easy predict" (since it’s only for taxonomy, I imagine the SCMG database from EukCC might work), but it wouldn’t be ideal for prokaryotes either...

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It might be worth bringing this adjustment into the nf-core module, so it can also be tested across other executors and also avoid this bug in other pipelines

Comment thread subworkflows/local/genome_evaluation/tests/main.nf.test Outdated
Comment thread subworkflows/local/genome_evaluation/tests/main.nf.test Outdated
Comment thread subworkflows/local/genome_evaluation/tests/main.nf.test Outdated
Comment thread conf/test_mag_no_quality_euk.conf Outdated
Comment thread conf/test_mag_no_rna_presence.conf Outdated
@github-actions

Copy link
Copy Markdown

Warning

Newer version of the nf-core template is available.

Your pipeline is using an old version of the nf-core template: 4.1.0.
Please update your pipeline to the latest version.

For more documentation on how to update your pipeline, please see the Synchronisation documentation.

@KateSakharova
KateSakharova marked this pull request as ready for review October 26, 2026 21:03
Comment thread workflows/genomesubmit.nf Outdated
Comment thread workflows/genomesubmit.nf Outdated
Comment thread workflows/genomesubmit.nf Outdated
Comment thread workflows/genomesubmit.nf Outdated
Comment thread workflows/genomesubmit.nf
Comment thread nf-test.config Outdated
Comment on lines +12 to +18
// ignore euk_mags_quality assessment because Eukcc DB is big for GA
// ignore genome_evaluation_proks test because checkm2 container is too big
ignore = [
'modules/nf-core/**/tests/*',
'subworkflows/nf-core/**/tests/*',
'tests/mag_no_quality_euk_without_ena_interaction.nf.test',
'subworkflows/local/genome_evaluation_proks/tests/*'

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.

Nice! I never knew it can be done like this

Comment thread assets/schema_input_assembly.json Outdated
"type": "string",
"default": null,
"description": "Tool, including version, that was used to calculate completeness and contamination, e.g. CheckM2_v1.0.0",
"description": "Tool, including version, that was used to calculate completeness and contamination, e.g. CheckM2_v1.0.0. Several tools are separated by `;`, e.g. busco_v6.1.0;eukcc_v2.2.0. If the pipeline runs additional tools for this genome, they are appended to the provided value.",

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.

Ouch, I wonder if this can cause weird-looking metadata 🤔
Probably not, because the only case when we append is when eukcc is calculated in addition to busco, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

or it can be the case when user has completeness and specified the tool, but no contamination. We will have to calculate contamination and basically leave both tools in metadata

],
"default": null,
"description": "Presence or absence of the 23S, 16S, and 5S rRNA genes and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: 'true' or 'false'",
"description": "Presence or absence of the 23S, 16S, and 5S rRNA genes (prokaryotes) or the 28S, 18S, 5.8S and 5S rRNA genes (eukaryotes) and at least 18 tRNAs. This is used for MISAG/MIMAG assembly quality classification. Options: true or false.",

@ochkalova ochkalova Oct 27, 2026 •

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.

I have no idea if it's really specified in mimag for euks. ENA explains it only for proks 🤔
We need to ask them next Monday

Image

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I asked in the past, criteria for euks are not as well defined, since they are so difficult to assemble. Many people assume the same criteria as proks, some other decrease thresholds, but I think things might be changing soon and ENA might not have a precise answer

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

my AI friends told me to just say True in case any of RNA present, not all like in proks because again those are quite complecated...

Comment thread conf/modules.config
}

withName: 'TRNASCANSE' {
ext.args = { [euk: '-E', arc: '-A', bac: '-B'].get(meta.domain, '-G') }

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.

What is -G?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Without @Ge94

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Basic Options
  -E         : search for eukaryotic tRNAs (default)
  -B         : search for bacterial tRNAs
  -A         : search for archaeal tRNAs
  -M <model> : search for mitochondrial tRNAs
                 options: mammal, vert
  -O         : search for other organellar tRNAs
  -G         : use general tRNA model (cytoslic tRNAs from all 3 domains included)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants