forked from nextflow-io/nfcamp-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8677cba
commit 64a991a
Showing
15 changed files
with
249 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
def getInputForRnaseq( transcriptsPath, readsPath ) { | ||
|
||
def separateTranscriptFromReads = forkCriteria({ tuple -> | ||
trascript: tuple[0] | ||
reads: [ tuple[1], tuple[2] ] | ||
}) | ||
|
||
def reads = Channel.fromFilePairs(readsPath) | ||
Channel.fromPath(transcriptsPath) \ | ||
| combine( reads ) \ | ||
| fork(separateTranscriptFromReads) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* This Source Code Form is "Incompatible With Secondary Licenses", as | ||
* defined by the Mozilla Public License, v. 2.0. | ||
* | ||
*/ | ||
|
||
|
||
/* | ||
* Proof of concept of a RNAseq pipeline implemented with Nextflow | ||
* | ||
* Authors: | ||
* - Paolo Di Tommaso <[email protected]> | ||
* - Emilio Palumbo <[email protected]> | ||
* - Evan Floden <[email protected]> | ||
*/ | ||
nextflow.preview.dsl=2 | ||
|
||
/* | ||
* Default pipeline parameters. They can be overriden on the command line eg. | ||
* given `params.foo` specify on the run command line `--foo some_value`. | ||
*/ | ||
|
||
params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" | ||
params.transcripts = "$baseDir/data/ggal/transcriptome_*.fa" | ||
params.outdir = "results" | ||
params.multiqc = "$baseDir/multiqc" | ||
|
||
log.info """\ | ||
R N A S E Q - N F P I P E L I N E | ||
=================================== | ||
transcript1 : ${params.transcript1} | ||
transcript2 : ${params.transcript2} | ||
reads : ${params.reads} | ||
outdir : ${params.outdir} | ||
""" | ||
|
||
include './rnaseq-analysis' params(params) | ||
|
||
|
||
def getInputForRnaseq( transcriptsPath, readsPath ) { | ||
|
||
def separateTranscriptFromReads = forkCriteria({ tuple -> | ||
trascript: tuple[0] | ||
reads: [ tuple[1], tuple[2] ] | ||
}) | ||
|
||
def reads = Channel.fromFilePairs(readsPath) | ||
Channel.fromPath(transcriptsPath) \ | ||
| combine( reads ) \ | ||
| fork(separateTranscriptFromReads) | ||
|
||
} | ||
|
||
workflow { | ||
getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis | ||
} | ||
|
||
workflow.onComplete { | ||
log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG). | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* This Source Code Form is "Incompatible With Secondary Licenses", as | ||
* defined by the Mozilla Public License, v. 2.0. | ||
* | ||
*/ | ||
|
||
|
||
/* | ||
* Proof of concept of a RNAseq pipeline implemented with Nextflow | ||
* | ||
* Authors: | ||
* - Paolo Di Tommaso <[email protected]> | ||
* - Emilio Palumbo <[email protected]> | ||
* - Evan Floden <[email protected]> | ||
*/ | ||
nextflow.preview.dsl=2 | ||
|
||
/* | ||
* Default pipeline parameters. They can be overriden on the command line eg. | ||
* given `params.foo` specify on the run command line `--foo some_value`. | ||
*/ | ||
|
||
params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" | ||
params.transcripts = "$baseDir/data/ggal/transcriptome_*.fa" | ||
params.outdir = "results" | ||
params.multiqc = "$baseDir/multiqc" | ||
|
||
log.info """\ | ||
R N A S E Q - N F P I P E L I N E | ||
=================================== | ||
transcript1 : ${params.transcript1} | ||
transcript2 : ${params.transcript2} | ||
reads : ${params.reads} | ||
outdir : ${params.outdir} | ||
""" | ||
|
||
include './rnaseq-analysis-2' params(params) | ||
include './fun-library' | ||
|
||
workflow { | ||
main: | ||
getInputForRnaseq(params.transcripts, params.reads) | rnaseq_analysis | ||
publish: | ||
rnaseq_analysis.out.fastqc to: 'results/fastqc_files' | ||
rnaseq_analysis.out.quant to: 'results/quant_files' | ||
rnaseq_analysis.out.multiqc to: 'results/multiqc_report' | ||
} | ||
|
||
workflow.onComplete { | ||
log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" ) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
nextflow.preview.dsl=2 | ||
|
||
include index from './rnaseq-processes-2' params(params) | ||
include quant from './rnaseq-processes-2' params(params) | ||
include fastqc from './rnaseq-processes-2' params(params) | ||
include multiqc from './rnaseq-processes-2' params(params) | ||
|
||
|
||
workflow rnaseq_analysis { | ||
get: | ||
transcriptome | ||
read_pairs_ch | ||
|
||
main: | ||
index( transcriptome ) | ||
|
||
quant( index.out, read_pairs_ch ) | ||
|
||
fastqc( read_pairs_ch ) | ||
|
||
multiqc( | ||
quant.out.mix(fastqc.out).collect(), | ||
params.multiqc ) | ||
|
||
emit: | ||
quant = quant.out | ||
fastqc = fastqc.out | ||
multiqc = multiqc.out | ||
} | ||
|
Oops, something went wrong.