@@ -24,13 +24,13 @@ params {
2424 defaultValue " ${ projectDir} /data/ggal/ggal_gut_{1,2}.fq"
2525 }
2626
27- transcriptome : String {
27+ transcriptome : Path {
2828 description ' The input transcriptome file'
2929 faIcon ' fas fa-folder-open'
3030 defaultValue " ${ projectDir} /data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
3131 }
3232
33- multiqc : String {
33+ multiqc : Path {
3434 description ' Directory containing multiqc configuration'
3535 faIcon ' fas fa-folder-open'
3636 defaultValue " ${ projectDir} /multiqc"
@@ -50,17 +50,18 @@ workflow {
5050 outdir : ${ workflow.outputDir}
5151 """ . stripIndent()
5252
53- def (index, samples) = params. reads
54- |> Channel . fromFilePairs( checkIfExists : true ) // Channel<(String,List<Path>)>
55- |> map { (id, reads) ->
56- new FastqPair (id, reads[0 ], reads[1 ])
57- } // Channel<FastqPair>
58- |> RNASEQ ( file(params. transcriptome) ) // NamedTuple(index: Path, samples: Channel<Sample>)
59-
60- def summary = samples
61- |> flatMap { s -> [ s. fastqc, s. quant ] } // Channel<Path>
62- |> collect // Bag<Path> (future)
63- |> MULTIQC ( file(params. multiqc) ) // Path (future)
53+ def pairs = Channel . fromFilePairs(params. reads). map { (id , reads ) ->
54+ new FastqPair (id, reads[0 ], reads[1 ])
55+ } // Channel<FastqPair>
56+
57+ def (index, samples) = RNASEQ (pairs, params. transcriptome)
58+ // NamedTuple(index: Path, samples: Channel<Sample>)
59+
60+ def multiqc_files = samples
61+ .scatter { s -> [ s. fastqc, s. quant ] } // Channel<Path>
62+ .collect() // Bag<Path> (future)
63+
64+ def summary = MULTIQC ( multiqc_files, params. multiqc ) // Path (future)
6465
6566 workflow. onComplete {
6667 log. info ( workflow. success
0 commit comments