Skip to content

Commit

Permalink
Create example branch
Browse files Browse the repository at this point in the history
Signed-off-by: christopher-hakkaart <[email protected]>
  • Loading branch information
christopher-hakkaart committed Sep 9, 2024
1 parent 1c3027e commit 82b23bb
Show file tree
Hide file tree
Showing 15 changed files with 110 additions and 320 deletions.
6 changes: 0 additions & 6 deletions bin/fastqc.sh

This file was deleted.

10 changes: 0 additions & 10 deletions conda.yml

This file was deleted.

3 changes: 0 additions & 3 deletions docker/Docker.s3

This file was deleted.

16 changes: 0 additions & 16 deletions docker/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions docker/Makefile

This file was deleted.

133 changes: 106 additions & 27 deletions main.nf
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())
}
18 changes: 0 additions & 18 deletions modules/fastqc/main.nf

This file was deleted.

16 changes: 0 additions & 16 deletions modules/index/main.nf

This file was deleted.

20 changes: 0 additions & 20 deletions modules/multiqc/main.nf

This file was deleted.

17 changes: 0 additions & 17 deletions modules/quant/main.nf

This file was deleted.

19 changes: 0 additions & 19 deletions modules/rnaseq.nf

This file was deleted.

Binary file removed multiqc/logo.png
Binary file not shown.
11 changes: 0 additions & 11 deletions multiqc/multiqc_config.yaml

This file was deleted.

Loading

0 comments on commit 82b23bb

Please sign in to comment.