Skip to content

Commit

Permalink
fix: Remove Access to undefined parameter forwardStranded warnings
Browse files Browse the repository at this point in the history
Related to #115
  • Loading branch information
edmundmiller committed Oct 13, 2024
1 parent 39cd9b6 commit 55b7bf9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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

0 comments on commit 55b7bf9

Please sign in to comment.