-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: christopher-hakkaart <[email protected]>
- Loading branch information
1 parent
1c3027e
commit 82b23bb
Showing
15 changed files
with
110 additions
and
320 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
@@ -1,37 +1,116 @@ | ||
#!/usr/bin/env nextflow | ||
#!/usr/bin/env nextflow | ||
|
||
/* | ||
* Proof of concept of a RNAseq pipeline implemented with Nextflow | ||
* Pipeline parameters | ||
*/ | ||
|
||
// Input data | ||
params.reads = "${workflow.projectDir}/data/ggal/ggal_gut_{1,2}.fq" | ||
|
||
// Reference file | ||
params.transcriptome = "${workflow.projectDir}/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa" | ||
|
||
// Output directory | ||
params.outdir = "results" | ||
|
||
/* | ||
* Default pipeline parameters. They can be overriden on the command line eg. | ||
* given `params.foo` specify on the run command line `--foo some_value`. | ||
* Index reference transcriptome file | ||
*/ | ||
process INDEX { | ||
tag "$transcriptome.simpleName" | ||
container "community.wave.seqera.io/library/salmon:1.10.3--482593b6cd04c9b7" | ||
conda "bioconda::salmon=1.10.3" | ||
|
||
params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq" | ||
params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.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 | ||
=================================== | ||
transcriptome: ${params.transcriptome} | ||
reads : ${params.reads} | ||
outdir : ${params.outdir} | ||
""" | ||
|
||
// import modules | ||
include { RNASEQ } from './modules/rnaseq' | ||
include { MULTIQC } from './modules/multiqc' | ||
|
||
/* | ||
* main script flow | ||
input: | ||
path transcriptome | ||
|
||
output: | ||
path 'index' | ||
|
||
script: | ||
""" | ||
salmon index --threads $task.cpus -t $transcriptome -i index | ||
""" | ||
} | ||
|
||
/* | ||
* Generate FastQC reports | ||
*/ | ||
workflow { | ||
read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true ) | ||
RNASEQ( params.transcriptome, read_pairs_ch ) | ||
MULTIQC( RNASEQ.out, params.multiqc ) | ||
process FASTQC { | ||
tag "FASTQC on $sample_id" | ||
publishDir params.outdir, mode:'copy' | ||
container "community.wave.seqera.io/library/fastqc:0.12.1--5cfd0f3cb6760c42" | ||
conda "bioconda::fastqc:0.12.1" | ||
|
||
input: | ||
tuple val(sample_id), path(reads) | ||
|
||
output: | ||
path "fastqc_${sample_id}_logs" | ||
|
||
script: | ||
""" | ||
mkdir fastqc_${sample_id}_logs | ||
fastqc -o fastqc_${sample_id}_logs -f fastq -q ${reads} | ||
""" | ||
} | ||
|
||
/* | ||
* Quantify reads | ||
*/ | ||
process QUANT { | ||
tag "$pair_id" | ||
publishDir params.outdir, mode:'copy' | ||
container "community.wave.seqera.io/library/salmon:1.10.3--482593b6cd04c9b7" | ||
conda "bioconda::salmon=1.10.3" | ||
|
||
input: | ||
path index | ||
tuple val(pair_id), path(reads) | ||
|
||
output: | ||
path pair_id | ||
|
||
script: | ||
""" | ||
salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id | ||
""" | ||
} | ||
|
||
/* | ||
* Generate MultiQC report | ||
*/ | ||
process MULTIQC { | ||
publishDir params.outdir, mode:'copy' | ||
container "community.wave.seqera.io/library/multiqc:1.24.1--789bc3917c8666da" | ||
conda "bioconda::multiqc:1.24.1" | ||
|
||
input: | ||
path '*' | ||
|
||
output: | ||
path 'multiqc_report.html' | ||
|
||
script: | ||
""" | ||
multiqc . | ||
""" | ||
} | ||
|
||
workflow { | ||
|
||
// Paired reference data | ||
read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true ) | ||
|
||
// Index reference transcriptome file | ||
INDEX(params.transcriptome) | ||
|
||
// Generate FastQC reports | ||
FASTQC(read_pairs_ch) | ||
|
||
// Quantify reads | ||
QUANT(INDEX.out, read_pairs_ch) | ||
|
||
// Generate MultiQC report | ||
MULTIQC(QUANT.out.mix(FASTQC.out).collect()) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.