Add coverm/contig to nf-core/modules#997
Conversation
|
Converting this to draft until I add the module logic to the subworkflows, will ping when done. |
|
Update to changes:
|
|
This one is good to go but will require merging nf-core/modules#10588 for the lint checks to pass. |
|
PS all code generated by @claude was reviewed |
|
Making this into draft again until the upstream update to the coverm module is merged. |
c0d42d6 to
55f610f
Compare
Add CoverM to calculate read alignment metrics for contig/bin alignments (nf-core#587) - Run `nf-core modules install coverm/contig` - Create new module directory and modify modules.json
Introduces --coverm_mapper (default: 'bowtie2') to control which aligner is used when estimating contig depths. CoverM-native mappers skip bowtie2 alignment and let CoverM handle reads→depths directly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- COVERM_CONTIG_SHORTREAD/LONGREAD replace both METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS variants - bowtie2 path: BAMs → CoverM (bam_input=true) - coverm-native path: reads+assembly → CoverM (bam_input=false) - Add runtime error when BAM-requiring binners are used with coverm-native - Rename emit metabat2depths → contig_depths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add COVERM_CONTIG_SHORTREAD and COVERM_CONTIG_LONGREAD blocks with --methods metabat to output MetaBAT2-compatible depth format. Shortread also passes --mapper for coverm-native aligner selection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CoverM outputs uncompressed depth files; update get_mag_depths.py and CONVERT_DEPTHS to accept both .gz and plain-text inputs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS references with COVERM_CONTIG and update depth file extension from .txt.gz to .txt. Snapshots will need regeneration after the first test run to capture updated version strings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add --depth_calculator (coverm|metabat2, default: coverm) to switch between COVERM_CONTIG and METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS for contig depth estimation - Add --coverm_methods with full CoverM methods enum (default: metabat) to configure the coverage calculation method passed to CoverM - Restore METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS_SHORTREAD/LONGREAD config blocks in modules.config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update coverm/contig to use eval/topic-based versioning and handle methods as List or string; remove versions.yml generation - Remove ch_versions.mix for COVERM_CONTIG (topic versioning is automatic) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Sync coverm/contig main.nf and meta.yml to reference (eval/topic versioning, List-aware methods string handling) - Remove ch_versions.mix for COVERM_CONTIG calls (topic versioning is automatic; no versions.yml emitted) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add coverm to dependencies - Add nf-core#997 to 'Added' section
- Reflect addition of COVERM_CONTIG as contig depth calculator
- Use version topics
Brief look looks fine to me, only 3 needs more careful so I agree to push to another PR! |
|
Yes, agreed, your plan sounds good to me! |
|
Thanks @dialvarezs @jfy133 @prototaxites for the comments. Hope everyone could get some days off for Easter. I will be picking this up on Monday to implement points 1 and 2 suggested by Diego. |
- Add ignoreFile param to test_assembly_input:stable_name_binning
|
@dialvarezs I'm having some difficult interpreting the failing checks here, could I please request another review? Thanks |
The rorr is: You're somehow missing a |
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
|
I suspect it is this, as I learnt the hard way it's best not to edit snapshot files directly for the same reason 😆 |
|
I think I fixed the original errors but appears tehre are others now |
|
Hi @vinisalazar! As @jfy133 mentioned, it’s generally a good idea to update snapshots manually, since automatic updates can result in malformed JSON or subtle issues things nf-test may not like (e.g. differences in ordering). I’ve now regenerated all the snapshots. If you’d like a full review, I can most likely do it over the weekend. |
There was a problem hiding this comment.
For the meantime, it seems that something is not working on long read data. Many processes disspaeared from the snapshot, so I suppose that mag is finishing early now.
Can you give it a look?
|
Understood, apologies for that. My laptop can't handle the tests so I was struggling to update the snapshots programmatically. Over the weekend investigate the issue on the long reads data on a bigger machine that can actually run the tests. |
Uhhh don't you mean the opposite? Manual bad, automatic,good? |
Oops, my bad. Not the smartest idea to give recommendations when I’m still half asleep 😅. |
Add CoverM to calculate read alignment metrics for contig/bin alignments (#587)
nf-core modules install coverm/contigPR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).