Add DeepMAsED for deep learning evaluation of metagenomic de novo assemblies#1051
Add DeepMAsED for deep learning evaluation of metagenomic de novo assemblies#1051SkyLexS wants to merge 33 commits into
Conversation
Release 5.4.2
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.2. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
jfy133
left a comment
There was a problem hiding this comment.
Initial pass, but I leave the proper review to @dialvarezs :)
| cpus = { 12 * task.attempt } | ||
| memory = { 120.GB * task.attempt } | ||
| time = { 96.h * task.attempt } |
There was a problem hiding this comment.
Default resource requests should be moved to base.config
| cpus = { 12 * task.attempt } | ||
| memory = { 120.GB * task.attempt } | ||
| time = { 96.h * task.attempt } | ||
| ext.args = params.deepmased_features_gzip ? '--gzip' : '' |
There was a problem hiding this comment.
At a minimum should be wrapped in a closure, see other sfor examples
| memory = { 120.GB * task.attempt } | ||
| time = { 96.h * task.attempt } | ||
| ext.args = params.deepmased_features_gzip ? '--gzip' : '' | ||
| containerOptions = '--shm-size=8g' |
There was a problem hiding this comment.
Again something that should be in base.config ,but I worry about hardcoding such a thing - what is that exactly?
| memory = { 24.GB * task.attempt } | ||
| time = { 4.h * task.attempt } | ||
| ext.args = [ params.deepmased_cpu_only ? '--cpu-only' : '', "--seed ${params.deepmased_predict_seed}" ].join(' ').trim() | ||
| containerOptions = '--shm-size=8g' |
| Per-contig assembly error detection is also performed using [DeepMAsED](https://github.com/leylabmpi/DeepMAsED), a deep learning tool that predicts misassemblies from read alignment features. DeepMAsED runs in two sequential steps: | ||
|
|
||
| 1. **`DeepMAsED features`** (`DEEPMASED_FEATURES`): Extracts alignment-based features from the BAM file and assembly FASTA for each contig. This step is I/O intensive and is the most time-consuming part of the analysis, especially for large assemblies. | ||
| 2. **`DeepMAsED predict`** (`DEEPMASED_PREDICT`): Runs the pre-trained deep learning model on the feature tables to produce a per-contig misassembly score (0 = correctly assembled, 1 = likely misassembly). | ||
|
|
||
| The two steps are implemented as separate modules, allowing Nextflow to resume from `predict` if `features` has already completed successfully. DeepMAsED only runs on short-read assemblies (MEGAHIT, SPAdes). | ||
|
|
||
| The following parameters control DeepMAsED execution: | ||
|
|
||
| | Parameter | Description | | ||
| | --------------------------- | --------------------------------------------------------------------------------------------------------------------- | | ||
| | `--skip_deepmased` | Skip DeepMAsED entirely (both features and predict) | | ||
| | `--skip_deepmased_predict` | Run only the features step, skip prediction | | ||
| | `--skip_deepmased_features` | **Not allowed** unless `--skip_deepmased_predict` is also set — DeepMAsED predict requires features output | | ||
| | `--deepmased_cpu_only` | Run DeepMAsED predict in CPU-only mode. Default: `true` (recommended for HPC environments without GPU) | | ||
| | `--deepmased_features_gzip` | Gzip feature tables produced by the features step. Useful for large assemblies to reduce disk usage. Default: `false` | | ||
| | `--deepmased_predict_seed` | Random seed for numpy in DeepMAsED predict. Set for reproducible results. Default: `12` | |
There was a problem hiding this comment.
I do'nt think any of thesea re related to repdocubility (the section it is in). I also feel it is a lot of partly unnecessary detail that can be derived from the tool's docs itself? At a minimum (if you want to keep them), move to the end under the 'Note on....' sections at teh bottom of this page.
| ch_versions = ch_versions.mix(DEEPMASED_FEATURES.out.versions_deepmased.ifEmpty([])) | ||
| ch_versions = ch_versions.mix(DEEPMASED_FEATURES.out.versions_setuptools.ifEmpty([])) |
There was a problem hiding this comment.
| ch_versions = ch_versions.mix(DEEPMASED_FEATURES.out.versions_deepmased.ifEmpty([])) | |
| ch_versions = ch_versions.mix(DEEPMASED_FEATURES.out.versions_setuptools.ifEmpty([])) |
Not needed when the module is using topics for version reporting
| ch_versions = ch_versions.mix(DEEPMASED_PREDICT.out.versions_deepmased.ifEmpty([])) | ||
| ch_versions = ch_versions.mix(DEEPMASED_PREDICT.out.versions_setuptools.ifEmpty([])) |
There was a problem hiding this comment.
| ch_versions = ch_versions.mix(DEEPMASED_PREDICT.out.versions_deepmased.ifEmpty([])) | |
| ch_versions = ch_versions.mix(DEEPMASED_PREDICT.out.versions_setuptools.ifEmpty([])) |
Not needed when the module is using topics for version reporting
| - [#1041](https://github.com/nf-core/mag/pull/1041) - Refined and corrected unclear section of metromap (by @jfy133) | ||
| - [#1044](https://github.com/nf-core/mag/pull/1044) - Add new `--gtdbtk_place_species` parameter (by @dialvarezs) | ||
| - [#1047](https://github.com/nf-core/mag/issues/1007) - Add `--gtdbtk_single_job` to run GTDB-Tk classification for all bins in a single job (requested by @sarah-shah-bioinf, by @dialvarezs) | ||
| - Add DeepMAsED assembly error detection to the MAG workflow as two sequential steps (`features` and `predict`) for short-read assemblies. |
| - Update DeepMAsED module tests to the current `sanitizeOutput(process.out)` snapshot pattern and regenerate snapshots. | ||
| - Update version aggregation compatibility to support topic-based module version tuples. |
There was a problem hiding this comment.
| - Update DeepMAsED module tests to the current `sanitizeOutput(process.out)` snapshot pattern and regenerate snapshots. | |
| - Update version aggregation compatibility to support topic-based module version tuples. |
The aggregation support should already be in through the template? Is that not the case? (and the cause of the stuff at the top)?
| - [#1021](https://github.com/nf-core/mag/pull/1021) - Prevent execution of `gtdbtk/summary` when no bins pass QC (reported by @jfy133, fix by @dialvarezs) | ||
| - [#1031](https://github.com/nf-core/mag/pull/1031) - Fix hybrid co-assembly with SPAdes (short & long reads with `--coassemble_group`) (fix by @d4straub) | ||
| - [#1049](https://github.com/nf-core/mag/pull/1049) - Fix publishing issue with `gtdbtk/classifywf` (by @dialvarezs) | ||
| - Validate DeepMAsED skip-parameter dependencies early, preventing invalid combinations where `predict` would run without `features` outputs. |
There was a problem hiding this comment.
| - Validate DeepMAsED skip-parameter dependencies early, preventing invalid combinations where `predict` would run without `features` outputs. |
Not necessary as DeepMAsED is not in any past release ;)
… the nftignore because deepmased uses Deep Learning TensorFlow and when you run predictions for the same input the output could be of by one decimal and fail the test
|
Still have test various failures due to variation in the snapshot... |
PR 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).