Skip to content

Commit

Permalink
simplify script syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cdiener committed May 17, 2024
1 parent 7508929 commit 1656b73
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ process countThings {
time "1m"

input:
path(txt_file)
path txt_file

output:
path("*.counts")
path "*.counts"

"""
wc -${params.what[0]} ${txt_file} > ${txt_file}.counts
Expand All @@ -25,10 +25,10 @@ process average {
publishDir "${launchDir}"

input:
path(counts)
path counts

output:
path("average.txt")
path "average.txt"

"""
#!/usr/bin/env python3
Expand All @@ -47,9 +47,7 @@ process average {
}

workflow {
Channel
.fromPath("${launchDir}/shakespeare/*.txt")
.set{texts}
texts = Channel.fromPath("${launchDir}/shakespeare/*.txt")

countThings(texts)
average(countThings.out.collect())
Expand Down

0 comments on commit 1656b73

Please sign in to comment.