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

Fix "Access to undefined parameter forwardStranded" warnings #170

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion modules/local/dreg_prep/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion subworkflows/local/coverage_graphs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ workflow COVERAGE_GRAPHS {

DREG_PREP (
bam_bai,
sizes
sizes,
params.assay_type,
)

emit:
Expand Down
Loading