Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#1012](https://github.com/nf-core/mag/pull/1012) - Prevent adapter trimming with Porechop on PacBio reads (by @dialvarezs)

### `Dependencies`

### `Deprecated`
Expand Down
17 changes: 13 additions & 4 deletions subworkflows/local/preprocessing_longread/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,30 @@ workflow LONGREAD_PREPROCESSING {

if (!params.assembly_input) {
if (!params.skip_adapter_trimming && !val_skip_qc) {
ch_long_reads_by_platform = ch_raw_long_reads.branch { meta, _reads ->
ont: meta.lr_platform in ['OXFORD_NANOPORE', 'OXFORD_NANOPORE_HQ']
pb: meta.lr_platform in ['PACBIO_CLR', 'PACBIO_HIFI']
}
ch_long_reads = channel.empty()

// PacBio reads bypass adapter trimming for now, as there is no tool for that.
ch_long_reads = ch_long_reads.mix(ch_long_reads_by_platform.pb)

if (params.longread_adaptertrimming_tool && params.longread_adaptertrimming_tool == 'porechop_abi') {
PORECHOP_ABI(
ch_raw_long_reads,
ch_long_reads_by_platform.ont,
[],
)
ch_versions = ch_versions.mix(PORECHOP_ABI.out.versions)
ch_long_reads = PORECHOP_ABI.out.reads
ch_long_reads = ch_long_reads.mix(PORECHOP_ABI.out.reads)
ch_multiqc_files = ch_multiqc_files.mix(PORECHOP_ABI.out.log)
}
else if (params.longread_adaptertrimming_tool == 'porechop') {
PORECHOP_PORECHOP(
ch_raw_long_reads
ch_long_reads_by_platform.ont
)
ch_versions = ch_versions.mix(PORECHOP_PORECHOP.out.versions)
ch_long_reads = PORECHOP_PORECHOP.out.reads
ch_long_reads = ch_long_reads.mix(PORECHOP_PORECHOP.out.reads)
ch_multiqc_files = ch_multiqc_files.mix(PORECHOP_PORECHOP.out.log)
}
}
Expand Down
Loading