@@ -18,23 +18,14 @@ include { MULTIQC } from './modules/multiqc'
1818 * `params.reads` can be specified as `--reads '...'`.
1919 */
2020params {
21- reads : String {
22- description ' The input read-pair files'
23- faIcon ' fas fa-folder-open'
24- defaultValue " ${ projectDir} /data/ggal/ggal_gut_{1,2}.fq"
25- }
21+ // The input read-pair files
22+ reads : String = " ${ projectDir} /data/ggal/ggal_gut_{1,2}.fq"
2623
27- transcriptome : Path {
28- description ' The input transcriptome file'
29- faIcon ' fas fa-folder-open'
30- defaultValue " ${ projectDir} /data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
31- }
24+ // The input transcriptome file
25+ transcriptome : Path = " ${ projectDir} /data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
3226
33- multiqc : Path {
34- description ' Directory containing multiqc configuration'
35- faIcon ' fas fa-folder-open'
36- defaultValue " ${ projectDir} /multiqc"
37- }
27+ // Directory containing multiqc configuration
28+ multiqc : Path = " ${ projectDir} /multiqc"
3829}
3930
4031/*
@@ -43,36 +34,34 @@ params {
4334workflow {
4435 main :
4536 log. info """ \
46- R N A S E Q - N F P I P E L I N E
47- ===================================
48- transcriptome: ${ params.transcriptome}
49- reads : ${ params.reads}
50- outdir : ${ workflow.outputDir}
37+ R N A S E Q - N F P I P E L I N E
38+ ===================================
39+ transcriptome: ${ params.transcriptome}
40+ reads : ${ params.reads}
41+ outdir : ${ workflow.outputDir}
5142 """ . stripIndent()
5243
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>)
44+ pairs = Channel . fromFilePairs(params. reads). map { (id, reads) ->
45+ [id : id, fastq_1 : reads[0 ], fastq_2 : reads[1 ]]
46+ }
5947
60- def multiqc_files = samples
61- .scatter { s -> [ s. fastqc, s. quant ] } // Channel<Path>
62- .collect() // Bag<Path> (future)
48+ rnaseq = RNASEQ (pairs, params. transcriptome)
6349
64- def summary = MULTIQC ( multiqc_files, params. multiqc ) // Path (future)
50+ multiqc_files = rnaseq. samples
51+ .scatter { s -> [ s. fastqc, s. quant ] }
52+ .collect()
6553
66- workflow. onComplete {
67- log. info ( workflow. success
68- ? " \n Done! Open the following report in your browser --> ${ workflow.outputDir} /multiqc_report.html\n "
69- : " Oops .. something went wrong" )
70- }
54+ summary = MULTIQC (multiqc_files, params. multiqc)
7155
7256 publish :
73- index >> ' index'
74- samples >> ' samples'
75- summary >> ' summary'
57+ index = rnaseq. index
58+ samples = rnaseq. samples
59+ summary = summary
60+
61+ onComplete :
62+ log. info ( workflow. success
63+ ? " \n Done! Open the following report in your browser --> ${ workflow.outputDir} /multiqc_report.html\n "
64+ : " Oops .. something went wrong" )
7665}
7766
7867/*
@@ -83,7 +72,7 @@ output {
8372 path ' .'
8473 }
8574
86- samples : Sample {
75+ samples : Channel< Sample > {
8776 path { sample -> sample. id }
8877 index {
8978 path ' samples.json'
0 commit comments