diff --git a/conf/modules.config b/conf/modules.config index dadf360d..79a679af 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -101,7 +101,6 @@ process { // Read QC and trimming options // -if (!(params.skip_fastqc || params.skip_qc)) { process { withName: 'FASTQC' { ext.args = '--quiet' @@ -119,9 +118,7 @@ if (!(params.skip_fastqc || params.skip_qc)) { ] } } -} -if (!params.skip_trimming) { process { withName: 'TRIMGALORE' { ext.args = { @@ -159,7 +156,6 @@ if (!params.skip_trimming) { ] } } -} process { withName: 'NFCORE_CHIPSEQ:CHIPSEQ:.*:BAM_SORT_STATS_SAMTOOLS:SAMTOOLS_SORT' { @@ -192,7 +188,6 @@ process { } } -if (params.aligner == 'bwa') { process { withName: 'BWA_MEM' { ext.args = { @@ -212,9 +207,7 @@ if (params.aligner == 'bwa') { ] } } -} -if (params.aligner == 'bowtie2') { process { withName: 'BOWTIE2_ALIGN' { ext.args = { @@ -240,9 +233,7 @@ if (params.aligner == 'bowtie2') { ] } } -} -if (params.aligner == 'chromap') { process { withName: 'CHROMAP_INDEX' { publishDir = [ @@ -264,9 +255,7 @@ if (params.aligner == 'chromap') { ] } } -} -if (params.aligner == 'star') { process { withName: '.*:ALIGN_STAR:STAR_ALIGN' { ext.args = [ @@ -300,7 +289,6 @@ if (params.aligner == 'star') { ] } } -} process { withName: 'PICARD_MERGESAMFILES' { @@ -480,7 +468,6 @@ process { } } -if (!params.skip_picard_metrics) { process { withName: 'PICARD_COLLECTMULTIPLEMETRICS' { ext.args = '--VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' @@ -499,9 +486,7 @@ if (!params.skip_picard_metrics) { ] } } -} -if (!params.skip_preseq) { process { withName: 'PRESEQ_LCEXTRAP' { ext.args = '-verbose -bam -seed 1' @@ -513,9 +498,7 @@ if (!params.skip_preseq) { ] } } -} -if (!params.skip_plot_profile) { process { withName: 'DEEPTOOLS_COMPUTEMATRIX' { ext.args = 'scale-regions --regionBodyLength 1000 --beforeRegionStartLength 3000 --afterRegionStartLength 3000 --missingDataAsZero --skipZeros --smartLabels' @@ -545,9 +528,7 @@ if (!params.skip_plot_profile) { ] } } -} -if (!params.skip_plot_fingerprint) { process { withName: 'DEEPTOOLS_PLOTFINGERPRINT' { ext.args = { [ @@ -563,7 +544,6 @@ if (!params.skip_plot_fingerprint) { ] } } -} process { withName: 'MACS3_CALLPEAK' { @@ -599,7 +579,6 @@ process { } } -if (!params.skip_peak_annotation) { process { withName: '.*:BAM_PEAKS_CALL_QC_ANNOTATE_MACS3_HOMER:HOMER_ANNOTATEPEAKS' { ext.args = '-gid' @@ -612,7 +591,6 @@ if (!params.skip_peak_annotation) { } } - if (!params.skip_peak_qc) { process { withName: 'PLOT_MACS3_QC' { ext.args = '-o ./ -p macs3_peak' @@ -633,10 +611,7 @@ if (!params.skip_peak_annotation) { ] } } - } -} -if (!params.skip_consensus_peaks) { process { withName: 'MACS3_CONSENSUS' { ext.when = { meta.multiple_groups || meta.replicates_exist } @@ -659,7 +634,6 @@ if (!params.skip_consensus_peaks) { } } - if (!params.skip_peak_annotation) { process { withName: '.*:BED_CONSENSUS_QUANTIFY_QC_BEDTOOLS_FEATURECOUNTS_DESEQ2:HOMER_ANNOTATEPEAKS' { ext.args = '-gid' @@ -680,9 +654,7 @@ if (!params.skip_consensus_peaks) { ] } } - } - if (!params.skip_deseq2_qc) { process { withName: 'DESEQ2_QC' { ext.when = { meta.multiple_groups && meta.replicates_exist } @@ -700,10 +672,7 @@ if (!params.skip_consensus_peaks) { ] } } - } -} -if (!params.skip_igv) { process { withName: 'IGV' { publishDir = [ @@ -720,9 +689,7 @@ if (!params.skip_igv) { ] } } -} -if (!params.skip_multiqc) { process { withName: 'MULTIQC' { ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' @@ -733,4 +700,3 @@ if (!params.skip_multiqc) { ] } } -} diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index ba615ab7..567ab9b9 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -61,30 +61,6 @@ include { BAM_MARKDUPLICATES_PICARD } from '../subworkflows/nf-core/bam_m ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ -// JSON files required by BAMTools for alignment filtering -ch_bamtools_filter_se_config = file(params.bamtools_filter_se_config) -ch_bamtools_filter_pe_config = file(params.bamtools_filter_pe_config) - -// Header files for MultiQC -ch_spp_nsc_header = file("$projectDir/assets/multiqc/spp_nsc_header.txt", checkIfExists: true) -ch_spp_rsc_header = file("$projectDir/assets/multiqc/spp_rsc_header.txt", checkIfExists: true) -ch_spp_correlation_header = file("$projectDir/assets/multiqc/spp_correlation_header.txt", checkIfExists: true) -ch_peak_count_header = file("$projectDir/assets/multiqc/peak_count_header.txt", checkIfExists: true) -ch_frip_score_header = file("$projectDir/assets/multiqc/frip_score_header.txt", checkIfExists: true) -ch_peak_annotation_header = file("$projectDir/assets/multiqc/peak_annotation_header.txt", checkIfExists: true) -ch_deseq2_pca_header = Channel.value(file("$projectDir/assets/multiqc/deseq2_pca_header.txt", checkIfExists: true)) -ch_deseq2_clustering_header = Channel.value(file("$projectDir/assets/multiqc/deseq2_clustering_header.txt", checkIfExists: true)) - -// Save AWS IGenomes file containing annotation version -def anno_readme = params.genomes[ params.genome ]?.readme -if (anno_readme && file(anno_readme).exists()) { - file("${params.outdir}/genome/").mkdirs() - file(anno_readme).copyTo("${params.outdir}/genome/") -} - - -// // Info required for completion email and summary -// def multiqc_report = [] workflow CHIPSEQ { @@ -103,6 +79,28 @@ workflow CHIPSEQ { ch_star_index // channel: path(star/index/) main: + + // JSON files required by BAMTools for alignment filtering + ch_bamtools_filter_se_config = file(params.bamtools_filter_se_config) + ch_bamtools_filter_pe_config = file(params.bamtools_filter_pe_config) + + // Header files for MultiQC + ch_spp_nsc_header = file("$projectDir/assets/multiqc/spp_nsc_header.txt", checkIfExists: true) + ch_spp_rsc_header = file("$projectDir/assets/multiqc/spp_rsc_header.txt", checkIfExists: true) + ch_spp_correlation_header = file("$projectDir/assets/multiqc/spp_correlation_header.txt", checkIfExists: true) + ch_peak_count_header = file("$projectDir/assets/multiqc/peak_count_header.txt", checkIfExists: true) + ch_frip_score_header = file("$projectDir/assets/multiqc/frip_score_header.txt", checkIfExists: true) + ch_peak_annotation_header = file("$projectDir/assets/multiqc/peak_annotation_header.txt", checkIfExists: true) + ch_deseq2_pca_header = Channel.value(file("$projectDir/assets/multiqc/deseq2_pca_header.txt", checkIfExists: true)) + ch_deseq2_clustering_header = Channel.value(file("$projectDir/assets/multiqc/deseq2_clustering_header.txt", checkIfExists: true)) + + // Save AWS IGenomes file containing annotation version + def anno_readme = params.genomes[ params.genome ]?.readme + if (anno_readme && file(anno_readme).exists()) { + file("${params.outdir}/genome/").mkdirs() + file(anno_readme).copyTo("${params.outdir}/genome/") + } + ch_multiqc_files = channel.empty() //