Skip to content

Commit

Permalink
Merge branch 'master' into workflow-output-dsl
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <[email protected]>
  • Loading branch information
bentsherman committed Nov 4, 2024
2 parents 267981b + 1815dc2 commit 0c7ccd9
Show file tree
Hide file tree
Showing 16 changed files with 47,257 additions and 476 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ jobs:
./nextflow run . -profile docker
env:
NXF_ANSI_LOG: false

- name: Tests Wave
run: |
curl -fsSL get.nextflow.io | bash
./nextflow run . -profile docker,wave
env:
NXF_ANSI_LOG: false
545 changes: 174 additions & 371 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ implemented with Nextflow.

1. If you don't have it already install Docker in your computer. Read more [here](https://docs.docker.com/).

2. Install Nextflow (version 23.04.0 or later):
2. Install Nextflow (version 23.10.0 or later):

curl -s https://get.nextflow.io | bash

Expand Down
12 changes: 5 additions & 7 deletions conda.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: rnaseq-nf
channels:
- seqera
- bioconda
- conda-forge
- defaults
- conda-forge
- bioconda
dependencies:
- salmon=1.10.2
- fastqc=0.12.1
- multiqc=1.15
- bioconda::fastqc=0.12.1
- bioconda::multiqc=1.25
- bioconda::salmon=1.10.3
11,748 changes: 11,748 additions & 0 deletions data/ggal/ggal_lung_1.fq

Large diffs are not rendered by default.

11,748 changes: 11,748 additions & 0 deletions data/ggal/ggal_lung_2.fq

Large diffs are not rendered by default.

11,748 changes: 11,748 additions & 0 deletions data/ggal/ggal_spleen_1.fq

Large diffs are not rendered by default.

11,748 changes: 11,748 additions & 0 deletions data/ggal/ggal_spleen_2.fq

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
FROM mambaorg/micromamba
#
# don't waste your time with this
# use seqera containers https://seqera.io/containers/
#
FROM mambaorg/micromamba:1.5.10-noble
MAINTAINER Paolo Di Tommaso <[email protected]>

RUN \
micromamba install -y -n base -c defaults -c bioconda -c conda-forge \
salmon=1.10.2 \
fastqc=0.12.1 \
multiqc=1.17 \
python=3.11 \
typing_extensions \
importlib_metadata \
procps-ng \
&& micromamba clean -a -y
COPY --chown=$MAMBA_USER:$MAMBA_USER conda.yml /tmp/conda.yml
RUN micromamba install -y -n base -f /tmp/conda.yml \
&& micromamba install -y -n base conda-forge::procps-ng \
&& micromamba clean -a -y

ENV PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
USER root
6 changes: 3 additions & 3 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version ?= v1.2.1
version ?= v1.3.0

all: build push

build:
cp ../conda.yml .
docker build --output=type=docker --progress=plain --tag quay.io/nextflow/rnaseq-nf:${version} .
docker build --output=type=docker --progress=plain --tag docker.io/nextflow/rnaseq-nf:${version} .

push:
docker push quay.io/nextflow/rnaseq-nf:${version}
docker push docker.io/nextflow/rnaseq-nf:${version}
36 changes: 9 additions & 27 deletions main.nf
Original file line number Diff line number Diff line change
@@ -1,29 +1,9 @@
#!/usr/bin/env nextflow

/*
* Copyright (c) 2013-2023, Seqera Labs.
*
* 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]>
*/

/*
* enables modules
*/
nextflow.enable.dsl = 2

nextflow.preview.output = true

Expand All @@ -37,13 +17,6 @@ params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bp
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'
Expand All @@ -53,6 +26,15 @@ include { MULTIQC } from './modules/multiqc'
* main script flow
*/
workflow {

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}
"""

read_pairs_ch = channel.fromFilePairs( params.reads, checkIfExists: true )
RNASEQ( params.transcriptome, read_pairs_ch )
MULTIQC( RNASEQ.out, params.multiqc )
Expand Down
5 changes: 1 addition & 4 deletions modules/fastqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@

process FASTQC {
tag "FASTQC on $sample_id"
conda 'fastqc=0.12.1'
conda 'bioconda::fastqc=0.12.1'

input:
tuple val(sample_id), path(reads)

output:
path "fastqc_${sample_id}_logs", emit: logs

publish:
logs >> 'fastqc'

script:
"""
fastqc.sh "$sample_id" "$reads"
Expand Down
2 changes: 1 addition & 1 deletion modules/index/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

