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'
51
51
* main script flow
52
52
*/
53
53
workflow {
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) )
57
57
}
58
58
59
59
/*
Original file line number Diff line number Diff line change 1
1
params. outdir = ' results'
2
2
3
3
process FASTQC {
4
- tag " FASTQC on $s ample_id "
4
+ tag " FASTQC on $s ample . id "
5
5
conda ' fastqc=0.12.1'
6
6
publishDir params. outdir, mode:' copy'
7
7
8
8
input:
9
- tuple val(sample_id), path(reads)
9
+ Sample sample
10
10
11
11
output:
12
- path " fastqc_${ sample_id } _logs"
12
+ Path logs = path( " fastqc_${ sample.id } _logs" )
13
13
14
14
script:
15
15
"""
16
- fastqc.sh "$s ample_id " "$reads "
16
+ fastqc.sh "$s ample . id " "$s ample . reads "
17
17
"""
18
18
}
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ process INDEX {
4
4
conda ' salmon=1.10.2'
5
5
6
6
input:
7
- path transcriptome
7
+ Path transcriptome
8
8
9
9
output:
10
- path ' index'
10
+ Path index = path( ' index' )
11
11
12
12
script:
13
13
"""
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ process MULTIQC {
5
5
publishDir params. outdir, mode:' copy'
6
6
7
7
input:
8
- path( ' * ' )
9
- path(config)
8
+ List< Path > logs
9
+ Path config
10
10
11
11
output:
12
- path(' multiqc_report.html' )
12
+ Path report = path(' multiqc_report.html' )
13
13
14
14
script:
15
15
"""
Original file line number Diff line number Diff line change 1
1
2
2
process QUANT {
3
- tag " $p air_id "
3
+ tag " $p air . id "
4
4
conda ' salmon=1.10.2'
5
5
6
6
input:
7
- path index
8
- tuple val(pair_id), path(reads)
7
+ Path index
8
+ Sample pair
9
9
10
10
output:
11
- path pair_id
11
+ Path result = path(pair . id)
12
12
13
13
script:
14
14
"""
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
16
16
"""
17
17
}
You can’t perform that action at this time.
0 commit comments