File tree Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Expand file tree Collapse file tree 6 files changed +31
-17
lines changed Original file line number Diff line number Diff line change 1+
2+ import java.nio.file.Path
3+ import nextflow.io.ValueObject
4+ import nextflow.util.KryoHelper
5+
6+ @ValueObject
7+ class Sample {
8+ String id
9+ List<Path > reads
10+
11+ static {
12+ KryoHelper . register(Sample )
13+ }
14+ }
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ include { MULTIQC } from './modules/multiqc'
5151 * main script flow
5252 */
5353workflow {
54- read_pairs_ch = channel. fromFilePairs( params. reads, checkIfExists : true )
55- RNASEQ ( params. transcriptome, read_pairs_ch )
56- MULTIQC ( RNASEQ . out, params. multiqc )
54+ read_pairs_ch = channel. fromFilePairs( params. reads, checkIfExists : true ). map { args -> new Sample ( * args) }
55+ RNASEQ ( file( params. transcriptome) , read_pairs_ch )
56+ MULTIQC ( RNASEQ . out, file( params. multiqc) )
5757}
5858
5959/*
Original file line number Diff line number Diff line change 11params. outdir = ' results'
22
33process FASTQC {
4- tag " FASTQC on $s ample_id "
4+ tag " FASTQC on $s ample . id "
55 conda ' fastqc=0.12.1'
66 publishDir params. outdir, mode:' copy'
77
88 input:
9- tuple val(sample_id), path(reads)
9+ Sample sample
1010
1111 output:
12- path " fastqc_${ sample_id } _logs"
12+ Path logs = path( " fastqc_${ sample.id } _logs" )
1313
1414 script:
1515 """
16- fastqc.sh "$s ample_id " "$reads "
16+ fastqc.sh "$s ample . id " "$s ample . reads "
1717 """
1818}
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ process INDEX {
44 conda ' salmon=1.10.2'
55
66 input:
7- path transcriptome
7+ Path transcriptome
88
99 output:
10- path ' index'
10+ Path index = path( ' index' )
1111
1212 script:
1313 """
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ process MULTIQC {
55 publishDir params. outdir, mode:' copy'
66
77 input:
8- path( ' * ' )
9- path(config)
8+ List< Path > logs
9+ Path config
1010
1111 output:
12- path(' multiqc_report.html' )
12+ Path report = path(' multiqc_report.html' )
1313
1414 script:
1515 """
Original file line number Diff line number Diff line change 11
22process QUANT {
3- tag " $p air_id "
3+ tag " $p air . id "
44 conda ' salmon=1.10.2'
55
66 input:
7- path index
8- tuple val(pair_id), path(reads)
7+ Path index
8+ Sample pair
99
1010 output:
11- path pair_id
11+ Path result = path(pair . id)
1212
1313 script:
1414 """
15- salmon quant --threads $task . cpus --libType=U -i $index -1 ${ reads[0]} -2 ${ reads[1]} -o $p air_id
15+ salmon quant --threads $task . cpus --libType=U -i $index -1 ${ pair. reads[0]} -2 ${ pair. reads[1]} -o $p air . id
1616 """
1717}
You can’t perform that action at this time.
0 commit comments