process INDEX {
tag "$transcriptome.simpleName"
conda 'salmon=1.10.2'
conda 'bioconda::salmon=1.10.3'

input:
path transcriptome
Expand Down
10 changes: 5 additions & 5 deletions modules/multiqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

process MULTIQC {
conda 'multiqc=1.17'
conda 'bioconda::multiqc=1.25'

input:
path('*')
path(config)
path '*'
path config

output:
path('multiqc_report.html'), emit: report
path 'multiqc_report.html', emit: report

publish:
report >> 'multiqc'
Expand All @@ -16,6 +16,6 @@ process MULTIQC {
"""
cp $config/* .
echo "custom_logo: \$PWD/logo.png" >> multiqc_config.yaml
multiqc .
multiqc -o multiqc_report.html .
"""
}
2 changes: 1 addition & 1 deletion modules/quant/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

process QUANT {
tag "$pair_id"
conda 'salmon=1.10.2'
conda 'bioconda::salmon=1.10.3'

input:
path index
Expand Down
94 changes: 49 additions & 45 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,68 +9,82 @@
* defined by the Mozilla Public License, v. 2.0.
*
*/

manifest {
description = 'Proof of concept of a RNA-seq pipeline implemented with Nextflow'
description = 'Proof of concept of a RNA-seq pipeline implemented with Nextflow'
author = 'Paolo Di Tommaso'
nextflowVersion = '>=23.10.0'
}

/*
* default params
/*
* default params
*/

params.outdir = "results"
params.reads = "${projectDir}/data/ggal/ggal_gut_{1,2}.fq"
params.transcriptome = "${projectDir}/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
params.multiqc = "${projectDir}/multiqc"

/*
* defines execution profiles for different environments
*/
/*
* defines execution profiles for different environments
*/

profiles {
standard {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
}

/*
* NOTE: requires nextflow 24.03.0-edge or later
*/
wave {
'all-reads' {
params.reads = "${projectDir}/data/ggal/ggal_*_{1,2}.fq"
}

'wave' {
// note: requires nextflow 24.03.0-edge or later
wave.enabled = true
wave.strategy = 'conda'
wave.freeze = true
apptainer.ociAutoPull = true
singularity.ociAutoPull = true
}

docker {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
'wave-mirror' {
// note: requires nextflow 24.09.0-edge or later
wave.enabled = true
wave.strategy = 'container'
wave.mirror = true
wave.build.repository = 'quay.io'
}

'docker' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
docker.enabled = true
}

singularity {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
'singularity' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
singularity.enabled = true
singularity.autoMounts = true
}

conda {
'conda' {
conda.enabled = true
conda.channels = 'seqera,conda-forge,bioconda,defaults'
conda.channels = 'conda-forge,bioconda'
}

slurm {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'

'mamba' {
conda.enabled = true
conda.useMicromamba = true
conda.channels = 'conda-forge,bioconda'
}

'slurm' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
process.executor = 'slurm'
singularity.enabled = true
}
batch {

'batch' {
params.reads = 's3://rnaseq-nf/data/ggal/lung_{1,2}.fq'
params.transcriptome = 's3://rnaseq-nf/data/ggal/transcript.fa'
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
process.executor = 'awsbatch'
process.queue = 'nextflow-ci'
workDir = 's3://nextflow-ci/work'
Expand All @@ -79,47 +93,37 @@ profiles {
}

's3-data' {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
params.reads = 's3://rnaseq-nf/data/ggal/lung_{1,2}.fq'
params.transcriptome = 's3://rnaseq-nf/data/ggal/transcript.fa'
}
}

gls {
params.transcriptome = 'gs://rnaseq-nf/data/ggal/transcript.fa'
params.reads = 'gs://rnaseq-nf/data/ggal/gut_{1,2}.fq'
params.multiqc = 'gs://rnaseq-nf/multiqc'
process.executor = 'google-lifesciences'
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
workDir = 'gs://rnaseq-nf/scratch' // <- replace with your own bucket!
google.region = 'europe-west2'
}

gcb {
'google-batch' {
params.transcriptome = 'gs://rnaseq-nf/data/ggal/transcript.fa'
params.reads = 'gs://rnaseq-nf/data/ggal/gut_{1,2}.fq'
params.multiqc = 'gs://rnaseq-nf/multiqc'
process.executor = 'google-batch'
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
workDir = 'gs://rnaseq-nf/scratch' // <- replace with your own bucket!
google.region = 'europe-west2'
}

'gs-data' {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
params.transcriptome = 'gs://rnaseq-nf/data/ggal/transcript.fa'
params.reads = 'gs://rnaseq-nf/data/ggal/gut_{1,2}.fq'
}

azb {
process.container = 'quay.io/nextflow/rnaseq-nf:v1.2.1'
'azure-batch' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.0'
workDir = 'az://nf-scratch/work'
process.executor = 'azurebatch'
process.queue = 'nextflow-ci' // replace with your own Azure pool name

azure {
batch {
location = 'westeurope'
accountName = "$AZURE_BATCH_ACCOUNT_NAME"
accountName = "$AZURE_BATCH_ACCOUNT_NAME"
accountKey = "$AZURE_BATCH_ACCOUNT_KEY"
autoPoolMode = true
deletePoolsOnCompletion = true
Expand Down

0 comments on commit 0c7ccd9

Please sign in to comment.