-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use typed process inputs and outputs
Signed-off-by: Ben Sherman <[email protected]>
- Loading branch information
1 parent
8253a58
commit a954937
Showing
6 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
import java.nio.file.Path | ||
import nextflow.io.ValueObject | ||
import nextflow.util.KryoHelper | ||
|
||
@ValueObject | ||
class Sample { | ||
String id | ||
List<Path> reads | ||
|
||
static { | ||
KryoHelper.register(Sample) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
params.outdir = 'results' | ||
|
||
process FASTQC { | ||
tag "FASTQC on $sample_id" | ||
tag "FASTQC on $sample.id" | ||
conda 'fastqc=0.12.1' | ||
publishDir params.outdir, mode:'copy' | ||
|
||
input: | ||
tuple val(sample_id), path(reads) | ||
Sample sample | ||
|
||
output: | ||
path "fastqc_${sample_id}_logs" | ||
Path logs = path("fastqc_${sample.id}_logs") | ||
|
||
script: | ||
""" | ||
fastqc.sh "$sample_id" "$reads" | ||
fastqc.sh "$sample.id" "$sample.reads" | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
|
||
process QUANT { | ||
tag "$pair_id" | ||
tag "$pair.id" | ||
conda 'salmon=1.10.2' | ||
|
||
input: | ||
path index | ||
tuple val(pair_id), path(reads) | ||
Path index | ||
Sample pair | ||
|
||
output: | ||
path pair_id | ||
Path result = path(pair.id) | ||
|
||
script: | ||
""" | ||
salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id | ||
salmon quant --threads $task.cpus --libType=U -i $index -1 ${pair.reads[0]} -2 ${pair.reads[1]} -o $pair.id | ||
""" | ||
} |