diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e1c640..322d56e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#137](https://github.com/nf-core/nascent/pull/137) - Use singularity containers for PINTS - [#142](https://github.com/nf-core/nascent/pull/142) - Updated CHM13 references +### Fixed + +- [#170](https://github.com/nf-core/nascent/pull/170) - Remove "Access to undefined parameter forwardStranded" warnings + ## v2.2.0 - 2024-03-05 ### Added diff --git a/modules/local/dreg_prep/main.nf b/modules/local/dreg_prep/main.nf index 3b3e1c68..7c640cf4 100644 --- a/modules/local/dreg_prep/main.nf +++ b/modules/local/dreg_prep/main.nf @@ -11,6 +11,7 @@ process DREG_PREP { input: tuple val(meta), path(bam_file), val(index) path sizes + val assay_type output: tuple val(meta), path("${prefix}.pos.bw"), path("${prefix}.neg.bw"), emit: dreg_bigwig @@ -21,6 +22,10 @@ process DREG_PREP { script: prefix = task.ext.prefix ?: "${meta.id}" + // NOTE https://github.com/hyulab/PINTS/blob/700f2c44b967413a19fc6b66bd876b53b6f31002/pints/io_engine.py#L436-L446 + def forwardStranded_assays = ["PROseq", "mNETseq"] + def forwardStranded = forwardStranded_assays.contains(assay_type) + if (meta.single_end) { """ echo "Creating BigWigs suitable as inputs to dREG" @@ -74,7 +79,7 @@ process DREG_PREP { echo "bedGraph to bigwig done" """ } else { - if (params.forwardStranded) { + if (forwardStranded) { """ samtools view -@ $task.cpus -bf 0x2 ${bam_file} | samtools sort -n -@ $task.cpus \\ > ${prefix}.dreg.bam diff --git a/subworkflows/local/coverage_graphs.nf b/subworkflows/local/coverage_graphs.nf index 5add10a7..a1628c16 100644 --- a/subworkflows/local/coverage_graphs.nf +++ b/subworkflows/local/coverage_graphs.nf @@ -61,7 +61,8 @@ workflow COVERAGE_GRAPHS { DREG_PREP ( bam_bai, - sizes + sizes, + params.assay_type, ) emit: