Skip to content

Update single-sample metagenomic binning workflow - #1453

Merged
paulzierep merged 12 commits into
galaxyproject:mainfrom
paulzierep:agentic-foundry-mags-single
Nov 3, 2026
Merged

paulzierep merged 12 commits into
galaxyproject:mainfrom
paulzierep:agentic-foundry-mags-single

Conversation

@paulzierep

@paulzierep paulzierep commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Publish Single-sample binning 1.0 as a reusable workflow accepting paired-end
reads and corresponding assemblies from any assembler. Each sample's reads are
mapped only against its own assembly. For a pre-grouped/co-assembled input, this
means mapping the group's merged reads against its assembly.

This is the lower-cost coverage strategy: it avoids the all-samples × all-assemblies
mapping used by #1452. Prefer it for unrelated samples, large sample counts, or
limited storage/compute; use multi-coverage when cross-sample abundance patterns
are useful and resources permit.

Changes and interface

  • Inputs: list:paired reads and a list of assemblies, aligned by position and
    in the same order. Reads should already be quality-filtered and host-removed.
  • Five independently optional binners: SemiBin, CONCOCT, MetaBAT2, MaxBin2 and
    COMEBin
    . All default to on; keep at least one enabled.
  • Refine with Binette (first/default), DAS Tool, or Both. Binette's
    standalone completeness/contamination-weight defaults remain 40 / 2.
  • Expose SemiBin's supported single-mode environment selector (default global).
  • Compute CONCOCT read length automatically from SeqKit statistics across both
    mates: total bases / total reads, rounded to the nearest integer. This is a
    read-count-weighted mean, not an average of per-file means.
  • Publish coverage-depth matrices, raw binner bins and selected refiner outputs.
  • Use editor-compatible optional-output bridges and separate coverage, binning and refinement frames
    with Markdown documentation. Yes/No binner selectors feed internal boolean gates to avoid invalid
    text-to-boolean condition connections in the editor.

This standalone workflow stops at binning/refinement: grouping, assembly, dRep,
abundance estimation and final reporting belong to the parent, not this PR.

Validation

  • Test fixtures/assertions cover Binette with COMEBin enabled and DAS Tool
    with COMEBin disabled
    . Fixtures are referenced by URL; collection minima are
    retained rather than weakened.
  • gxwf validate: 36 tool states pass, zero failures/skips.
  • Imported on usegalaxy.eu and included in the actual Galaxy editor-terminal
    audit: 457 connections checked across the three deliverables and embedded
    workflows, zero invalid connections
    .
  • The latest default/presentation follow-up preserves the accepted computational
    graph and exact test assertions. Fresh default-on EU checks and GitHub CI are
    tracked separately; pending runs are not claimed as passes.

Context and related PRs

This is part of the FAIRyMAGs workflow modularization: publish reusable binning
workflows alongside an end-to-end MAG-generation parent, rather than maintaining
separate copies of the same binning logic. Each deliverable has its own branch
and PR so it can be reviewed independently.

Suggested review/merge order: Single → Multi → Parent. The parent embeds its
children, so importing it does not require importing the standalone workflows first.

Developed within FAIRyMAGs, with links
to the related workflows and learning resources in the README.

IWC checklist

FOR CONTRIBUTOR:

FOR REVIEWERS:

  • .dockstore.yml: file is present and aligned with creator metadata in workflow. ORCID identifiers are strongly encouraged in creator metadata. The .dockstore.yml file is required to run tests
  • Workflow is sufficiently generic to be used with lab data and does not hardcode sample names, reference data and can be run without reading an accompanying tutorial.
  • In workflow: annotation field contains short description of what the workflow does. Should start with This workflow does/runs/performs … xyz … to generate/analyze/etc …
  • In workflow: workflow inputs and outputs have human readable names (spaces are fine, no underscore, dash only where spelling dictates it), no abbreviation unless it is generally understood. Altering input or output labels requires adjusting these labels in the the workflow-tests.yml file as well
  • In workflow: name field should be human readable (spaces are fine, no underscore, dash only where spelling dictates it), no abbreviation unless generally understood
  • Workflow folder: prefer dash (-) over underscore (_), prefer all lowercase. Folder becomes repository in iwc-workflows organization and is included in TRS id
  • Readme explains what workflow does, what are valid inputs and what outputs users can expect. If a tutorial or other resources exist they can be linked. If a similar workflow exists in IWC readme should explain differences with existing workflow and when one might prefer one workflow over another
  • Changelog contains appropriate entries
  • Large files (> 100 KB) are uploaded to zenodo and location urls are used in test file

@github-actions

Copy link
Copy Markdown

Test Results (powered by Planemo)

Test Summary

Test State Count
Total 2
Passed 0
Error 2
Failure 0
Skipped 0
Errored Tests
  • ❌ single-sample-binning.ga_0

    Execution Problem:

    • Unexpected HTTP status code: 400: {"err_msg":"Workflow was not invoked; the following required tools are not installed: toolshed.g2.bx.psu.edu/repos/iuc/seqkit_stats/seqkit_stats/2.8.1+galaxy0 (version 2.8.1+galaxy0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_cat/0.1.0 (version 0.1.0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_awk_tool/9.11+galaxy0 (version 9.11+galaxy0)","err_code":0}
      
  • ❌ single-sample-binning.ga_1

    Execution Problem:

    • Unexpected HTTP status code: 400: {"err_msg":"Workflow was not invoked; the following required tools are not installed: toolshed.g2.bx.psu.edu/repos/iuc/seqkit_stats/seqkit_stats/2.8.1+galaxy0 (version 2.8.1+galaxy0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_cat/0.1.0 (version 0.1.0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_awk_tool/9.11+galaxy0 (version 9.11+galaxy0)","err_code":0}
      

