From 8c9a24f2c9ae176e9046006f34d08336008a1365 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 22 Jan 2024 11:02:00 +0000 Subject: [PATCH 1/8] Add empty nextflow.config to all modules/subworkflows/workflows --- modules/local/bedtools_genomecov/nextflow.config | 0 modules/local/cat_additional_fasta/nextflow.config | 0 modules/local/deseq2_qc/nextflow.config | 0 modules/local/dupradar/nextflow.config | 0 modules/local/gtf2bed/nextflow.config | 0 modules/local/gtf_filter/nextflow.config | 0 modules/local/multiqc_custom_biotype/nextflow.config | 0 .../local/preprocess_transcripts_fasta_gencode/nextflow.config | 0 modules/local/rsem_merge_counts/nextflow.config | 0 modules/local/star_align_igenomes/nextflow.config | 0 modules/local/star_genomegenerate_igenomes/nextflow.config | 0 modules/local/summarizedexperiment/nextflow.config | 0 modules/local/tx2gene/nextflow.config | 0 modules/local/tximport/nextflow.config | 0 modules/local/umitools_prepareforrsem/nextflow.config | 0 modules/nf-core/bbmap/bbsplit/nextflow.config | 0 modules/nf-core/cat/fastq/nextflow.config | 0 modules/nf-core/custom/getchromsizes/nextflow.config | 0 modules/nf-core/fastp/nextflow.config | 0 modules/nf-core/fastqc/nextflow.config | 0 modules/nf-core/fq/subsample/nextflow.config | 0 modules/nf-core/gffread/nextflow.config | 0 modules/nf-core/gunzip/nextflow.config | 0 modules/nf-core/hisat2/align/nextflow.config | 0 modules/nf-core/hisat2/build/nextflow.config | 0 modules/nf-core/hisat2/extractsplicesites/nextflow.config | 0 modules/nf-core/kallisto/index/nextflow.config | 0 modules/nf-core/kallisto/quant/nextflow.config | 0 modules/nf-core/multiqc/nextflow.config | 0 modules/nf-core/picard/markduplicates/nextflow.config | 0 modules/nf-core/preseq/lcextrap/nextflow.config | 0 modules/nf-core/qualimap/rnaseq/nextflow.config | 0 modules/nf-core/rsem/calculateexpression/nextflow.config | 0 modules/nf-core/rsem/preparereference/nextflow.config | 0 modules/nf-core/rseqc/bamstat/nextflow.config | 0 modules/nf-core/rseqc/inferexperiment/nextflow.config | 0 modules/nf-core/rseqc/innerdistance/nextflow.config | 0 modules/nf-core/rseqc/junctionannotation/nextflow.config | 0 modules/nf-core/rseqc/junctionsaturation/nextflow.config | 0 modules/nf-core/rseqc/readdistribution/nextflow.config | 0 modules/nf-core/rseqc/readduplication/nextflow.config | 0 modules/nf-core/rseqc/tin/nextflow.config | 0 modules/nf-core/salmon/index/nextflow.config | 0 modules/nf-core/salmon/quant/nextflow.config | 0 modules/nf-core/samtools/flagstat/nextflow.config | 0 modules/nf-core/samtools/idxstats/nextflow.config | 0 modules/nf-core/samtools/index/nextflow.config | 0 modules/nf-core/samtools/sort/nextflow.config | 0 modules/nf-core/samtools/stats/nextflow.config | 0 modules/nf-core/sortmerna/nextflow.config | 0 modules/nf-core/star/align/nextflow.config | 0 modules/nf-core/star/genomegenerate/nextflow.config | 0 modules/nf-core/stringtie/stringtie/nextflow.config | 0 modules/nf-core/subread/featurecounts/nextflow.config | 0 modules/nf-core/trimgalore/nextflow.config | 0 modules/nf-core/ucsc/bedclip/nextflow.config | 0 modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config | 0 modules/nf-core/umitools/dedup/nextflow.config | 0 modules/nf-core/umitools/extract/nextflow.config | 0 modules/nf-core/untar/nextflow.config | 0 subworkflows/local/align_star/nextflow.config | 0 subworkflows/local/prepare_genome/nextflow.config | 0 subworkflows/local/quantify_pseudo/nextflow.config | 0 subworkflows/local/quantify_rsem/nextflow.config | 0 subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config | 0 .../nf-core/bam_dedup_stats_samtools_umitools/nextflow.config | 0 subworkflows/nf-core/bam_markduplicates_picard/nextflow.config | 0 subworkflows/nf-core/bam_rseqc/nextflow.config | 0 subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config | 0 subworkflows/nf-core/bam_stats_samtools/nextflow.config | 0 .../nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config | 0 subworkflows/nf-core/fastq_align_hisat2/nextflow.config | 0 subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config | 0 .../nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config | 0 subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config | 0 subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config | 0 subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config | 0 subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config | 0 workflows/rnaseq/nextflow.config | 0 79 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 modules/local/bedtools_genomecov/nextflow.config create mode 100644 modules/local/cat_additional_fasta/nextflow.config create mode 100644 modules/local/deseq2_qc/nextflow.config create mode 100644 modules/local/dupradar/nextflow.config create mode 100644 modules/local/gtf2bed/nextflow.config create mode 100644 modules/local/gtf_filter/nextflow.config create mode 100644 modules/local/multiqc_custom_biotype/nextflow.config create mode 100644 modules/local/preprocess_transcripts_fasta_gencode/nextflow.config create mode 100644 modules/local/rsem_merge_counts/nextflow.config create mode 100644 modules/local/star_align_igenomes/nextflow.config create mode 100644 modules/local/star_genomegenerate_igenomes/nextflow.config create mode 100644 modules/local/summarizedexperiment/nextflow.config create mode 100644 modules/local/tx2gene/nextflow.config create mode 100644 modules/local/tximport/nextflow.config create mode 100644 modules/local/umitools_prepareforrsem/nextflow.config create mode 100644 modules/nf-core/bbmap/bbsplit/nextflow.config create mode 100644 modules/nf-core/cat/fastq/nextflow.config create mode 100644 modules/nf-core/custom/getchromsizes/nextflow.config create mode 100644 modules/nf-core/fastp/nextflow.config create mode 100644 modules/nf-core/fastqc/nextflow.config create mode 100644 modules/nf-core/fq/subsample/nextflow.config create mode 100644 modules/nf-core/gffread/nextflow.config create mode 100644 modules/nf-core/gunzip/nextflow.config create mode 100644 modules/nf-core/hisat2/align/nextflow.config create mode 100644 modules/nf-core/hisat2/build/nextflow.config create mode 100644 modules/nf-core/hisat2/extractsplicesites/nextflow.config create mode 100644 modules/nf-core/kallisto/index/nextflow.config create mode 100644 modules/nf-core/kallisto/quant/nextflow.config create mode 100644 modules/nf-core/multiqc/nextflow.config create mode 100644 modules/nf-core/picard/markduplicates/nextflow.config create mode 100644 modules/nf-core/preseq/lcextrap/nextflow.config create mode 100644 modules/nf-core/qualimap/rnaseq/nextflow.config create mode 100644 modules/nf-core/rsem/calculateexpression/nextflow.config create mode 100644 modules/nf-core/rsem/preparereference/nextflow.config create mode 100644 modules/nf-core/rseqc/bamstat/nextflow.config create mode 100644 modules/nf-core/rseqc/inferexperiment/nextflow.config create mode 100644 modules/nf-core/rseqc/innerdistance/nextflow.config create mode 100644 modules/nf-core/rseqc/junctionannotation/nextflow.config create mode 100644 modules/nf-core/rseqc/junctionsaturation/nextflow.config create mode 100644 modules/nf-core/rseqc/readdistribution/nextflow.config create mode 100644 modules/nf-core/rseqc/readduplication/nextflow.config create mode 100644 modules/nf-core/rseqc/tin/nextflow.config create mode 100644 modules/nf-core/salmon/index/nextflow.config create mode 100644 modules/nf-core/salmon/quant/nextflow.config create mode 100644 modules/nf-core/samtools/flagstat/nextflow.config create mode 100644 modules/nf-core/samtools/idxstats/nextflow.config create mode 100644 modules/nf-core/samtools/index/nextflow.config create mode 100644 modules/nf-core/samtools/sort/nextflow.config create mode 100644 modules/nf-core/samtools/stats/nextflow.config create mode 100644 modules/nf-core/sortmerna/nextflow.config create mode 100644 modules/nf-core/star/align/nextflow.config create mode 100644 modules/nf-core/star/genomegenerate/nextflow.config create mode 100644 modules/nf-core/stringtie/stringtie/nextflow.config create mode 100644 modules/nf-core/subread/featurecounts/nextflow.config create mode 100644 modules/nf-core/trimgalore/nextflow.config create mode 100644 modules/nf-core/ucsc/bedclip/nextflow.config create mode 100644 modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config create mode 100644 modules/nf-core/umitools/dedup/nextflow.config create mode 100644 modules/nf-core/umitools/extract/nextflow.config create mode 100644 modules/nf-core/untar/nextflow.config create mode 100644 subworkflows/local/align_star/nextflow.config create mode 100644 subworkflows/local/prepare_genome/nextflow.config create mode 100644 subworkflows/local/quantify_pseudo/nextflow.config create mode 100644 subworkflows/local/quantify_rsem/nextflow.config create mode 100644 subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config create mode 100644 subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config create mode 100644 subworkflows/nf-core/bam_markduplicates_picard/nextflow.config create mode 100644 subworkflows/nf-core/bam_rseqc/nextflow.config create mode 100644 subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config create mode 100644 subworkflows/nf-core/bam_stats_samtools/nextflow.config create mode 100644 subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config create mode 100644 subworkflows/nf-core/fastq_align_hisat2/nextflow.config create mode 100644 subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config create mode 100644 subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config create mode 100644 subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config create mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config create mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config create mode 100644 subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config create mode 100644 workflows/rnaseq/nextflow.config diff --git a/modules/local/bedtools_genomecov/nextflow.config b/modules/local/bedtools_genomecov/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/cat_additional_fasta/nextflow.config b/modules/local/cat_additional_fasta/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/deseq2_qc/nextflow.config b/modules/local/deseq2_qc/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/dupradar/nextflow.config b/modules/local/dupradar/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/gtf2bed/nextflow.config b/modules/local/gtf2bed/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/gtf_filter/nextflow.config b/modules/local/gtf_filter/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/multiqc_custom_biotype/nextflow.config b/modules/local/multiqc_custom_biotype/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/preprocess_transcripts_fasta_gencode/nextflow.config b/modules/local/preprocess_transcripts_fasta_gencode/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/rsem_merge_counts/nextflow.config b/modules/local/rsem_merge_counts/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/star_align_igenomes/nextflow.config b/modules/local/star_align_igenomes/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/star_genomegenerate_igenomes/nextflow.config b/modules/local/star_genomegenerate_igenomes/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/summarizedexperiment/nextflow.config b/modules/local/summarizedexperiment/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/tx2gene/nextflow.config b/modules/local/tx2gene/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/tximport/nextflow.config b/modules/local/tximport/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/local/umitools_prepareforrsem/nextflow.config b/modules/local/umitools_prepareforrsem/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/bbmap/bbsplit/nextflow.config b/modules/nf-core/bbmap/bbsplit/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/cat/fastq/nextflow.config b/modules/nf-core/cat/fastq/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/custom/getchromsizes/nextflow.config b/modules/nf-core/custom/getchromsizes/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/fastp/nextflow.config b/modules/nf-core/fastp/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/fastqc/nextflow.config b/modules/nf-core/fastqc/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/fq/subsample/nextflow.config b/modules/nf-core/fq/subsample/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/gffread/nextflow.config b/modules/nf-core/gffread/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/gunzip/nextflow.config b/modules/nf-core/gunzip/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/hisat2/align/nextflow.config b/modules/nf-core/hisat2/align/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/hisat2/build/nextflow.config b/modules/nf-core/hisat2/build/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/hisat2/extractsplicesites/nextflow.config b/modules/nf-core/hisat2/extractsplicesites/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/kallisto/index/nextflow.config b/modules/nf-core/kallisto/index/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/kallisto/quant/nextflow.config b/modules/nf-core/kallisto/quant/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/picard/markduplicates/nextflow.config b/modules/nf-core/picard/markduplicates/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/preseq/lcextrap/nextflow.config b/modules/nf-core/preseq/lcextrap/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/qualimap/rnaseq/nextflow.config b/modules/nf-core/qualimap/rnaseq/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rsem/calculateexpression/nextflow.config b/modules/nf-core/rsem/calculateexpression/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rsem/preparereference/nextflow.config b/modules/nf-core/rsem/preparereference/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/bamstat/nextflow.config b/modules/nf-core/rseqc/bamstat/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/inferexperiment/nextflow.config b/modules/nf-core/rseqc/inferexperiment/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/innerdistance/nextflow.config b/modules/nf-core/rseqc/innerdistance/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/junctionannotation/nextflow.config b/modules/nf-core/rseqc/junctionannotation/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/junctionsaturation/nextflow.config b/modules/nf-core/rseqc/junctionsaturation/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/readdistribution/nextflow.config b/modules/nf-core/rseqc/readdistribution/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/readduplication/nextflow.config b/modules/nf-core/rseqc/readduplication/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/rseqc/tin/nextflow.config b/modules/nf-core/rseqc/tin/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/salmon/index/nextflow.config b/modules/nf-core/salmon/index/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/salmon/quant/nextflow.config b/modules/nf-core/salmon/quant/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/samtools/flagstat/nextflow.config b/modules/nf-core/samtools/flagstat/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/samtools/idxstats/nextflow.config b/modules/nf-core/samtools/idxstats/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/samtools/index/nextflow.config b/modules/nf-core/samtools/index/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/samtools/sort/nextflow.config b/modules/nf-core/samtools/sort/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/samtools/stats/nextflow.config b/modules/nf-core/samtools/stats/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/sortmerna/nextflow.config b/modules/nf-core/sortmerna/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/star/align/nextflow.config b/modules/nf-core/star/align/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/star/genomegenerate/nextflow.config b/modules/nf-core/star/genomegenerate/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/stringtie/stringtie/nextflow.config b/modules/nf-core/stringtie/stringtie/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/subread/featurecounts/nextflow.config b/modules/nf-core/subread/featurecounts/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/trimgalore/nextflow.config b/modules/nf-core/trimgalore/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/ucsc/bedclip/nextflow.config b/modules/nf-core/ucsc/bedclip/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config b/modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/umitools/dedup/nextflow.config b/modules/nf-core/umitools/dedup/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/umitools/extract/nextflow.config b/modules/nf-core/umitools/extract/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/modules/nf-core/untar/nextflow.config b/modules/nf-core/untar/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/local/align_star/nextflow.config b/subworkflows/local/align_star/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/local/prepare_genome/nextflow.config b/subworkflows/local/prepare_genome/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/local/quantify_pseudo/nextflow.config b/subworkflows/local/quantify_pseudo/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/local/quantify_rsem/nextflow.config b/subworkflows/local/quantify_rsem/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config b/subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bam_rseqc/nextflow.config b/subworkflows/nf-core/bam_rseqc/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config b/subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bam_stats_samtools/nextflow.config b/subworkflows/nf-core/bam_stats_samtools/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config b/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config b/subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config new file mode 100644 index 000000000..e69de29bb diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config new file mode 100644 index 000000000..e69de29bb From 2af8c4709d7ae6587f41742eb6a98e842a1a3ed1 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 22 Jan 2024 11:53:41 +0000 Subject: [PATCH 2/8] Rename quantify_pseudo to quantify_pseudo_alignment --- .../local/quantify_pseudo/nextflow.config | 0 .../main.nf | 0 .../quantify_pseudo_alignment/nextflow.config | 44 +++++++++++++++++++ 3 files changed, 44 insertions(+) delete mode 100644 subworkflows/local/quantify_pseudo/nextflow.config rename subworkflows/local/{quantify_pseudo => quantify_pseudo_alignment}/main.nf (100%) create mode 100644 subworkflows/local/quantify_pseudo_alignment/nextflow.config diff --git a/subworkflows/local/quantify_pseudo/nextflow.config b/subworkflows/local/quantify_pseudo/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/local/quantify_pseudo/main.nf b/subworkflows/local/quantify_pseudo_alignment/main.nf similarity index 100% rename from subworkflows/local/quantify_pseudo/main.nf rename to subworkflows/local/quantify_pseudo_alignment/main.nf diff --git a/subworkflows/local/quantify_pseudo_alignment/nextflow.config b/subworkflows/local/quantify_pseudo_alignment/nextflow.config new file mode 100644 index 000000000..a9c246233 --- /dev/null +++ b/subworkflows/local/quantify_pseudo_alignment/nextflow.config @@ -0,0 +1,44 @@ +process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { + ext.args = params.extra_kallisto_quant_args ?: '' + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file From 79adcbf2667e2590ec66116152d697610dd1d673 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 22 Jan 2024 12:18:21 +0000 Subject: [PATCH 3/8] First pass updates to split config out of modules.config --- .../local/bedtools_genomecov/nextflow.config | 8 + modules/local/dupradar/nextflow.config | 31 ++ .../multiqc_custom_biotype/nextflow.config | 9 + modules/nf-core/bbmap/bbsplit/nextflow.config | 18 + modules/nf-core/cat/fastq/nextflow.config | 9 + modules/nf-core/multiqc/nextflow.config | 14 + .../nf-core/preseq/lcextrap/nextflow.config | 17 + .../nf-core/qualimap/rnaseq/nextflow.config | 9 + modules/nf-core/sortmerna/nextflow.config | 18 + .../stringtie/stringtie/nextflow.config | 13 + .../subread/featurecounts/nextflow.config | 14 + nextflow.config | 14 +- subworkflows/local/align_star/nextflow.config | 37 +++ .../local/prepare_genome/nextflow.config | 114 +++++++ .../local/quantify_rsem/nextflow.config | 37 +++ .../bam_markduplicates_picard/nextflow.config | 37 +++ .../nf-core/bam_rseqc/nextflow.config | 119 +++++++ .../fastq_align_hisat2/nextflow.config | 24 ++ .../nextflow.config | 58 ++++ .../nextflow.config | 54 +++ .../fastq_subsample_fq_salmon/nextflow.config | 16 + workflows/rnaseq/main.nf | 4 +- workflows/rnaseq/nextflow.config | 308 ++++++++++++++++++ 23 files changed, 978 insertions(+), 4 deletions(-) diff --git a/modules/local/bedtools_genomecov/nextflow.config b/modules/local/bedtools_genomecov/nextflow.config index e69de29bb..c476b70cc 100644 --- a/modules/local/bedtools_genomecov/nextflow.config +++ b/modules/local/bedtools_genomecov/nextflow.config @@ -0,0 +1,8 @@ +process { + withName: 'BEDTOOLS_GENOMECOV' { + ext.args = '-split -du' + publishDir = [ + enabled: false + ] + } +} \ No newline at end of file diff --git a/modules/local/dupradar/nextflow.config b/modules/local/dupradar/nextflow.config index e69de29bb..6a518df66 100644 --- a/modules/local/dupradar/nextflow.config +++ b/modules/local/dupradar/nextflow.config @@ -0,0 +1,31 @@ +process { + withName: 'DUPRADAR' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, + mode: params.publish_dir_mode, + pattern: "*Dens.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, + mode: params.publish_dir_mode, + pattern: "*Boxplot.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, + mode: params.publish_dir_mode, + pattern: "*Hist.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, + mode: params.publish_dir_mode, + pattern: "*Matrix.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, + mode: params.publish_dir_mode, + pattern: "*slope.txt" + ] + ] + } +} \ No newline at end of file diff --git a/modules/local/multiqc_custom_biotype/nextflow.config b/modules/local/multiqc_custom_biotype/nextflow.config index e69de29bb..cef49e565 100644 --- a/modules/local/multiqc_custom_biotype/nextflow.config +++ b/modules/local/multiqc_custom_biotype/nextflow.config @@ -0,0 +1,9 @@ +process { + withName: 'MULTIQC_CUSTOM_BIOTYPE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/bbmap/bbsplit/nextflow.config b/modules/nf-core/bbmap/bbsplit/nextflow.config index e69de29bb..7e871bbba 100644 --- a/modules/nf-core/bbmap/bbsplit/nextflow.config +++ b/modules/nf-core/bbmap/bbsplit/nextflow.config @@ -0,0 +1,18 @@ +process { + withName: 'BBMAP_BBSPLIT' { + ext.args = 'build=1 ambiguous2=all maxindel=150000' + publishDir = [ + [ + path: { "${params.outdir}/bbsplit" }, + mode: params.publish_dir_mode, + pattern: '*.txt' + ], + [ + path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_bbsplit_reads ? it : null } + ] + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/cat/fastq/nextflow.config b/modules/nf-core/cat/fastq/nextflow.config index e69de29bb..9d4372756 100644 --- a/modules/nf-core/cat/fastq/nextflow.config +++ b/modules/nf-core/cat/fastq/nextflow.config @@ -0,0 +1,9 @@ +process { + withName: 'CAT_FASTQ' { + publishDir = [ + path: { params.save_merged_fastq ? "${params.outdir}/fastq" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename.endsWith('.fastq.gz') && params.save_merged_fastq) ? filename : null } + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config index e69de29bb..ea3e6f2f6 100644 --- a/modules/nf-core/multiqc/nextflow.config +++ b/modules/nf-core/multiqc/nextflow.config @@ -0,0 +1,14 @@ +process { + withName: 'MULTIQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + ext.prefix = "multiqc_report" + publishDir = [ + path: { [ + "${params.outdir}/multiqc", + params.skip_alignment? '' : "/${params.aligner}" + ].join('') }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/nextflow.config b/modules/nf-core/preseq/lcextrap/nextflow.config index e69de29bb..45eb850f6 100644 --- a/modules/nf-core/preseq/lcextrap/nextflow.config +++ b/modules/nf-core/preseq/lcextrap/nextflow.config @@ -0,0 +1,17 @@ +process { + withName: 'PRESEQ_LCEXTRAP' { + ext.args = '-verbose -bam -seed 1 -seg_len 100000000' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/preseq" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/preseq/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ] + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/qualimap/rnaseq/nextflow.config b/modules/nf-core/qualimap/rnaseq/nextflow.config index e69de29bb..0cb803147 100644 --- a/modules/nf-core/qualimap/rnaseq/nextflow.config +++ b/modules/nf-core/qualimap/rnaseq/nextflow.config @@ -0,0 +1,9 @@ +process { + withName: 'QUALIMAP_RNASEQ' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/qualimap" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/sortmerna/nextflow.config b/modules/nf-core/sortmerna/nextflow.config index e69de29bb..bff7e944c 100644 --- a/modules/nf-core/sortmerna/nextflow.config +++ b/modules/nf-core/sortmerna/nextflow.config @@ -0,0 +1,18 @@ +process { + withName: 'SORTMERNA' { + ext.args = '--num_alignments 1 -v' + publishDir = [ + [ + path: { "${params.outdir}/sortmerna" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_non_ribo_reads ? it : null } + ] + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/stringtie/stringtie/nextflow.config b/modules/nf-core/stringtie/stringtie/nextflow.config index e69de29bb..292c66318 100644 --- a/modules/nf-core/stringtie/stringtie/nextflow.config +++ b/modules/nf-core/stringtie/stringtie/nextflow.config @@ -0,0 +1,13 @@ +process { + withName: 'STRINGTIE_STRINGTIE' { + ext.args = { [ + '-v', + params.stringtie_ignore_gtf ? '' : '-e' + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/stringtie" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/modules/nf-core/subread/featurecounts/nextflow.config b/modules/nf-core/subread/featurecounts/nextflow.config index e69de29bb..a7531a18b 100644 --- a/modules/nf-core/subread/featurecounts/nextflow.config +++ b/modules/nf-core/subread/featurecounts/nextflow.config @@ -0,0 +1,14 @@ +process { + withName: 'SUBREAD_FEATURECOUNTS' { + ext.args = { [ + '-B -C', + params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", + "-t $params.featurecounts_feature_type" + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/nextflow.config b/nextflow.config index c4e5a8a30..d9e5e00b2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -135,6 +135,15 @@ params { } +// Default publishing logic for pipeline +process { + publishDir = [ + path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] +} + // Load base.config by default for all pipelines includeConfig 'conf/base.config' @@ -324,8 +333,9 @@ manifest { doi = 'https://doi.org/10.5281/zenodo.1400710' } -// Load modules.config for DSL2 module specific options -includeConfig 'conf/modules.config' +// Workflow specific config +includeConfig "./subworkflows/local/prepare_genome/nextflow.config" +includeConfig './workflows/rnaseq/nextflow.config' // Function to ensure that resource requirements don't go beyond // a maximum limit diff --git a/subworkflows/local/align_star/nextflow.config b/subworkflows/local/align_star/nextflow.config index e69de29bb..4aa0852c2 100644 --- a/subworkflows/local/align_star/nextflow.config +++ b/subworkflows/local/align_star/nextflow.config @@ -0,0 +1,37 @@ +process { + withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' { + ext.args = { [ + '--quantMode TranscriptomeSAM', + '--twopassMode Basic', + '--outSAMtype BAM Unsorted', + '--readFilesCommand zcat', + '--runRNGseed 0', + '--outFilterMultimapNmax 20', + '--alignSJDBoverhangMin 1', + '--outSAMattributes NH HI AS NM MD', + '--quantTranscriptomeBan Singleend', + '--outSAMstrandField intronMotif', + params.save_unaligned ? '--outReadsUnmapped Fastx' : '', + params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : '' + ].flatten().unique(false).join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.{out,tab}' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_unaligned ? it : null } + ] + ] + } +} \ No newline at end of file diff --git a/subworkflows/local/prepare_genome/nextflow.config b/subworkflows/local/prepare_genome/nextflow.config index e69de29bb..98a4b64fd 100644 --- a/subworkflows/local/prepare_genome/nextflow.config +++ b/subworkflows/local/prepare_genome/nextflow.config @@ -0,0 +1,114 @@ +process { + withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'UNTAR_.*' { + ext.args2 = '--no-same-owner' + } + + withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'GFFREAD' { + ext.args = '--keep-exon-attrs -F -T' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'HISAT2_EXTRACTSPLICESITES' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'SALMON_INDEX' { + ext.args = { [ + params.gencode ? '--gencode' : '', + params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}": '' + ].join(' ').trim() } + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'KALLISTO_INDEX' { + ext.args = params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}" : '' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'RSEM_PREPAREREFERENCE_GENOME' { + ext.args = '--star' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'GTF2BED' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'GTF_FILTER' { + ext.args = { params.skip_gtf_transcript_filter ?: '--skip_transcript_id_check' } + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + + withName: 'CUSTOM_GETCHROMSIZES' { + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } +} + +if (!params.skip_bbsplit && params.bbsplit_fasta_list) { + process { + withName: 'PREPARE_GENOME:BBMAP_BBSPLIT' { + ext.args = 'build=1' + publishDir = [ + path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, + mode: params.publish_dir_mode, + saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } + ] + } + } +} diff --git a/subworkflows/local/quantify_rsem/nextflow.config b/subworkflows/local/quantify_rsem/nextflow.config index e69de29bb..55f679c2b 100644 --- a/subworkflows/local/quantify_rsem/nextflow.config +++ b/subworkflows/local/quantify_rsem/nextflow.config @@ -0,0 +1,37 @@ +process { + withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION' { + ext.args = [ + '--star', + '--star-output-genome-bam', + '--star-gzipped-read-file', + '--estimate-rspd', + '--seed 1' + ].join(' ').trim() + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: "*.{stat,results}" + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.bam", + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ] + ] + } + + withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config index e69de29bb..72b61fa2d 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config +++ b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config @@ -0,0 +1,37 @@ +process { + withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { + ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/picard_metrics" }, + mode: params.publish_dir_mode, + pattern: '*metrics.txt' + ], + [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: '*.bam' + ] + ] + } + + withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}' + ] + } + + withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.markdup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/bam_rseqc/nextflow.config b/subworkflows/nf-core/bam_rseqc/nextflow.config index e69de29bb..0e56f102e 100644 --- a/subworkflows/nf-core/bam_rseqc/nextflow.config +++ b/subworkflows/nf-core/bam_rseqc/nextflow.config @@ -0,0 +1,119 @@ +process { + withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, + mode: params.publish_dir_mode, + pattern: '*.bed' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, + mode: params.publish_dir_mode, + pattern: '*.txt', + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + + withName: '.*:BAM_RSEQC:RSEQC_TIN' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config index e69de29bb..2e1d4b7f6 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config +++ b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config @@ -0,0 +1,24 @@ +process { + withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { + ext.args = '--met-stderr --new-summary --dta' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_unaligned ? it : null } + ] + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config index e69de29bb..6bd31b449 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config @@ -0,0 +1,58 @@ +process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { + ext.args = '--quiet' + } + + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { + ext.args = '--quiet' + publishDir = [ + path: { "${params.outdir}/${params.trimmer}/fastqc" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { + ext.args = { params.extra_fastp_args ?: '' } + publishDir = [ + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.{json,html}" + ], + [ + path: { "${params.outdir}/${params.trimmer}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_trimmed ? it : null } + ] + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config index e69de29bb..724d0e50f 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config @@ -0,0 +1,54 @@ +process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { + ext.args = '--quiet' + } + + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { + ext.args = { + [ + "--fastqc_args '-t ${task.cpus}'", + params.extra_trimgalore_args ? params.extra_trimgalore_args.split("\\s(?=--)") : '' + ].flatten().unique(false).join(' ').trim() + } + publishDir = [ + [ + path: { "${params.outdir}/${params.trimmer}/fastqc" }, + mode: params.publish_dir_mode, + pattern: "*.{html,zip}" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fq.gz", + saveAs: { params.save_trimmed ? it : null } + ], + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ] + ] + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config b/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config index e69de29bb..5425935cd 100644 --- a/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config +++ b/subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config @@ -0,0 +1,16 @@ +process { + withName: '.*:FASTQ_SUBSAMPLE_FQ_SALMON:FQ_SUBSAMPLE' { + ext.args = '--record-count 1000000 --seed 1' + ext.prefix = { "${meta.id}.subsampled" } + publishDir = [ + enabled: false + ] + } + + withName: '.*:FASTQ_SUBSAMPLE_FQ_SALMON:SALMON_QUANT' { + ext.args = '--skipQuant' + publishDir = [ + enabled: false + ] + } +} \ No newline at end of file diff --git a/workflows/rnaseq/main.nf b/workflows/rnaseq/main.nf index e19ccbbf0..fb9a7e979 100755 --- a/workflows/rnaseq/main.nf +++ b/workflows/rnaseq/main.nf @@ -20,8 +20,8 @@ include { UMITOOLS_PREPAREFORRSEM as UMITOOLS_PREPAREFORSALMON } from '../../mod // include { ALIGN_STAR } from '../../subworkflows/local/align_star' include { QUANTIFY_RSEM } from '../../subworkflows/local/quantify_rsem' -include { QUANTIFY_PSEUDO_ALIGNMENT as QUANTIFY_STAR_SALMON } from '../../subworkflows/local/quantify_pseudo' -include { QUANTIFY_PSEUDO_ALIGNMENT } from '../../subworkflows/local/quantify_pseudo' +include { QUANTIFY_PSEUDO_ALIGNMENT as QUANTIFY_STAR_SALMON } from '../../subworkflows/local/quantify_pseudo_alignment' +include { QUANTIFY_PSEUDO_ALIGNMENT } from '../../subworkflows/local/quantify_pseudo_alignment' include { multiqcTsvFromList } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline' include { getSalmonInferredStrandedness } from '../../subworkflows/local/utils_nfcore_rnaseq_pipeline' diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config index e69de29bb..0c6d94136 100644 --- a/workflows/rnaseq/nextflow.config +++ b/workflows/rnaseq/nextflow.config @@ -0,0 +1,308 @@ +includeConfig "../../modules/local/bedtools_genomecov/nextflow.config" +includeConfig "../../modules/local/dupradar/nextflow.config" +includeConfig "../../modules/local/multiqc_custom_biotype/nextflow.config" +includeConfig "../../modules/nf-core/bbmap/bbsplit/nextflow.config" +includeConfig "../../modules/nf-core/cat/fastq/nextflow.config" +includeConfig "../../modules/nf-core/multiqc/nextflow.config" +includeConfig "../../modules/nf-core/preseq/lcextrap/nextflow.config" +includeConfig "../../modules/nf-core/qualimap/rnaseq/nextflow.config" +includeConfig "../../modules/nf-core/sortmerna/nextflow.config" +includeConfig "../../modules/nf-core/stringtie/stringtie/nextflow.config" +includeConfig "../../modules/nf-core/subread/featurecounts/nextflow.config" +includeConfig "../../subworkflows/local/align_star/nextflow.config" +includeConfig "../../subworkflows/local/quantify_rsem/nextflow.config" +includeConfig "../../subworkflows/nf-core/bam_markduplicates_picard/nextflow.config" +includeConfig "../../subworkflows/nf-core/bam_rseqc/nextflow.config" +includeConfig "../../subworkflows/nf-core/fastq_align_hisat2/nextflow.config" +includeConfig "../../subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config" +includeConfig "../../subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config" +includeConfig "../../subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config" + +process { + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: "*.{stats,flagstat,idxstats}" + ] + } + + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.sorted" } + publishDir = [ + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.bam", + saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + publishDir = [ + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.{bai,csi}", + saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.transcriptome.sorted" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bai', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:SAMTOOLS_SORT' { + ext.args = '-n' + ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:UMITOOLS_PREPAREFORSALMON' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { + ext.args = { [ + meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', + params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' + ], + [ + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + publishDir = [ + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}', + saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { + ext.args = { [ + meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', + params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' + ], + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bai', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.forward" } + publishDir = [ + enabled: false + ] + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.forward" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/bigwig" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.reverse" } + publishDir = [ + enabled: false + ] + } + + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.reverse" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/bigwig" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: 'DESEQ2_QC_STAR_SALMON' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = 'star_salmon' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } + + withName: 'DESEQ2_QC_RSEM' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = 'star_rsem' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } + + withName: 'DESEQ2_QC_PSEUDO' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = { params.pseudo_aligner } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } +} \ No newline at end of file From 0a0b7705fcac2cbbd63abfdce86dc052a234b17f Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Mon, 22 Jan 2024 12:18:44 +0000 Subject: [PATCH 4/8] Delete empty nextflow.config files --- modules/local/cat_additional_fasta/nextflow.config | 0 modules/local/deseq2_qc/nextflow.config | 0 modules/local/gtf2bed/nextflow.config | 0 modules/local/gtf_filter/nextflow.config | 0 .../local/preprocess_transcripts_fasta_gencode/nextflow.config | 0 modules/local/rsem_merge_counts/nextflow.config | 0 modules/local/star_align_igenomes/nextflow.config | 0 modules/local/star_genomegenerate_igenomes/nextflow.config | 0 modules/local/summarizedexperiment/nextflow.config | 0 modules/local/tx2gene/nextflow.config | 0 modules/local/tximport/nextflow.config | 0 modules/local/umitools_prepareforrsem/nextflow.config | 0 modules/nf-core/custom/getchromsizes/nextflow.config | 0 modules/nf-core/fastp/nextflow.config | 0 modules/nf-core/fastqc/nextflow.config | 0 modules/nf-core/fq/subsample/nextflow.config | 0 modules/nf-core/gffread/nextflow.config | 0 modules/nf-core/gunzip/nextflow.config | 0 modules/nf-core/hisat2/align/nextflow.config | 0 modules/nf-core/hisat2/build/nextflow.config | 0 modules/nf-core/hisat2/extractsplicesites/nextflow.config | 0 modules/nf-core/kallisto/index/nextflow.config | 0 modules/nf-core/kallisto/quant/nextflow.config | 0 modules/nf-core/picard/markduplicates/nextflow.config | 0 modules/nf-core/rsem/calculateexpression/nextflow.config | 0 modules/nf-core/rsem/preparereference/nextflow.config | 0 modules/nf-core/rseqc/bamstat/nextflow.config | 0 modules/nf-core/rseqc/inferexperiment/nextflow.config | 0 modules/nf-core/rseqc/innerdistance/nextflow.config | 0 modules/nf-core/rseqc/junctionannotation/nextflow.config | 0 modules/nf-core/rseqc/junctionsaturation/nextflow.config | 0 modules/nf-core/rseqc/readdistribution/nextflow.config | 0 modules/nf-core/rseqc/readduplication/nextflow.config | 0 modules/nf-core/rseqc/tin/nextflow.config | 0 modules/nf-core/salmon/index/nextflow.config | 0 modules/nf-core/salmon/quant/nextflow.config | 0 modules/nf-core/samtools/flagstat/nextflow.config | 0 modules/nf-core/samtools/idxstats/nextflow.config | 0 modules/nf-core/samtools/index/nextflow.config | 0 modules/nf-core/samtools/sort/nextflow.config | 0 modules/nf-core/samtools/stats/nextflow.config | 0 modules/nf-core/star/align/nextflow.config | 0 modules/nf-core/star/genomegenerate/nextflow.config | 0 modules/nf-core/trimgalore/nextflow.config | 0 modules/nf-core/ucsc/bedclip/nextflow.config | 0 modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config | 0 modules/nf-core/umitools/dedup/nextflow.config | 0 modules/nf-core/umitools/extract/nextflow.config | 0 modules/nf-core/untar/nextflow.config | 0 subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config | 0 .../nf-core/bam_dedup_stats_samtools_umitools/nextflow.config | 0 subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config | 0 subworkflows/nf-core/bam_stats_samtools/nextflow.config | 0 .../nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config | 0 subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config | 0 subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config | 0 subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config | 0 57 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 modules/local/cat_additional_fasta/nextflow.config delete mode 100644 modules/local/deseq2_qc/nextflow.config delete mode 100644 modules/local/gtf2bed/nextflow.config delete mode 100644 modules/local/gtf_filter/nextflow.config delete mode 100644 modules/local/preprocess_transcripts_fasta_gencode/nextflow.config delete mode 100644 modules/local/rsem_merge_counts/nextflow.config delete mode 100644 modules/local/star_align_igenomes/nextflow.config delete mode 100644 modules/local/star_genomegenerate_igenomes/nextflow.config delete mode 100644 modules/local/summarizedexperiment/nextflow.config delete mode 100644 modules/local/tx2gene/nextflow.config delete mode 100644 modules/local/tximport/nextflow.config delete mode 100644 modules/local/umitools_prepareforrsem/nextflow.config delete mode 100644 modules/nf-core/custom/getchromsizes/nextflow.config delete mode 100644 modules/nf-core/fastp/nextflow.config delete mode 100644 modules/nf-core/fastqc/nextflow.config delete mode 100644 modules/nf-core/fq/subsample/nextflow.config delete mode 100644 modules/nf-core/gffread/nextflow.config delete mode 100644 modules/nf-core/gunzip/nextflow.config delete mode 100644 modules/nf-core/hisat2/align/nextflow.config delete mode 100644 modules/nf-core/hisat2/build/nextflow.config delete mode 100644 modules/nf-core/hisat2/extractsplicesites/nextflow.config delete mode 100644 modules/nf-core/kallisto/index/nextflow.config delete mode 100644 modules/nf-core/kallisto/quant/nextflow.config delete mode 100644 modules/nf-core/picard/markduplicates/nextflow.config delete mode 100644 modules/nf-core/rsem/calculateexpression/nextflow.config delete mode 100644 modules/nf-core/rsem/preparereference/nextflow.config delete mode 100644 modules/nf-core/rseqc/bamstat/nextflow.config delete mode 100644 modules/nf-core/rseqc/inferexperiment/nextflow.config delete mode 100644 modules/nf-core/rseqc/innerdistance/nextflow.config delete mode 100644 modules/nf-core/rseqc/junctionannotation/nextflow.config delete mode 100644 modules/nf-core/rseqc/junctionsaturation/nextflow.config delete mode 100644 modules/nf-core/rseqc/readdistribution/nextflow.config delete mode 100644 modules/nf-core/rseqc/readduplication/nextflow.config delete mode 100644 modules/nf-core/rseqc/tin/nextflow.config delete mode 100644 modules/nf-core/salmon/index/nextflow.config delete mode 100644 modules/nf-core/salmon/quant/nextflow.config delete mode 100644 modules/nf-core/samtools/flagstat/nextflow.config delete mode 100644 modules/nf-core/samtools/idxstats/nextflow.config delete mode 100644 modules/nf-core/samtools/index/nextflow.config delete mode 100644 modules/nf-core/samtools/sort/nextflow.config delete mode 100644 modules/nf-core/samtools/stats/nextflow.config delete mode 100644 modules/nf-core/star/align/nextflow.config delete mode 100644 modules/nf-core/star/genomegenerate/nextflow.config delete mode 100644 modules/nf-core/trimgalore/nextflow.config delete mode 100644 modules/nf-core/ucsc/bedclip/nextflow.config delete mode 100644 modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config delete mode 100644 modules/nf-core/umitools/dedup/nextflow.config delete mode 100644 modules/nf-core/umitools/extract/nextflow.config delete mode 100644 modules/nf-core/untar/nextflow.config delete mode 100644 subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config delete mode 100644 subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config delete mode 100644 subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config delete mode 100644 subworkflows/nf-core/bam_stats_samtools/nextflow.config delete mode 100644 subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config delete mode 100644 subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config delete mode 100644 subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config delete mode 100644 subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config diff --git a/modules/local/cat_additional_fasta/nextflow.config b/modules/local/cat_additional_fasta/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/deseq2_qc/nextflow.config b/modules/local/deseq2_qc/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/gtf2bed/nextflow.config b/modules/local/gtf2bed/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/gtf_filter/nextflow.config b/modules/local/gtf_filter/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/preprocess_transcripts_fasta_gencode/nextflow.config b/modules/local/preprocess_transcripts_fasta_gencode/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/rsem_merge_counts/nextflow.config b/modules/local/rsem_merge_counts/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/star_align_igenomes/nextflow.config b/modules/local/star_align_igenomes/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/star_genomegenerate_igenomes/nextflow.config b/modules/local/star_genomegenerate_igenomes/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/summarizedexperiment/nextflow.config b/modules/local/summarizedexperiment/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/tx2gene/nextflow.config b/modules/local/tx2gene/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/tximport/nextflow.config b/modules/local/tximport/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/local/umitools_prepareforrsem/nextflow.config b/modules/local/umitools_prepareforrsem/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/custom/getchromsizes/nextflow.config b/modules/nf-core/custom/getchromsizes/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/fastp/nextflow.config b/modules/nf-core/fastp/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/fastqc/nextflow.config b/modules/nf-core/fastqc/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/fq/subsample/nextflow.config b/modules/nf-core/fq/subsample/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/gffread/nextflow.config b/modules/nf-core/gffread/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/gunzip/nextflow.config b/modules/nf-core/gunzip/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/hisat2/align/nextflow.config b/modules/nf-core/hisat2/align/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/hisat2/build/nextflow.config b/modules/nf-core/hisat2/build/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/hisat2/extractsplicesites/nextflow.config b/modules/nf-core/hisat2/extractsplicesites/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/kallisto/index/nextflow.config b/modules/nf-core/kallisto/index/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/kallisto/quant/nextflow.config b/modules/nf-core/kallisto/quant/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/picard/markduplicates/nextflow.config b/modules/nf-core/picard/markduplicates/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rsem/calculateexpression/nextflow.config b/modules/nf-core/rsem/calculateexpression/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rsem/preparereference/nextflow.config b/modules/nf-core/rsem/preparereference/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/bamstat/nextflow.config b/modules/nf-core/rseqc/bamstat/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/inferexperiment/nextflow.config b/modules/nf-core/rseqc/inferexperiment/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/innerdistance/nextflow.config b/modules/nf-core/rseqc/innerdistance/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/junctionannotation/nextflow.config b/modules/nf-core/rseqc/junctionannotation/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/junctionsaturation/nextflow.config b/modules/nf-core/rseqc/junctionsaturation/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/readdistribution/nextflow.config b/modules/nf-core/rseqc/readdistribution/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/readduplication/nextflow.config b/modules/nf-core/rseqc/readduplication/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/rseqc/tin/nextflow.config b/modules/nf-core/rseqc/tin/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/salmon/index/nextflow.config b/modules/nf-core/salmon/index/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/salmon/quant/nextflow.config b/modules/nf-core/salmon/quant/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/samtools/flagstat/nextflow.config b/modules/nf-core/samtools/flagstat/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/samtools/idxstats/nextflow.config b/modules/nf-core/samtools/idxstats/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/samtools/index/nextflow.config b/modules/nf-core/samtools/index/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/samtools/sort/nextflow.config b/modules/nf-core/samtools/sort/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/samtools/stats/nextflow.config b/modules/nf-core/samtools/stats/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/star/align/nextflow.config b/modules/nf-core/star/align/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/star/genomegenerate/nextflow.config b/modules/nf-core/star/genomegenerate/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/trimgalore/nextflow.config b/modules/nf-core/trimgalore/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/ucsc/bedclip/nextflow.config b/modules/nf-core/ucsc/bedclip/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config b/modules/nf-core/ucsc/bedgraphtobigwig/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/umitools/dedup/nextflow.config b/modules/nf-core/umitools/dedup/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/umitools/extract/nextflow.config b/modules/nf-core/umitools/extract/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/modules/nf-core/untar/nextflow.config b/modules/nf-core/untar/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config b/subworkflows/local/utils_nfcore_rnaseq_pipeline/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config b/subworkflows/nf-core/bam_dedup_stats_samtools_umitools/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config b/subworkflows/nf-core/bam_sort_stats_samtools/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/bam_stats_samtools/nextflow.config b/subworkflows/nf-core/bam_stats_samtools/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config b/subworkflows/nf-core/bedgraph_bedclip_bedgraphtobigwig/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/nextflow.config deleted file mode 100644 index e69de29bb..000000000 diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config b/subworkflows/nf-core/utils_nfvalidation_plugin/nextflow.config deleted file mode 100644 index e69de29bb..000000000 From 625551ff95adc1a74cffbe6bc76e7b3fe3f296e2 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Sun, 4 Feb 2024 10:35:47 +0000 Subject: [PATCH 5/8] Refactor configs to add if/else logic back in --- .../local/bedtools_genomecov/nextflow.config | 15 +- modules/local/dupradar/nextflow.config | 62 +- .../multiqc_custom_biotype/nextflow.config | 20 +- modules/nf-core/bbmap/bbsplit/nextflow.config | 32 +- modules/nf-core/multiqc/nextflow.config | 26 +- .../nf-core/preseq/lcextrap/nextflow.config | 34 +- .../nf-core/qualimap/rnaseq/nextflow.config | 20 +- modules/nf-core/sortmerna/nextflow.config | 32 +- .../stringtie/stringtie/nextflow.config | 26 +- .../subread/featurecounts/nextflow.config | 38 +- subworkflows/local/align_star/nextflow.config | 70 +-- .../quantify_pseudo_alignment/nextflow.config | 82 +-- .../local/quantify_rsem/nextflow.config | 66 ++- .../bam_markduplicates_picard/nextflow.config | 70 +-- .../nf-core/bam_rseqc/nextflow.config | 242 ++++---- .../fastq_align_hisat2/nextflow.config | 44 +- .../nextflow.config | 116 ++-- .../nextflow.config | 110 ++-- workflows/rnaseq/nextflow.config | 558 ++++++++++-------- 19 files changed, 919 insertions(+), 744 deletions(-) diff --git a/modules/local/bedtools_genomecov/nextflow.config b/modules/local/bedtools_genomecov/nextflow.config index c476b70cc..397b4b84b 100644 --- a/modules/local/bedtools_genomecov/nextflow.config +++ b/modules/local/bedtools_genomecov/nextflow.config @@ -1,8 +1,11 @@ -process { - withName: 'BEDTOOLS_GENOMECOV' { - ext.args = '-split -du' - publishDir = [ - enabled: false - ] + +if (!params.skip_alignment && !params.skip_bigwig) { + process { + withName: 'BEDTOOLS_GENOMECOV' { + ext.args = '-split -du' + publishDir = [ + enabled: false + ] + } } } \ No newline at end of file diff --git a/modules/local/dupradar/nextflow.config b/modules/local/dupradar/nextflow.config index 6a518df66..cff3fa401 100644 --- a/modules/local/dupradar/nextflow.config +++ b/modules/local/dupradar/nextflow.config @@ -1,31 +1,35 @@ -process { - withName: 'DUPRADAR' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, - mode: params.publish_dir_mode, - pattern: "*Dens.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, - mode: params.publish_dir_mode, - pattern: "*Boxplot.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, - mode: params.publish_dir_mode, - pattern: "*Hist.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, - mode: params.publish_dir_mode, - pattern: "*Matrix.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, - mode: params.publish_dir_mode, - pattern: "*slope.txt" - ] - ] +if (!params.skip_alignment && !params.skip_qc) { + if (!params.skip_dupradar) { + process { + withName: 'DUPRADAR' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, + mode: params.publish_dir_mode, + pattern: "*Dens.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, + mode: params.publish_dir_mode, + pattern: "*Boxplot.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, + mode: params.publish_dir_mode, + pattern: "*Hist.pdf" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, + mode: params.publish_dir_mode, + pattern: "*Matrix.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, + mode: params.publish_dir_mode, + pattern: "*slope.txt" + ] + ] + } + } } } \ No newline at end of file diff --git a/modules/local/multiqc_custom_biotype/nextflow.config b/modules/local/multiqc_custom_biotype/nextflow.config index cef49e565..68fecaa66 100644 --- a/modules/local/multiqc_custom_biotype/nextflow.config +++ b/modules/local/multiqc_custom_biotype/nextflow.config @@ -1,9 +1,13 @@ -process { - withName: 'MULTIQC_CUSTOM_BIOTYPE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_alignment && !params.skip_qc) { + if (!params.skip_biotype_qc && params.featurecounts_group_type) { + process { + withName: 'MULTIQC_CUSTOM_BIOTYPE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/bbmap/bbsplit/nextflow.config b/modules/nf-core/bbmap/bbsplit/nextflow.config index 7e871bbba..da3ddaf31 100644 --- a/modules/nf-core/bbmap/bbsplit/nextflow.config +++ b/modules/nf-core/bbmap/bbsplit/nextflow.config @@ -1,18 +1,20 @@ -process { - withName: 'BBMAP_BBSPLIT' { - ext.args = 'build=1 ambiguous2=all maxindel=150000' - publishDir = [ - [ - path: { "${params.outdir}/bbsplit" }, - mode: params.publish_dir_mode, - pattern: '*.txt' - ], - [ - path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_bbsplit_reads ? it : null } +if (!params.skip_bbsplit) { + process { + withName: 'BBMAP_BBSPLIT' { + ext.args = 'build=1 ambiguous2=all maxindel=150000' + publishDir = [ + [ + path: { "${params.outdir}/bbsplit" }, + mode: params.publish_dir_mode, + pattern: '*.txt' + ], + [ + path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_bbsplit_reads ? it : null } + ] ] - ] + } } } \ No newline at end of file diff --git a/modules/nf-core/multiqc/nextflow.config b/modules/nf-core/multiqc/nextflow.config index ea3e6f2f6..ac178787c 100644 --- a/modules/nf-core/multiqc/nextflow.config +++ b/modules/nf-core/multiqc/nextflow.config @@ -1,14 +1,16 @@ -process { - withName: 'MULTIQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } - ext.prefix = "multiqc_report" - publishDir = [ - path: { [ - "${params.outdir}/multiqc", - params.skip_alignment? '' : "/${params.aligner}" - ].join('') }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_multiqc) { + process { + withName: 'MULTIQC' { + ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } + ext.prefix = "multiqc_report" + publishDir = [ + path: { [ + "${params.outdir}/multiqc", + params.skip_alignment? '' : "/${params.aligner}" + ].join('') }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } \ No newline at end of file diff --git a/modules/nf-core/preseq/lcextrap/nextflow.config b/modules/nf-core/preseq/lcextrap/nextflow.config index 45eb850f6..e203e87e7 100644 --- a/modules/nf-core/preseq/lcextrap/nextflow.config +++ b/modules/nf-core/preseq/lcextrap/nextflow.config @@ -1,17 +1,21 @@ -process { - withName: 'PRESEQ_LCEXTRAP' { - ext.args = '-verbose -bam -seed 1 -seg_len 100000000' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/preseq" }, - mode: params.publish_dir_mode, - pattern: "*.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/preseq/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ] - ] +if (!params.skip_alignment && !params.skip_qc) { + if (!params.skip_preseq) { + process { + withName: 'PRESEQ_LCEXTRAP' { + ext.args = '-verbose -bam -seed 1 -seg_len 100000000' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/preseq" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ], + [ + path: { "${params.outdir}/${params.aligner}/preseq/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ] + ] + } + } } } \ No newline at end of file diff --git a/modules/nf-core/qualimap/rnaseq/nextflow.config b/modules/nf-core/qualimap/rnaseq/nextflow.config index 0cb803147..9c05fb25a 100644 --- a/modules/nf-core/qualimap/rnaseq/nextflow.config +++ b/modules/nf-core/qualimap/rnaseq/nextflow.config @@ -1,9 +1,13 @@ -process { - withName: 'QUALIMAP_RNASEQ' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/qualimap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_alignment && !params.skip_qc) { + if (!params.skip_qualimap) { + process { + withName: 'QUALIMAP_RNASEQ' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/qualimap" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } -} \ No newline at end of file +} diff --git a/modules/nf-core/sortmerna/nextflow.config b/modules/nf-core/sortmerna/nextflow.config index bff7e944c..8771660ce 100644 --- a/modules/nf-core/sortmerna/nextflow.config +++ b/modules/nf-core/sortmerna/nextflow.config @@ -1,18 +1,20 @@ -process { - withName: 'SORTMERNA' { - ext.args = '--num_alignments 1 -v' - publishDir = [ - [ - path: { "${params.outdir}/sortmerna" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } +if (params.remove_ribo_rna) { + process { + withName: 'SORTMERNA' { + ext.args = '--num_alignments 1 -v' + publishDir = [ + [ + path: { "${params.outdir}/sortmerna" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_non_ribo_reads ? it : null } + ] ] - ] + } } } \ No newline at end of file diff --git a/modules/nf-core/stringtie/stringtie/nextflow.config b/modules/nf-core/stringtie/stringtie/nextflow.config index 292c66318..dc0651458 100644 --- a/modules/nf-core/stringtie/stringtie/nextflow.config +++ b/modules/nf-core/stringtie/stringtie/nextflow.config @@ -1,13 +1,17 @@ -process { - withName: 'STRINGTIE_STRINGTIE' { - ext.args = { [ - '-v', - params.stringtie_ignore_gtf ? '' : '-e' - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/stringtie" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_alignment) { + if (!params.skip_stringtie) { + process { + withName: 'STRINGTIE_STRINGTIE' { + ext.args = { [ + '-v', + params.stringtie_ignore_gtf ? '' : '-e' + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/stringtie" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } } \ No newline at end of file diff --git a/modules/nf-core/subread/featurecounts/nextflow.config b/modules/nf-core/subread/featurecounts/nextflow.config index a7531a18b..3a796d101 100644 --- a/modules/nf-core/subread/featurecounts/nextflow.config +++ b/modules/nf-core/subread/featurecounts/nextflow.config @@ -1,14 +1,26 @@ -process { - withName: 'SUBREAD_FEATURECOUNTS' { - ext.args = { [ - '-B -C', - params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", - "-t $params.featurecounts_feature_type" - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_alignment && !params.skip_qc) { + if (!params.skip_biotype_qc && params.featurecounts_group_type) { + process { + withName: 'SUBREAD_FEATURECOUNTS' { + ext.args = { [ + '-B -C', + params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", + "-t $params.featurecounts_feature_type" + ].join(' ').trim() } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: 'MULTIQC_CUSTOM_BIOTYPE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/featurecounts" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } -} \ No newline at end of file +} diff --git a/subworkflows/local/align_star/nextflow.config b/subworkflows/local/align_star/nextflow.config index 4aa0852c2..328579da2 100644 --- a/subworkflows/local/align_star/nextflow.config +++ b/subworkflows/local/align_star/nextflow.config @@ -1,37 +1,39 @@ -process { - withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' { - ext.args = { [ - '--quantMode TranscriptomeSAM', - '--twopassMode Basic', - '--outSAMtype BAM Unsorted', - '--readFilesCommand zcat', - '--runRNGseed 0', - '--outFilterMultimapNmax 20', - '--alignSJDBoverhangMin 1', - '--outSAMattributes NH HI AS NM MD', - '--quantTranscriptomeBan Singleend', - '--outSAMstrandField intronMotif', - params.save_unaligned ? '--outReadsUnmapped Fastx' : '', - params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.{out,tab}' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } +if (!params.skip_alignment && params.aligner == 'star_salmon') { + process { + withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' { + ext.args = { [ + '--quantMode TranscriptomeSAM', + '--twopassMode Basic', + '--outSAMtype BAM Unsorted', + '--readFilesCommand zcat', + '--runRNGseed 0', + '--outFilterMultimapNmax 20', + '--alignSJDBoverhangMin 1', + '--outSAMattributes NH HI AS NM MD', + '--quantTranscriptomeBan Singleend', + '--outSAMstrandField intronMotif', + params.save_unaligned ? '--outReadsUnmapped Fastx' : '', + params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : '' + ].flatten().unique(false).join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.{out,tab}' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_unaligned ? it : null } + ] ] - ] + } } } \ No newline at end of file diff --git a/subworkflows/local/quantify_pseudo_alignment/nextflow.config b/subworkflows/local/quantify_pseudo_alignment/nextflow.config index a9c246233..3c3a245b4 100644 --- a/subworkflows/local/quantify_pseudo_alignment/nextflow.config +++ b/subworkflows/local/quantify_pseudo_alignment/nextflow.config @@ -1,44 +1,54 @@ -process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } - ] +if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'salmon') { + process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } + ] + } } +} - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { - ext.args = params.extra_kallisto_quant_args ?: '' - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } - ] +if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'kallisto') { + process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { + ext.args = params.extra_kallisto_quant_args ?: '' + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } + ] + } } +} - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TX2GENE' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +if (!params.skip_pseudo_alignment && params.pseudo_aligner) { + process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMPORT' { - ext.prefix = { "${quant_type}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } } \ No newline at end of file diff --git a/subworkflows/local/quantify_rsem/nextflow.config b/subworkflows/local/quantify_rsem/nextflow.config index 55f679c2b..514177e32 100644 --- a/subworkflows/local/quantify_rsem/nextflow.config +++ b/subworkflows/local/quantify_rsem/nextflow.config @@ -1,37 +1,39 @@ -process { - withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION' { - ext.args = [ - '--star', - '--star-output-genome-bam', - '--star-gzipped-read-file', - '--estimate-rspd', - '--seed 1' - ].join(' ').trim() - publishDir = [ - [ +if (!params.skip_alignment && params.aligner == 'star_rsem') { + process { + withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION' { + ext.args = [ + '--star', + '--star-output-genome-bam', + '--star-gzipped-read-file', + '--estimate-rspd', + '--seed 1' + ].join(' ').trim() + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: "*.{stat,results}" + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.bam", + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ] + ] + } + + withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { + publishDir = [ path: { "${params.outdir}/${params.aligner}" }, mode: params.publish_dir_mode, - pattern: "*.{stat,results}" - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.bam", - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - ] - } - - withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config index 72b61fa2d..94a3e52b7 100644 --- a/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config +++ b/subworkflows/nf-core/bam_markduplicates_picard/nextflow.config @@ -1,37 +1,41 @@ -process { - withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { - ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/picard_metrics" }, - mode: params.publish_dir_mode, - pattern: '*metrics.txt' - ], - [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: '*.bam' - ] - ] - } +if (!params.skip_alignment) { + if (!params.skip_markduplicates && !params.with_umi) { + process { + withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { + ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/picard_metrics" }, + mode: params.publish_dir_mode, + pattern: '*metrics.txt' + ], + [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: '*.bam' + ] + ] + } - withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: '*.{bai,csi}' - ] - } + withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.markdup.sorted" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}' + ] + } - withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.markdup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] + withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.markdup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/bam_rseqc/nextflow.config b/subworkflows/nf-core/bam_rseqc/nextflow.config index 0e56f102e..4fabc8e99 100644 --- a/subworkflows/nf-core/bam_rseqc/nextflow.config +++ b/subworkflows/nf-core/bam_rseqc/nextflow.config @@ -1,119 +1,153 @@ -process { - withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : [] + +if (!params.skip_alignment && !params.skip_qc && !params.skip_rseqc) { + if ('bam_stat' in rseqc_modules) { + process { + withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + if ('infer_experiment' in rseqc_modules) { + process { + withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, - mode: params.publish_dir_mode, - pattern: '*.bed' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] + if ('junction_annotation' in rseqc_modules) { + process { + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, + mode: params.publish_dir_mode, + pattern: '*.bed' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] + if ('junction_saturation' in rseqc_modules) { + process { + withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] + if ('read_duplication' in rseqc_modules) { + process { + withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, + mode: params.publish_dir_mode, + pattern: '*.xls' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + if ('read_distribution' in rseqc_modules && !params.bam_csi_index) { + process { + withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, - mode: params.publish_dir_mode, - pattern: '*.txt', - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] + if ('inner_distance' in rseqc_modules && !params.bam_csi_index) { + process { + withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, + mode: params.publish_dir_mode, + pattern: '*.txt', + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, + mode: params.publish_dir_mode, + pattern: '*.pdf' + ], + [ + path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, + mode: params.publish_dir_mode, + pattern: '*.r' + ] + ] + } + } } - withName: '.*:BAM_RSEQC:RSEQC_TIN' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + if ('tin' in rseqc_modules && !params.bam_csi_index) { + process { + withName: '.*:BAM_RSEQC:RSEQC_TIN' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config index 2e1d4b7f6..94633dfa6 100644 --- a/subworkflows/nf-core/fastq_align_hisat2/nextflow.config +++ b/subworkflows/nf-core/fastq_align_hisat2/nextflow.config @@ -1,24 +1,26 @@ -process { - withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { - ext.args = '--met-stderr --new-summary --dta' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } +if (!params.skip_alignment && params.aligner == 'hisat2') { + process { + withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { + ext.args = '--met-stderr --new-summary --dta' + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds ? it : null } + ], + [ + path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.fastq.gz', + saveAs: { params.save_unaligned ? it : null } + ] ] - ] + } } } \ No newline at end of file diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config index 6bd31b449..061689d5f 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.config @@ -1,58 +1,72 @@ -process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' { - ext.args = { [ - params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', - params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', - params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/umitools" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_umi_intermeds ? it : null } - ] - ] - } +if (!(params.skip_fastqc || params.skip_qc)) { + if (params.trimmer == 'fastp') { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { + ext.args = '--quiet' + } - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { - ext.args = '--quiet' + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { + ext.args = '--quiet' + publishDir = [ + path: { "${params.outdir}/${params.trimmer}/fastqc" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } } +} - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { - ext.args = '--quiet' - publishDir = [ - path: { "${params.outdir}/${params.trimmer}/fastqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] +if (!params.skip_trimming) { + if (params.trimmer == 'fastp') { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { + ext.args = { params.extra_fastp_args ?: '' } + publishDir = [ + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.{json,html}" + ], + [ + path: { "${params.outdir}/${params.trimmer}/log" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_trimmed ? it : null } + ] + ] + } + } } +} - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { - ext.args = { params.extra_fastp_args ?: '' } - publishDir = [ - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.{json,html}" - ], - [ - path: { "${params.outdir}/${params.trimmer}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_trimmed ? it : null } +if (params.with_umi && !params.skip_umi_extract) { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_umi_intermeds ? it : null } + ] ] - ] + } } -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config index 724d0e50f..7279111e5 100644 --- a/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config +++ b/subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config @@ -1,54 +1,68 @@ -process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:UMITOOLS_EXTRACT' { - ext.args = { [ - params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', - params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', - params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/umitools" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_umi_intermeds ? it : null } - ] - ] +if (!(params.skip_fastqc || params.skip_qc)) { + if (params.trimmer == 'trimgalore') { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { + ext.args = '--quiet' + } + } } +} - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { - ext.args = '--quiet' +if (!params.skip_trimming) { + if (params.trimmer == 'trimgalore') { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { + ext.args = { + [ + "--fastqc_args '-t ${task.cpus}'", + params.extra_trimgalore_args ? params.extra_trimgalore_args.split("\\s(?=--)") : '' + ].flatten().unique(false).join(' ').trim() + } + publishDir = [ + [ + path: { "${params.outdir}/${params.trimmer}/fastqc" }, + mode: params.publish_dir_mode, + pattern: "*.{html,zip}" + ], + [ + path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fq.gz", + saveAs: { params.save_trimmed ? it : null } + ], + [ + path: { "${params.outdir}/${params.trimmer}" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ] + ] + } + } } +} - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { - ext.args = { - [ - "--fastqc_args '-t ${task.cpus}'", - params.extra_trimgalore_args ? params.extra_trimgalore_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() - } - publishDir = [ - [ - path: { "${params.outdir}/${params.trimmer}/fastqc" }, - mode: params.publish_dir_mode, - pattern: "*.{html,zip}" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fq.gz", - saveAs: { params.save_trimmed ? it : null } - ], - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.txt" +if (params.with_umi && !params.skip_umi_extract) { + process { + withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:UMITOOLS_EXTRACT' { + ext.args = { [ + params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', + params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', + params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + publishDir = [ + [ + path: { "${params.outdir}/umitools" }, + mode: params.publish_dir_mode, + pattern: "*.log" + ], + [ + path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, + mode: params.publish_dir_mode, + pattern: "*.fastq.gz", + saveAs: { params.save_umi_intermeds ? it : null } + ] ] - ] + } } -} \ No newline at end of file +} diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config index 0c6d94136..17a45ac96 100644 --- a/workflows/rnaseq/nextflow.config +++ b/workflows/rnaseq/nextflow.config @@ -18,291 +18,343 @@ includeConfig "../../subworkflows/nf-core/fastq_fastqc_umitools_fastp/nextflow.c includeConfig "../../subworkflows/nf-core/fastq_fastqc_umitools_trimgalore/nextflow.config" includeConfig "../../subworkflows/nf-core/fastq_subsample_fq_salmon/nextflow.config" -process { - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: "*.{stats,flagstat,idxstats}" - ] - } +// +// STAR Salmon alignment options +// - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.sorted" } - publishDir = [ - path: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.bam", - saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } - ] - } +if (!params.skip_alignment && params.aligner == 'star_salmon') { + process { + withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { + ext.args = { params.extra_salmon_quant_args ?: '' } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } + ] + } - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - publishDir = [ - path: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.{bai,csi}", - saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } - ] - } + withName: '.*:QUANTIFY_STAR_SALMON:TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.transcriptome.sorted" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } + withName: '.*:QUANTIFY_STAR_SALMON:TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bai', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] + withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } + if (params.with_umi) { + process { + withName: 'NFCORE_RNASEQ:SAMTOOLS_SORT' { + ext.args = '-n' + ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:UMITOOLS_PREPAREFORSALMON' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools/log" }, + mode: params.publish_dir_mode, + pattern: '*.log' + ], + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.transcriptome.sorted" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bai', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } - withName: 'NFCORE_RNASEQ:SAMTOOLS_SORT' { - ext.args = '-n' - ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { + ext.args = { [ + meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', + params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' + ], + [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { + publishDir = [ + path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bai', + saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + ] + } + + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } + } } +} - withName: 'NFCORE_RNASEQ:UMITOOLS_PREPAREFORSALMON' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, +// +// General alignment options +// + +if (!params.skip_alignment) { + process { + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + pattern: "*.{stats,flagstat,idxstats}" ] - ] - } + } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { - ext.args = { [ - meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', - params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { + ext.prefix = { "${meta.id}.sorted" } + publishDir = [ + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, - pattern: '*.tsv' - ], - [ - path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } + pattern: "*.bam", + saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } ] - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - publishDir = [ - path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{bai,csi}', - saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } + } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { - ext.args = { [ - meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', - params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, + withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + publishDir = [ + path: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, mode: params.publish_dir_mode, - pattern: '*.tsv' - ], - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } + pattern: "*.{bai,csi}", + saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && + ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) + ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } ] - ] + } } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bai', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } + if (params.with_umi && ['star_salmon','hisat2'].contains(params.aligner)) { + process { + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { + ext.args = { [ + meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', + params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', + params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' + ].join(' ').trim() } + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + publishDir = [ + [ + path: { "${params.outdir}/${params.aligner}/umitools" }, + mode: params.publish_dir_mode, + pattern: '*.tsv' + ], + [ + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.bam', + saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } + ] + ] + } - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } - - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.forward" } - publishDir = [ - enabled: false - ] - } + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:SAMTOOLS_INDEX' { + ext.args = { params.bam_csi_index ? '-c' : '' } + ext.prefix = { "${meta.id}.umi_dedup.sorted" } + publishDir = [ + path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, + mode: params.publish_dir_mode, + pattern: '*.{bai,csi}', + saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } + ] + } - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.forward" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/bigwig" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:BAM_STATS_SAMTOOLS:.*' { + ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/samtools_stats" }, + mode: params.publish_dir_mode, + pattern: '*.{stats,flagstat,idxstats}' + ] + } + } } +} - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.reverse" } - publishDir = [ - enabled: false - ] - } +// +// bigWig coverage options +// - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.reverse" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/bigwig" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +if (!params.skip_alignment && !params.skip_bigwig) { + process { + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.forward" } + publishDir = [ + enabled: false + ] + } - withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } - ] - } + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.forward" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/bigwig" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } - withName: '.*:QUANTIFY_STAR_SALMON:TX2GENE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { + ext.prefix = { "${meta.id}.clip.reverse" } + publishDir = [ + enabled: false + ] + } - withName: '.*:QUANTIFY_STAR_SALMON:TXIMPORT' { - ext.prefix = { "${quant_type}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] + withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { + ext.prefix = { "${meta.id}.reverse" } + publishDir = [ + path: { "${params.outdir}/${params.aligner}/bigwig" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } } +} - withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } +// +// DESeq2 QC options +// - withName: 'DESEQ2_QC_STAR_SALMON' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = 'star_salmon' - publishDir = [ - path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] +if (!params.skip_alignment && params.aligner == 'star_salmon') { + if (!params.skip_qc & !params.skip_deseq2_qc) { + process { + withName: 'DESEQ2_QC_STAR_SALMON' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = 'star_salmon' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } + } } +} - withName: 'DESEQ2_QC_RSEM' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = 'star_rsem' - publishDir = [ - path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] +if (!params.skip_alignment && params.aligner == 'star_rsem') { + if (!params.skip_qc & !params.skip_deseq2_qc) { + process { + withName: 'DESEQ2_QC_RSEM' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = 'star_rsem' + publishDir = [ + path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } + } } +} - withName: 'DESEQ2_QC_PSEUDO' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = { params.pseudo_aligner } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] +if (!params.skip_pseudo_alignment && params.pseudo_aligner) { + if (!params.skip_qc & !params.skip_deseq2_qc) { + process { + withName: 'DESEQ2_QC_PSEUDO' { + ext.args = { [ + "--id_col 1", + "--sample_suffix ''", + "--count_col 3", + params.deseq2_vst ? '--vst TRUE' : '' + ].join(' ').trim() } + ext.args2 = { params.pseudo_aligner } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, + mode: params.publish_dir_mode, + pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" + ] + } + } } -} \ No newline at end of file +} From 9cddbf3b0b295a610985b4c994b492888ea4fb06 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Sun, 4 Feb 2024 10:38:31 +0000 Subject: [PATCH 6/8] Delete modules.config --- conf/modules.config | 1159 ------------------------------------------- 1 file changed, 1159 deletions(-) delete mode 100644 conf/modules.config diff --git a/conf/modules.config b/conf/modules.config deleted file mode 100644 index e6210ea0e..000000000 --- a/conf/modules.config +++ /dev/null @@ -1,1159 +0,0 @@ -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Config file for defining DSL2 per module options and publishing paths -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Available keys to override module options: - ext.args = Additional arguments appended to command in module. - ext.args2 = Second set of arguments appended to command in module (multi-tool modules). - ext.args3 = Third set of arguments appended to command in module (multi-tool modules). - ext.prefix = File name prefix for output files. ----------------------------------------------------------------------------------------- -*/ - -def rseqc_modules = params.rseqc_modules ? params.rseqc_modules.split(',').collect{ it.trim().toLowerCase() } : [] - -// -// General configuration options -// - -process { - publishDir = [ - path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] -} - -// -// Genome preparation options -// - -process { - withName: 'GUNZIP_.*|MAKE_TRANSCRIPTS_FASTA' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'UNTAR_.*' { - ext.args2 = '--no-same-owner' - } - - withName: 'UNTAR_.*|STAR_GENOMEGENERATE|STAR_GENOMEGENERATE_IGENOMES|HISAT2_BUILD' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'GFFREAD' { - ext.args = '--keep-exon-attrs -F -T' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'HISAT2_EXTRACTSPLICESITES' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'SALMON_INDEX' { - ext.args = { [ - params.gencode ? '--gencode' : '', - params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}": '' - ].join(' ').trim() } - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'KALLISTO_INDEX' { - ext.args = params.pseudo_aligner_kmer_size ? "-k ${params.pseudo_aligner_kmer_size}" : '' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'RSEM_PREPAREREFERENCE_GENOME' { - ext.args = '--star' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'GTF2BED' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'CAT_ADDITIONAL_FASTA|PREPROCESS_TRANSCRIPTS_FASTA_GENCODE' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'GTF_FILTER' { - ext.args = { params.skip_gtf_transcript_filter ?: '--skip_transcript_id_check' } - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'CUSTOM_GETCHROMSIZES' { - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - - withName: 'CAT_FASTQ' { - publishDir = [ - path: { params.save_merged_fastq ? "${params.outdir}/fastq" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename.endsWith('.fastq.gz') && params.save_merged_fastq) ? filename : null } - ] - } -} - -if (!params.skip_bbsplit && params.bbsplit_fasta_list) { - process { - withName: 'PREPARE_GENOME:BBMAP_BBSPLIT' { - ext.args = 'build=1' - publishDir = [ - path: { params.save_reference ? "${params.outdir}/genome/index" : params.outdir }, - mode: params.publish_dir_mode, - saveAs: { filename -> (filename != 'versions.yml' && params.save_reference) ? filename : null } - ] - } - } -} - -// -// Read subsampling and strand inferring options -// - -process { - withName: 'FQ_SUBSAMPLE' { - ext.args = '--record-count 1000000 --seed 1' - ext.prefix = { "${meta.id}.subsampled" } - publishDir = [ - enabled: false - ] - } - - withName: '.*:FASTQ_SUBSAMPLE_FQ_SALMON:SALMON_QUANT' { - ext.args = '--skipQuant' - publishDir = [ - enabled: false - ] - } -} - -// -// Read QC and trimming options -// - -if (!(params.skip_fastqc || params.skip_qc)) { - if (params.trimmer == 'trimgalore') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:FASTQC' { - ext.args = '--quiet' - } - } - } - - if (params.trimmer == 'fastp') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_RAW' { - ext.args = '--quiet' - } - - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTQC_TRIM' { - ext.args = '--quiet' - publishDir = [ - path: { "${params.outdir}/${params.trimmer}/fastqc" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } -} - -if (!params.skip_trimming) { - if (params.trimmer == 'trimgalore') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_TRIMGALORE:TRIMGALORE' { - ext.args = { - [ - "--fastqc_args '-t ${task.cpus}'", - params.extra_trimgalore_args ? params.extra_trimgalore_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() - } - publishDir = [ - [ - path: { "${params.outdir}/${params.trimmer}/fastqc" }, - mode: params.publish_dir_mode, - pattern: "*.{html,zip}" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fq.gz", - saveAs: { params.save_trimmed ? it : null } - ], - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.txt" - ] - ] - } - } - } - - if (params.trimmer == 'fastp') { - process { - withName: '.*:FASTQ_FASTQC_UMITOOLS_FASTP:FASTP' { - ext.args = { params.extra_fastp_args ?: '' } - publishDir = [ - [ - path: { "${params.outdir}/${params.trimmer}" }, - mode: params.publish_dir_mode, - pattern: "*.{json,html}" - ], - [ - path: { "${params.outdir}/${params.trimmer}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_trimmed ? "${params.outdir}/${params.trimmer}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_trimmed ? it : null } - ] - ] - } - } - } -} - -if (params.with_umi && !params.skip_umi_extract) { - process { - withName: 'UMITOOLS_EXTRACT' { - ext.args = { [ - params.umitools_extract_method ? "--extract-method=${params.umitools_extract_method}" : '', - params.umitools_bc_pattern ? "--bc-pattern='${params.umitools_bc_pattern}'" : '', - params.umitools_bc_pattern2 ? "--bc-pattern2='${params.umitools_bc_pattern2}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/umitools" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_umi_intermeds ? "${params.outdir}/umitools" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_umi_intermeds ? it : null } - ] - ] - } - } -} - -// -// Contaminant removal options -// - -if (!params.skip_bbsplit) { - process { - withName: 'BBMAP_BBSPLIT' { - ext.args = 'build=1 ambiguous2=all maxindel=150000' - publishDir = [ - [ - path: { "${params.outdir}/bbsplit" }, - mode: params.publish_dir_mode, - pattern: '*.txt' - ], - [ - path: { params.save_bbsplit_reads ? "${params.outdir}/bbsplit" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_bbsplit_reads ? it : null } - ] - ] - } - } -} - -if (params.remove_ribo_rna) { - process { - withName: 'SORTMERNA' { - ext.args = '--num_alignments 1 -v' - publishDir = [ - [ - path: { "${params.outdir}/sortmerna" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ], - [ - path: { params.save_non_ribo_reads ? "${params.outdir}/sortmerna" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.fastq.gz", - saveAs: { params.save_non_ribo_reads ? it : null } - ] - ] - } - } -} - -// -// General alignment options -// - -if (!params.skip_alignment) { - process { - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: "*.{stats,flagstat,idxstats}" - ] - } - - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.sorted" } - publishDir = [ - path: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.bam", - saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - publishDir = [ - path: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.{bai,csi}", - saveAs: { ( ['star_salmon','hisat2'].contains(params.aligner) && - ( params.save_align_intermeds || ( !params.with_umi && params.skip_markduplicates ) ) - ) || params.save_align_intermeds || params.skip_markduplicates ? it : null } - ] - } - } - - if (!params.skip_markduplicates && !params.with_umi) { - process { - withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { - ext.args = '--ASSUME_SORTED true --REMOVE_DUPLICATES false --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/picard_metrics" }, - mode: params.publish_dir_mode, - pattern: '*metrics.txt' - ], - [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: '*.bam' - ] - ] - } - - withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.markdup.sorted" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: '*.{bai,csi}' - ] - } - - withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.markdup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } - } - } - - if (params.with_umi && ['star_salmon','hisat2'].contains(params.aligner)) { - process { - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:UMITOOLS_DEDUP' { - ext.args = { [ - meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', - params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, - mode: params.publish_dir_mode, - pattern: '*.tsv' - ], - [ - path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } - ] - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:SAMTOOLS_INDEX' { - ext.args = { params.bam_csi_index ? '-c' : '' } - ext.prefix = { "${meta.id}.umi_dedup.sorted" } - publishDir = [ - path: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{bai,csi}', - saveAs: { params.save_align_intermeds || params.with_umi || params.save_umi_intermeds ? it : null } - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_GENOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } - } - } - - if (!params.skip_bigwig) { - process { - withName: 'BEDTOOLS_GENOMECOV' { - ext.args = '-split -du' - publishDir = [ - enabled: false - ] - } - - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.forward" } - publishDir = [ - enabled: false - ] - } - - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_FORWARD:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.forward" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/bigwig" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDCLIP' { - ext.prefix = { "${meta.id}.clip.reverse" } - publishDir = [ - enabled: false - ] - } - - withName: '.*:BEDGRAPH_BEDCLIP_BEDGRAPHTOBIGWIG_REVERSE:UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}.reverse" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/bigwig" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_stringtie) { - process { - withName: 'STRINGTIE_STRINGTIE' { - ext.args = { [ - '-v', - params.stringtie_ignore_gtf ? '' : '-e' - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/stringtie" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } -} - -// -// STAR Salmon alignment options -// - -if (!params.skip_alignment && params.aligner == 'star_salmon') { - process { - withName: '.*:ALIGN_STAR:STAR_ALIGN|.*:ALIGN_STAR:STAR_ALIGN_IGENOMES' { - ext.args = { [ - '--quantMode TranscriptomeSAM', - '--twopassMode Basic', - '--outSAMtype BAM Unsorted', - '--readFilesCommand zcat', - '--runRNGseed 0', - '--outFilterMultimapNmax 20', - '--alignSJDBoverhangMin 1', - '--outSAMattributes NH HI AS NM MD', - '--quantTranscriptomeBan Singleend', - '--outSAMstrandField intronMotif', - params.save_unaligned ? '--outReadsUnmapped Fastx' : '', - params.extra_star_align_args ? params.extra_star_align_args.split("\\s(?=--)") : '' - ].flatten().unique(false).join(' ').trim() } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.{out,tab}' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } - ] - ] - } - - withName: '.*:QUANTIFY_STAR_SALMON:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } - ] - } - - withName: '.*:QUANTIFY_STAR_SALMON:TX2GENE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:QUANTIFY_STAR_SALMON:TXIMPORT' { - ext.prefix = { "${quant_type}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:QUANTIFY_STAR_SALMON:SE_.*' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - - if (params.with_umi) { - process { - withName: 'NFCORE_RNASEQ:SAMTOOLS_SORT' { - ext.args = '-n' - ext.prefix = { "${meta.id}.umi_dedup.transcriptome" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:UMITOOLS_PREPAREFORSALMON' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.filtered" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - ] - } - - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.transcriptome.sorted" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_INDEX' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bai', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: 'NFCORE_RNASEQ:BAM_SORT_STATS_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.transcriptome.sorted.bam" } - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}/samtools_stats" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:UMITOOLS_DEDUP' { - ext.args = { [ - meta.single_end ? '' : '--unpaired-reads=discard --chimeric-pairs=discard', - params.umitools_grouping_method ? "--method='${params.umitools_grouping_method}'" : '', - params.umitools_umi_separator ? "--umi-separator='${params.umitools_umi_separator}'" : '' - ].join(' ').trim() } - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted" } - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/umitools" }, - mode: params.publish_dir_mode, - pattern: '*.tsv' - ], - [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:SAMTOOLS_INDEX' { - publishDir = [ - path: { params.save_align_intermeds || params.save_umi_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bai', - saveAs: { params.save_align_intermeds || params.save_umi_intermeds ? it : null } - ] - } - - withName: '.*:BAM_DEDUP_STATS_SAMTOOLS_UMITOOLS_TRANSCRIPTOME:BAM_STATS_SAMTOOLS:.*' { - ext.prefix = { "${meta.id}.umi_dedup.transcriptome.sorted.bam" } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/samtools_stats" }, - mode: params.publish_dir_mode, - pattern: '*.{stats,flagstat,idxstats}' - ] - } - } - } - - if (!params.skip_qc & !params.skip_deseq2_qc) { - process { - withName: 'DESEQ2_QC_STAR_SALMON' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = 'star_salmon' - publishDir = [ - path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] - } - } - } -} - -// -// STAR RSEM alignment options -// - -if (!params.skip_alignment && params.aligner == 'star_rsem') { - process { - withName: '.*:QUANTIFY_RSEM:RSEM_CALCULATEEXPRESSION' { - ext.args = [ - '--star', - '--star-output-genome-bam', - '--star-gzipped-read-file', - '--estimate-rspd', - '--seed 1' - ].join(' ').trim() - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - pattern: "*.{stat,results}" - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: "*.bam", - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ] - ] - } - - withName: '.*:QUANTIFY_RSEM:RSEM_MERGE_COUNTS' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - - if (!params.skip_qc & !params.skip_deseq2_qc) { - process { - withName: 'DESEQ2_QC_RSEM' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = 'star_rsem' - publishDir = [ - path: { "${params.outdir}/${params.aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] - } - } - } -} - -// -// HISAT2 alignment options -// - -if (!params.skip_alignment && params.aligner == 'hisat2') { - process { - withName: '.*:FASTQ_ALIGN_HISAT2:HISAT2_ALIGN' { - ext.args = '--met-stderr --new-summary --dta' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { params.save_align_intermeds ? "${params.outdir}/${params.aligner}" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.bam', - saveAs: { params.save_align_intermeds ? it : null } - ], - [ - path: { params.save_unaligned ? "${params.outdir}/${params.aligner}/unmapped" : params.outdir }, - mode: params.publish_dir_mode, - pattern: '*.fastq.gz', - saveAs: { params.save_unaligned ? it : null } - ] - ] - } - } -} - -// -// Post-alignment QC options -// - -if (!params.skip_alignment && !params.skip_qc) { - if (!params.skip_preseq) { - process { - withName: 'PRESEQ_LCEXTRAP' { - ext.args = '-verbose -bam -seed 1 -seg_len 100000000' - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/preseq" }, - mode: params.publish_dir_mode, - pattern: "*.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/preseq/log" }, - mode: params.publish_dir_mode, - pattern: "*.log" - ] - ] - } - } - } - - if (!params.skip_qualimap) { - process { - withName: 'QUALIMAP_RNASEQ' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/qualimap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_dupradar) { - process { - withName: 'DUPRADAR' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/dupradar/scatter_plot" }, - mode: params.publish_dir_mode, - pattern: "*Dens.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/box_plot" }, - mode: params.publish_dir_mode, - pattern: "*Boxplot.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/histogram" }, - mode: params.publish_dir_mode, - pattern: "*Hist.pdf" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/gene_data" }, - mode: params.publish_dir_mode, - pattern: "*Matrix.txt" - ], - [ - path: { "${params.outdir}/${params.aligner}/dupradar/intercepts_slope" }, - mode: params.publish_dir_mode, - pattern: "*slope.txt" - ] - ] - } - } - } - - if (!params.skip_biotype_qc && params.featurecounts_group_type) { - process { - withName: 'SUBREAD_FEATURECOUNTS' { - ext.args = { [ - '-B -C', - params.gencode ? "-g gene_type" : "-g $params.featurecounts_group_type", - "-t $params.featurecounts_feature_type" - ].join(' ').trim() } - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: 'MULTIQC_CUSTOM_BIOTYPE' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/featurecounts" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_rseqc && 'bam_stat' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_BAMSTAT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/bam_stat" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_rseqc && 'infer_experiment' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_INFEREXPERIMENT' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/infer_experiment" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_rseqc && 'junction_annotation' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONANNOTATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/bed" }, - mode: params.publish_dir_mode, - pattern: '*.bed' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/log" }, - mode: params.publish_dir_mode, - pattern: '*.log' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_annotation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } - } - - if (!params.skip_rseqc && 'junction_saturation' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_JUNCTIONSATURATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/junction_saturation/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } - } - - if (!params.skip_rseqc && 'read_duplication' in rseqc_modules) { - process { - withName: '.*:BAM_RSEQC:RSEQC_READDUPLICATION' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/xls" }, - mode: params.publish_dir_mode, - pattern: '*.xls' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_duplication/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } - } - - if (!params.skip_rseqc && 'read_distribution' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_READDISTRIBUTION' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/read_distribution" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } - - if (!params.skip_rseqc && 'inner_distance' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_INNERDISTANCE' { - publishDir = [ - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/txt" }, - mode: params.publish_dir_mode, - pattern: '*.txt', - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/pdf" }, - mode: params.publish_dir_mode, - pattern: '*.pdf' - ], - [ - path: { "${params.outdir}/${params.aligner}/rseqc/inner_distance/rscript" }, - mode: params.publish_dir_mode, - pattern: '*.r' - ] - ] - } - } - } - - if (!params.skip_rseqc && 'tin' in rseqc_modules && !params.bam_csi_index) { - process { - withName: '.*:BAM_RSEQC:RSEQC_TIN' { - publishDir = [ - path: { "${params.outdir}/${params.aligner}/rseqc/tin" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - } -} - -if (!params.skip_multiqc) { - process { - withName: 'MULTIQC' { - ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' } - ext.prefix = "multiqc_report" - publishDir = [ - path: { [ - "${params.outdir}/multiqc", - params.skip_alignment? '' : "/${params.aligner}" - ].join('') }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } -} - -// -// Salmon/ Kallisto pseudoalignment options -// - -if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'salmon') { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SALMON_QUANT' { - ext.args = { params.extra_salmon_quant_args ?: '' } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('_meta_info.json') ? null : filename } - ] - } - } -} - -if (!params.skip_pseudo_alignment && params.pseudo_aligner == 'kallisto') { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:KALLISTO_QUANT' { - ext.args = params.extra_kallisto_quant_args ?: '' - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') || filename.endsWith('.run_info.json') || filename.endsWith('.log') ? null : filename } - ] - } - } -} - -if (!params.skip_pseudo_alignment && params.pseudo_aligner) { - process { - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TX2GENE' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMPORT' { - ext.prefix = { "${quant_type}.merged" } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - - withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } - ] - } - } - - if (!params.skip_qc & !params.skip_deseq2_qc) { - process { - withName: 'DESEQ2_QC_PSEUDO' { - ext.args = { [ - "--id_col 1", - "--sample_suffix ''", - "--count_col 3", - params.deseq2_vst ? '--vst TRUE' : '' - ].join(' ').trim() } - ext.args2 = { params.pseudo_aligner } - publishDir = [ - path: { "${params.outdir}/${params.pseudo_aligner}/deseq2_qc" }, - mode: params.publish_dir_mode, - pattern: "*{RData,pca.vals.txt,plots.pdf,sample.dists.txt,size_factors,log}" - ] - } - } - } -} From f5ae20e088737fcca95fd04889b84fc5ff88043c Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Sun, 4 Feb 2024 10:43:22 +0000 Subject: [PATCH 7/8] [automated] Fix linting with Prettier --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a9bc5c79..4ecfbfe33 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], - }, - }, + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] + } + } } From c0277fc46d42d33d034835bc7f7c3edeb3ba1fe5 Mon Sep 17 00:00:00 2001 From: Harshil Patel Date: Sun, 4 Feb 2024 12:48:28 +0000 Subject: [PATCH 8/8] Add config for publishing pseudo-alignment files --- workflows/rnaseq/nextflow.config | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/workflows/rnaseq/nextflow.config b/workflows/rnaseq/nextflow.config index 17a45ac96..fd4f1435d 100644 --- a/workflows/rnaseq/nextflow.config +++ b/workflows/rnaseq/nextflow.config @@ -338,7 +338,38 @@ if (!params.skip_alignment && params.aligner == 'star_rsem') { } } +// +// Pseudo-alignment options +// + if (!params.skip_pseudo_alignment && params.pseudo_aligner) { + process { + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TX2GENE' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:TXIMPORT' { + ext.prefix = { "${quant_type}.merged" } + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + + withName: '.*:QUANTIFY_PSEUDO_ALIGNMENT:SE_.*' { + publishDir = [ + path: { "${params.outdir}/${params.pseudo_aligner}" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + } + if (!params.skip_qc & !params.skip_deseq2_qc) { process { withName: 'DESEQ2_QC_PSEUDO' {