Noting things to improve the nextflow code to make things more maintainable in the future~!
This comment is for assembly, and other stuff is in notes below
assembly_mag subworkflow
- Default to nf-core modules wherever they were modified and use
modules.config to add modifications instead
- (future): Austin will identify modules from nf-core that have been modified/moved to local eventually and add comments about changes. (Slack, 5/Sep/25) -- Could start from
somatem_mags.nf's diff in latest commit
- SingleM, TaxBurst: directly in local ; Bakta moved to local ; checkm2_parse: custom made likely in local.
- Harmonize process-specific resource specifications
RAM, CPUs provided in modules.config to instead be closer to the process_low/medium/high labels for smoother harmonization
Specific modules
flye: Is there any benefit in the logs being renamed with the file prefix in flye/main.nf:L51?
gzip -c assembly.fasta > ${prefix}.assembly.fasta.gz
gzip -c assembly_graph.gfa > ${prefix}.assembly_graph.gfa.gz
gzip -c assembly_graph.gv > ${prefix}.assembly_graph.gv.gz
mv assembly_info.txt ${prefix}.assembly_info.txt
mv flye.log ${prefix}.flye.log
mv params.json ${prefix}.params.json
- Unnecessary/confusing channel manipulations in
assembly_mags.nf subwk. Don't need to merge channels (check nf-core's standard version; don't add environment that can be passed as a parameter easier.
// Binning with SemiBin2
ch_asm_bam = FLYE.out.fasta.join(SAMTOOLS_SORT.out.bam, by: [0])
// Set SemiBin2 environment parameter
ch_asm_bam_with_env = ch_asm_bam.map { meta, fasta, bam ->
def new_meta = meta.clone()
new_meta.semibin_env = params.sample_environment
[new_meta, fasta, bam]
}
SEMIBIN_SINGLEEASYBIN(ch_asm_bam_with_env)
Technical features
- flye database download: should include the
light database using option --type light in ext.args. what should the user call this?
As this taxonomic-untargeted database is fairly demanding in terms of storage consumption, we also provide a lightweight DB type providing all non-coding feature information but only PSCC information from UniRef50 clusters for CDS. If download bandwiths or storage requirements become an issue or if shorter runtimes are favored over more-specific annotation, the light DB will do the job.
- Include a co-assembly mode to generate more bins? (needs more thought for data preperation here)
Multi-sample binning requires more complex steps to prepare input data as well as more computation but can also result in more bins (particularly in complex habitats). See Figure 3b in the SemiBin1 manuscript for a comparison of multi sample vs. single sample. source: semibin docs
- Check if we give the
.gfa files to semibin2 and read documentation for improvements and downsides expected?
Claude says: In metaFlye's case, the graph is explicitly output (as a .gfa file), and SemiBin2 and similar binners can optionally use graph connectivity — not just sequence similarity — to decide which contigs belong together
Noting things to improve the nextflow code to make things more maintainable in the future~!
This comment is for assembly, and other stuff is in notes below
assembly_magsubworkflowmodules.configto add modifications insteadsomatem_mags.nf's diff in latest commitRAM, CPUsprovided inmodules.configto instead be closer to theprocess_low/medium/highlabels for smoother harmonizationSpecific modules
flye: Is there any benefit in the logs being renamed with the file prefix inflye/main.nf:L51?assembly_mags.nfsubwk. Don't need to merge channels (check nf-core's standard version; don't add environment that can be passed as a parameter easier.Technical features
lightdatabase using option--type lightin ext.args. what should the user call this?.gfafiles to semibin2 and read documentation for improvements and downsides expected?