Skip to content

Commit 0e7289d

Browse files
authored
Merge pull request #906 from nhenry50/fix-consensus-merge-pair-single-sample-run
fix consensus merge pairs with one sample run
2 parents 3c81f87 + 537c064 commit 0e7289d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### `Fixed`
1515

16+
- [#906](https://github.com/nf-core/ampliseq/pull/906) - Fix `--mergepairs_strategy "consensus"` causing an error in dada2_stats when analysing a run composed by only one sample
1617
- [#893](https://github.com/nf-core/ampliseq/pull/893),[#896](https://github.com/nf-core/ampliseq/pull/896),[#905](https://github.com/nf-core/ampliseq/pull/905) - Template update for nf-core/tools version 3.3.2
1718
- [#897](https://github.com/nf-core/ampliseq/pull/897) - Allow multiple region analysis with one sample
1819
- [#899](https://github.com/nf-core/ampliseq/pull/899) - With `--dada_ref_tax_custom` all chunks defined by `--dada_assign_chunksize` are now taxonomically annotated.

modules/local/dada2_denoising.nf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ process DADA2_DENOISING {
9090
9191
}
9292
93+
# if one sample, need to convert back to df for next steps
94+
95+
if(length(mergers) == 1) {
96+
mergers <- mergers[[1]]
97+
}
98+
9399
} else {
94100
mergers <- mergePairs(dadaFs, filtFs, dadaRs, filtRs, $args2, verbose=TRUE)
95101
}

0 commit comments

Comments
 (0)