Skip to content

Generate contig to bin maps for all bins during binning and simplify bin refinment DAS_Tool contig2bin code#965

Merged
jfy133 merged 10 commits intodevfrom
964-generate-contig-to-bin-maps-for-all-bins-during-binning-and-simplify-code
Jan 14, 2026
Merged

Generate contig to bin maps for all bins during binning and simplify bin refinment DAS_Tool contig2bin code#965
jfy133 merged 10 commits intodevfrom
964-generate-contig-to-bin-maps-for-all-bins-during-binning-and-simplify-code

Conversation

@jfy133
Copy link
Copy Markdown
Member

@jfy133 jfy133 commented Jan 9, 2026

Close #964

Summary:

  • Simplifies DAS_Tool preparation to a single FASTATOCONTIG2BIN process rather than one per binner
  • Adds (optional) parameter to save the files above
  • Adds new default generation of a similar contig to bin mapping file, but more detailed/structured file that contains all contigs/bins but at binning rather than at refinement.

Also includes the obligatory typical Nextflow auto-formatting ;)

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/mag branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@jfy133 jfy133 linked an issue Jan 9, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2026

This PR is against the main branch ❌

  • Do not close this PR
  • Click Edit and change the base to dev
  • This CI test will remain failed until you push a new commit

Hi @jfy133,

It looks like this pull-request is has been made against the nf-core/mag main branch.
The main branch on nf-core repositories should always contain code from the latest release.
Because of this, PRs to main are only allowed if they come from the nf-core/mag dev branch.

You do not need to close this PR, you can change the target branch to dev by clicking the "Edit" button at the top of this page.
Note that even after this, the test will continue to show as failing until you push a new commit.

Thanks again for your contribution!

@jfy133 jfy133 changed the base branch from main to dev January 9, 2026 11:16
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 9, 2026

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

Posted for pipeline commit 9520bfa

+| ✅ 380 tests passed       |+
#| ❔   1 tests were ignored |#
!| ❗   6 tests had warnings |!
Details

❗ Test warnings:

  • pipeline_todos - TODO string in main.nf: Remove this line if you don't need a FASTA file [TODO: try and test using for --host_fasta and --host_genome]
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here

❔ Tests ignored:

  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md

✅ Tests passed:

Run details

  • nf-core/tools version 3.5.1
  • Run at 2026-01-13 17:20:05

@jfy133 jfy133 marked this pull request as ready for review January 9, 2026 11:24
Copy link
Copy Markdown
Contributor

@prototaxites prototaxites left a comment

Choose a reason for hiding this comment

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

LGTM, but one query: for the Pydamage PR, will you want to include the results for refined bins also? Because here the new contig to bin map with the custom code will exclude those as bin refinement happens after this map is already generated!

Copy link
Copy Markdown
Collaborator

@d4straub d4straub left a comment

Choose a reason for hiding this comment

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

Just two comments

Comment thread docs/output.md Outdated
Comment thread docs/output.md Outdated
@jfy133
Copy link
Copy Markdown
Member Author

jfy133 commented Jan 9, 2026

LGTM, but one query: for the Pydamage PR, will you want to include the results for refined bins also? Because here the new contig to bin map with the custom code will exclude those as bin refinement happens after this map is already generated!

Ah good point... I was thinking too aDNA centric again (bins are normally pretty poor so refinement doesn't help much.)

I'll try to see how easy it is to move it to post refinement with ch_input_for_postbinning

Comment thread workflows/mag.nf Outdated
Comment thread workflows/mag.nf
@jfy133
Copy link
Copy Markdown
Member Author

jfy133 commented Jan 9, 2026

@nf-core-bot fix linting

@jfy133
Copy link
Copy Markdown
Member Author

jfy133 commented Jan 9, 2026

Waiting for local nf-test snapshot to be updated, then I will merge!

Thanks @prototaxites !

nf-core-bot and others added 3 commits January 9, 2026 13:42
…ning-and-simplify-code' of github.com:nf-core/mag into 964-generate-contig-to-bin-maps-for-all-bins-during-binning-and-simplify-code
@jfy133
Copy link
Copy Markdown
Member Author

jfy133 commented Jan 12, 2026

Running on github actions also passes fine :(
image

@jfy133
Copy link
Copy Markdown
Member Author

jfy133 commented Jan 13, 2026

OK after investigation via @dialvarezs , there was variability with SEmiBin, so deactivated in the test where DAS_Tool is run
Now we only have the persisting checkm2 issue

@jfy133 jfy133 merged commit 0a8102e into dev Jan 14, 2026
19 of 21 checks passed
@jfy133 jfy133 deleted the 964-generate-contig-to-bin-maps-for-all-bins-during-binning-and-simplify-code branch January 14, 2026 04:55
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.

Generate contig-to-bin maps for all bins during binning and simplify code

4 participants