Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch release: Fix #449 (wrong contigs from aDNA workflow going to binning) #458

Merged
merged 7 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions subworkflows/local/binning_refinement.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,14 @@ def getColNo(filename) {

workflow BINNING_REFINEMENT {
take:
contigs
ch_contigs_for_dastool // channel: [ val(meta), path(contigs) ]
bins // channel: [ val(meta), path(bins) ]
depths
reads

main:
ch_versions = Channel.empty()

// Drop unnecessary files
ch_contigs_for_dastool = contigs
.map {
meta, assembly, bams, bais ->
def meta_new = meta.clone()
[ meta_new, assembly ]
}

ch_bins_for_fastatocontig2bin = RENAME_PREDASTOOL(bins).renamed_bins
.branch {
metabat2: it[0]['binner'] == 'MetaBAT2'
Expand Down
9 changes: 8 additions & 1 deletion workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,14 @@ workflow MAG {
// If any two of the binners are both skipped at once, do not run because DAS_Tool needs at least one
if ( params.refine_bins_dastool ) {

BINNING_REFINEMENT ( BINNING_PREPARATION.out.grouped_mappings, BINNING.out.bins, BINNING.out.metabat2depths, ch_short_reads )
if (params.ancient_dna) {
contigs_ch = ANCIENT_DNA_ASSEMLY_VALIDATION.out.contigs_recalled
jfy133 marked this conversation as resolved.
Show resolved Hide resolved
} else {
contigs_ch = BINNING_PREPARATION.out.grouped_mappings
.map{ meta, contigs, bam, bai -> [ meta, contigs ] }
}

BINNING_REFINEMENT ( contigs_ch, BINNING.out.bins, BINNING.out.metabat2depths, ch_short_reads )
ch_versions = ch_versions.mix(BINNING_REFINEMENT.out.versions)

if ( params.postbinning_input == 'raw_bins_only' ) {
Expand Down