diff --git a/main.nf b/main.nf deleted file mode 100644 index 8b7649f94..000000000 --- a/main.nf +++ /dev/null @@ -1,8 +0,0 @@ -include { GREETING_WORKFLOW } from './workflows/greeting' - -workflow { - Channel.from('Alice', 'Bob', 'Charlie') | GREETING_WORKFLOW - - GREETING_WORKFLOW.out.greetings_ch.view { "Original: $it" } - GREETING_WORKFLOW.out.timestamped_ch.view { "Timestamped: $it" } -} diff --git a/nf-training/hello.nf b/nf-training/hello.nf index c7772a554..948aea416 100644 --- a/nf-training/hello.nf +++ b/nf-training/hello.nf @@ -1,7 +1,6 @@ #!/usr/bin/env nextflow params.greeting = 'Hello world!' -greeting_ch = Channel.of(params.greeting) process SPLITLETTERS { input: @@ -30,6 +29,7 @@ process CONVERTTOUPPER { } workflow { + greeting_ch = Channel.of(params.greeting) letters_ch = SPLITLETTERS(greeting_ch) results_ch = CONVERTTOUPPER(letters_ch.flatten()) results_ch.view{ it } diff --git a/nf-training/hello_py.nf b/nf-training/hello_py.nf index ddfa9a900..e89f213a5 100644 --- a/nf-training/hello_py.nf +++ b/nf-training/hello_py.nf @@ -1,7 +1,6 @@ #!/usr/bin/env nextflow params.greeting = 'Hello world!' -greeting_ch = Channel.of(params.greeting) process SPLITLETTERS { input: @@ -36,6 +35,7 @@ process CONVERTTOUPPER { } workflow { + greeting_ch = Channel.of(params.greeting) letters_ch = SPLITLETTERS(greeting_ch) results_ch = CONVERTTOUPPER(letters_ch.flatten()) results_ch.view{ it } diff --git a/nf-training/modules.hello.nf b/nf-training/modules.hello.nf index d3080845a..c80bc0ac3 100644 --- a/nf-training/modules.hello.nf +++ b/nf-training/modules.hello.nf @@ -1,12 +1,12 @@ #!/usr/bin/env nextflow params.greeting = 'Hello world!' -greeting_ch = Channel.of(params.greeting) include { SPLITLETTERS } from './modules.nf' include { CONVERTTOUPPER } from './modules.nf' workflow{ + greeting_ch = Channel.of(params.greeting) letters_ch = SPLITLETTERS(greeting_ch) results_ch = CONVERTTOUPPER(letters_ch.flatten()) results_ch.view{ it } diff --git a/nf-training/script1.nf b/nf-training/script1.nf index 047c688ce..bcc8f9768 100644 --- a/nf-training/script1.nf +++ b/nf-training/script1.nf @@ -4,4 +4,6 @@ params.reads = "$projectDir/data/ggal/gut_{1,2}.fq" params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" -println "reads: $params.reads" +workflow { + println "reads: $params.reads" +} diff --git a/nf-training/script2.nf b/nf-training/script2.nf index c92791b67..7680a0ab1 100644 --- a/nf-training/script2.nf +++ b/nf-training/script2.nf @@ -8,15 +8,6 @@ params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent(true) - /* * define the `INDEX` process that creates a binary index * given the transcriptome file @@ -35,5 +26,14 @@ process INDEX { } workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent(true) + index_ch = INDEX(params.transcriptome_file) } diff --git a/nf-training/script3.nf b/nf-training/script3.nf index 5b606b491..21f33d9ae 100644 --- a/nf-training/script3.nf +++ b/nf-training/script3.nf @@ -8,13 +8,15 @@ params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent() +workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent() -read_pairs_ch = Channel.fromFilePairs(params.reads) + read_pairs_ch = Channel.fromFilePairs(params.reads) +} diff --git a/nf-training/script4.nf b/nf-training/script4.nf index 92e913eb5..bb0407318 100644 --- a/nf-training/script4.nf +++ b/nf-training/script4.nf @@ -8,15 +8,6 @@ params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent() - /* * define the `INDEX` process that creates a binary index * given the transcriptome file @@ -49,6 +40,15 @@ process QUANTIFICATION { } workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent() + Channel .fromFilePairs(params.reads, checkIfExists: true) .set { read_pairs_ch } diff --git a/nf-training/script5.nf b/nf-training/script5.nf index dc9d4ac78..a3d36d55a 100644 --- a/nf-training/script5.nf +++ b/nf-training/script5.nf @@ -8,15 +8,6 @@ params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent() - /* * define the `INDEX` process that creates a binary index * given the transcriptome file @@ -68,6 +59,15 @@ process FASTQC { } workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent() + Channel .fromFilePairs(params.reads, checkIfExists: true) .set { read_pairs_ch } diff --git a/nf-training/script6.nf b/nf-training/script6.nf index 2bc5fe7bf..a3ac679c4 100644 --- a/nf-training/script6.nf +++ b/nf-training/script6.nf @@ -8,15 +8,6 @@ params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent() - /* * define the `INDEX` process that creates a binary index * given the transcriptome file @@ -83,6 +74,14 @@ process MULTIQC { } workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent() Channel .fromFilePairs(params.reads, checkIfExists: true) .set { read_pairs_ch } diff --git a/nf-training/script7.nf b/nf-training/script7.nf index de1beeafb..4b0799e29 100644 --- a/nf-training/script7.nf +++ b/nf-training/script7.nf @@ -7,14 +7,6 @@ params.reads = "$projectDir/data/ggal/gut_{1,2}.fq" params.transcriptome_file = "$projectDir/data/ggal/transcriptome.fa" params.multiqc = "$projectDir/multiqc" params.outdir = "results" -log.info """\ - R N A S E Q - N F P I P E L I N E - =================================== - transcriptome: ${params.transcriptome_file} - reads : ${params.reads} - outdir : ${params.outdir} - """ - .stripIndent() /* * define the `INDEX` process that creates a binary index @@ -82,6 +74,14 @@ process MULTIQC { } workflow { + log.info """\ + R N A S E Q - N F P I P E L I N E + =================================== + transcriptome: ${params.transcriptome_file} + reads : ${params.reads} + outdir : ${params.outdir} + """ + .stripIndent() Channel .fromFilePairs(params.reads, checkIfExists: true) .set { read_pairs_ch } @@ -90,8 +90,8 @@ workflow { quant_ch = QUANTIFICATION(index_ch, read_pairs_ch) fastqc_ch = FASTQC(read_pairs_ch) MULTIQC(quant_ch.mix(fastqc_ch).collect()) -} -workflow.onComplete { + workflow.onComplete { log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) } +}