@paulzierep paulzierep changed the title Agentic foundry mags single Add reusable single-sample metagenomic binning workflow Oct 20, 2026
@github-actions

Copy link
Copy Markdown

Test Results (powered by Planemo)

Test Summary

Test State Count
Total 2
Passed 0
Error 2
Failure 0
Skipped 0
Errored Tests
  • ❌ single-sample-binning.ga_0

    Execution Problem:

    • Unexpected HTTP status code: 400: {"err_msg":"Workflow was not invoked; the following required tools are not installed: toolshed.g2.bx.psu.edu/repos/iuc/seqkit_stats/seqkit_stats/2.8.1+galaxy0 (version 2.8.1+galaxy0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_cat/0.1.0 (version 0.1.0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_awk_tool/9.11+galaxy0 (version 9.11+galaxy0)","err_code":0}
      
  • ❌ single-sample-binning.ga_1

    Execution Problem:

    • Unexpected HTTP status code: 400: {"err_msg":"Workflow was not invoked; the following required tools are not installed: toolshed.g2.bx.psu.edu/repos/iuc/seqkit_stats/seqkit_stats/2.8.1+galaxy0 (version 2.8.1+galaxy0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_cat/0.1.0 (version 0.1.0), toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_awk_tool/9.11+galaxy0 (version 9.11+galaxy0)","err_code":0}
      

@paulzierep paulzierep changed the title Add reusable single-sample metagenomic binning workflow Update single-sample metagenomic binning workflow Oct 20, 2026
COMEBin runs the longest of all binners and the workflow tests stay close to
the CI time limit. Turn it off in the published test cases while keeping the
other binners, both refinement tools and every existing assertion unchanged.
COMEBin stays enabled by default in the workflow.
@paulzierep

Copy link
Copy Markdown
Collaborator Author

Tests: turn COMEBin off in the published test case to keep the suite inside the CI time limit.

COMEBin is the longest binning step: in the last CI runs its five assembly jobs took ~3h20m here (~4h30m for multi-sample), which brought the suite close to the six hour limit. With COMEBin disabled the test now covers SemiBin, MetaBAT2, MaxBin2 and CONCOCT plus the Binette and DAS Tool refinement paths, and all existing output assertions are unchanged. COMEBin stays enabled by default in the workflow and its behaviour is verified separately.

@github-actions

Copy link
Copy Markdown

Test Results (powered by Planemo)

Test Summary

Test State Count
Total 2
Passed 1
Error 0
Failure 1
Skipped 0
Failed Tests
  • ❌ single-sample-binning.ga_0
Passed Tests
  • ✅ single-sample-binning.ga_1

@github-actions

Copy link
Copy Markdown

Test Results (powered by Planemo)

Test Summary

Test State Count
Total 2
Passed 1
Error 0
Failure 1
Skipped 0
Failed Tests
  • ❌ single-sample-binning.ga_0
Passed Tests
  • ✅ single-sample-binning.ga_1

@bebatut bebatut left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Similar comments would apply as in #1452:

  • Removing in annotation the text that is already in the label of the step
  • Changing the order in the inputs
  • Having sub-boxing corresponding to "coverage computation", "binning", "refinement" steps with the corresponding explanation in each box

In addition to that (that would be also valid for #1452), it would be nice to have the different steps as sections in the README with then more details in each. The README is the first thing users will see when they are looking for workflows, so we need to make the different steps stand out, especially in workflows that can be quite complex.

Replace the five boolean binner toggles with Yes/No selectors gated
through map_param_value steps, reorder the inputs so reads and
assemblies come first, group the workflow into annotated frames, and
rewrite step annotations and the README to explain what each step does.
@paulzierep

paulzierep commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Thanks @bebatut. Applied the same improvements here: shorter explanatory annotations, assemblies and reads before the binner/Binette controls, Yes/No binner selectors, and separate coverage, binning and refinement frames. The README now introduces each analysis stage before its settings and outputs.

@bebatut bebatut left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @paulzierep. It seems good on my side (do not have the time to review in details 😅 ), just one comment about changes in the CHANGELOG file

@paulzierep

Copy link
Copy Markdown
Collaborator Author

Please hold this PR until galaxyproject/galaxy#24665 is resolved. This workflow contains or embeds mapped pick_value bridges that may encounter the reported duplicate-scheduling bug when job caching is enabled.

A minimal two-step example on EU reproduced the problem: 1,001 input datasets generated 3,000 jobs before cancellation, repeatedly scheduling the same inputs. Caching is a suspected factor, not yet a confirmed cause.

@paulzierep

Copy link
Copy Markdown
Collaborator Author

Addressed the inline comments in 7eab17b32d: changed “Publish” to “Expose” in the CHANGELOG, simplified the introduction to describe the workflow's function, and replaced the relative workflow links with IWC website links.

The README now explains that running DAS Tool and Binette together benefits from their different refinement approaches, requires downstream dereplication of the combined results, and can still leave contigs in multiple retained bins because dereplication does not enforce exclusive contig assignments. The embedded README is synchronized.

@bebatut bebatut left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot @paulzierep. It looks good to me!
Waiting now for galaxyproject/galaxy#24665

@paulzierep
paulzierep merged commit b34c991 into galaxyproject:main Nov 3, 2026
11 checks passed
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.

2 participants