Skip to content

Run nextflow lint -format #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
* given `params.foo` specify on the run command line `--foo some_value`.
*/

params.reads = "$baseDir/data/ggal/ggal_gut_{1,2}.fq"
params.transcriptome = "$baseDir/data/ggal/ggal_1_48850000_49020000.Ggal71.500bpflank.fa"
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"
params.multiqc = "${baseDir}/multiqc"


// import modules
Expand All @@ -25,15 +25,17 @@ include { MULTIQC } from './modules/multiqc'
*/
workflow {

log.info """\
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 )
read_pairs_ch = channel.fromFilePairs(params.reads, checkIfExists: true)
RNASEQ(params.transcriptome, read_pairs_ch)
MULTIQC(RNASEQ.out, params.multiqc)
}
6 changes: 3 additions & 3 deletions modules/fastqc/main.nf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
params.outdir = 'results'

process FASTQC {
tag "FASTQC on $sample_id"
tag "FASTQC on ${sample_id}"
conda 'bioconda::fastqc=0.12.1'
publishDir params.outdir, mode:'copy'
publishDir params.outdir, mode: 'copy'

input:
tuple val(sample_id), path(reads)
Expand All @@ -13,6 +13,6 @@ process FASTQC {

script:
"""
fastqc.sh "$sample_id" "$reads"
fastqc.sh "${sample_id}" "${reads}"
"""
}
11 changes: 5 additions & 6 deletions modules/index/main.nf
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

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

input:
path transcriptome
path transcriptome

output:
path 'index'
path 'index'

script:
"""
salmon index --threads $task.cpus -t $transcriptome -i index
salmon index --threads ${task.cpus} -t ${transcriptome} -i index
"""
}
4 changes: 2 additions & 2 deletions modules/multiqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ params.outdir = 'results'

process MULTIQC {
conda 'bioconda::multiqc=1.27.1'
publishDir params.outdir, mode:'copy'
publishDir params.outdir, mode: 'copy'

input:
path '*'
Expand All @@ -13,7 +13,7 @@ process MULTIQC {

script:
"""
cp $config/* .
cp ${config}/* .
echo "custom_logo: \$PWD/nextflow_logo.png" >> multiqc_config.yaml
multiqc -n multiqc_report.html .
"""
Expand Down
11 changes: 5 additions & 6 deletions modules/quant/main.nf
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@

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

input:
path index
tuple val(pair_id), path(reads)
path index
tuple val(pair_id), path(reads)

output:
path pair_id
path pair_id

script:
"""
salmon quant --threads $task.cpus --libType=U -i $index -1 ${reads[0]} -2 ${reads[1]} -o $pair_id
salmon quant --threads ${task.cpus} --libType=U -i ${index} -1 ${reads[0]} -2 ${reads[1]} -o ${pair_id}
"""
}
12 changes: 6 additions & 6 deletions modules/rnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ include { QUANT } from './quant'
include { FASTQC } from './fastqc'

workflow RNASEQ {
take:
take:
transcriptome
read_pairs_ch
main:

main:
INDEX(transcriptome)
FASTQC(read_pairs_ch)
QUANT(INDEX.out, read_pairs_ch)

emit:
QUANT.out | concat(FASTQC.out) | collect
}
emit:
QUANT.out | concat(FASTQC.out) | collect
}
234 changes: 117 additions & 117 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*/

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

/*
Expand All @@ -30,119 +30,119 @@ params.multiqc = "${projectDir}/multiqc"
*/

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

'all-reads' {
params.reads = "${projectDir}/data/ggal/ggal_*_{1,2}.fq"
}

'arm64' {
process.arch = 'arm64'
}

'wave' {
wave.enabled = true
wave.strategy = 'conda'
wave.freeze = true
}

'wave-mirror' {
wave.enabled = true
wave.strategy = 'container'
wave.mirror = true
wave.build.repository = 'quay.io'
}

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

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

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

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

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

'batch' {
params.reads = 's3://rnaseq-nf/data/ggal/lung_{1,2}.fq'
params.transcriptome = 's3://rnaseq-nf/data/ggal/transcript.fa'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
process.executor = 'awsbatch'
process.queue = 'nextflow-ci'
workDir = 's3://nextflow-ci/work'
aws.region = 'eu-west-1'
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
}

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

'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 = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
/*
* replace with your own bucket!
*/
workDir = 'gs://rnaseq-nf/scratch'
google.region = 'europe-west2'
}

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

'azure-batch' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
workDir = 'az://nf-scratch/work'
process.executor = 'azurebatch'
/*
*place with your own Azure pool name!
*/
process.queue = 'nextflow-ci'

/*
* make sure the following variables are defined in your environment
* - AZURE_BATCH_ACCOUNT_NAME
* - AZURE_BATCH_ACCOUNT_KEY
* - AZURE_STORAGE_ACCOUNT_NAME
* - AZURE_STORAGE_ACCOUNT_KEY
* see https://www.nextflow.io/docs/latest/azure.html#azure-batch
*/

azure {
batch {
location = 'westeurope'
autoPoolMode = true
deletePoolsOnCompletion = true
}
standard {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
}

'all-reads' {
params.reads = "${projectDir}/data/ggal/ggal_*_{1,2}.fq"
}

arm64 {
process.arch = 'arm64'
}

wave {
wave.enabled = true
wave.strategy = 'conda'
wave.freeze = true
}

'wave-mirror' {
wave.enabled = true
wave.strategy = 'container'
wave.mirror = true
wave.build.repository = 'quay.io'
}

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

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

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

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

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

batch {
params.reads = 's3://rnaseq-nf/data/ggal/lung_{1,2}.fq'
params.transcriptome = 's3://rnaseq-nf/data/ggal/transcript.fa'
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
process.executor = 'awsbatch'
process.queue = 'nextflow-ci'
workDir = 's3://nextflow-ci/work'
aws.region = 'eu-west-1'
aws.batch.cliPath = '/home/ec2-user/miniconda/bin/aws'
}

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

'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 = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
/*
* replace with your own bucket!
*/
workDir = 'gs://rnaseq-nf/scratch'
google.region = 'europe-west2'
}

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

'azure-batch' {
process.container = 'docker.io/nextflow/rnaseq-nf:v1.3.1'
workDir = 'az://nf-scratch/work'
process.executor = 'azurebatch'
/*
*place with your own Azure pool name!
*/
process.queue = 'nextflow-ci'

/*
* make sure the following variables are defined in your environment
* - AZURE_BATCH_ACCOUNT_NAME
* - AZURE_BATCH_ACCOUNT_KEY
* - AZURE_STORAGE_ACCOUNT_NAME
* - AZURE_STORAGE_ACCOUNT_KEY
* see https://www.nextflow.io/docs/latest/azure.html#azure-batch
*/

azure {
batch {
location = 'westeurope'
autoPoolMode = true
deletePoolsOnCompletion = true
}
}
}
}
}