From 1d995677435274aff97d43b2ef77191344e5bfd2 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 23 Jun 2023 11:51:17 +0200 Subject: [PATCH 01/15] Make fasta available through IGV run --- conf/modules.config | 16 ++++++++++------ modules/local/igv.nf | 1 + subworkflows/local/prepare_genome.nf | 6 ------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 06a1e5a6..2d57aa3a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -718,12 +718,16 @@ if (!params.skip_igv) { process { withName: 'IGV' { publishDir = [ - path: { [ - "${params.outdir}/igv", - params.narrow_peak? '/narrowPeak' : '/broadPeak' - ].join('') }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + [ + path: { "${params.outdir}/igv/${params.narrow_peak? '/narrowPeak' : '/broadPeak' }" }, + mode: params.publish_dir_mode, + pattern: '*.{txt,xml}' + ], + [ + path: { "${params.outdir}/genome" }, + mode: params.publish_dir_mode, + pattern: '*.{fa,fasta}' + ] ] } } diff --git a/modules/local/igv.nf b/modules/local/igv.nf index 59a2d2e8..f1f24325 100644 --- a/modules/local/igv.nf +++ b/modules/local/igv.nf @@ -20,6 +20,7 @@ process IGV { output: path "*files.txt" , emit: txt path "*.xml" , emit: xml + path fasta , emit: fasta path "versions.yml", emit: versions script: // scripts are bundled with the pipeline in nf-core/chipseq/bin/ diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index dd16e1f5..b67b12c5 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -44,12 +44,6 @@ workflow PREPARE_GENOME { ch_fasta = file(params.fasta) } - // Make fasta file available if reference saved or IGV is run - if (params.save_reference || !params.skip_igv) { - file("${params.outdir}/genome/").mkdirs() - ch_fasta.copyTo("${params.outdir}/genome/") - } - // // Uncompress GTF annotation file or create from GFF3 if required // From c21f05e16170b217a59df737a3ba63a7d84e04b7 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 23 Jun 2023 12:47:14 +0200 Subject: [PATCH 02/15] Fix blacklist and other instances where a parameter is used to create a channel --- subworkflows/local/prepare_genome.nf | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index b67b12c5..4520b61e 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -41,7 +41,8 @@ workflow PREPARE_GENOME { ch_fasta = GUNZIP_FASTA ( [ [:], params.fasta ] ).gunzip.map{ it[1] } ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) } else { - ch_fasta = file(params.fasta) + // ch_fasta = file(params.fasta) + ch_fasta = Channel.value(file(params.fasta)) } // @@ -101,14 +102,15 @@ workflow PREPARE_GENOME { ch_gene_bed = GUNZIP_GENE_BED ( [ [:], params.gene_bed ] ).gunzip.map{ it[1] } ch_versions = ch_versions.mix(GUNZIP_GENE_BED.out.versions) } else { - ch_gene_bed = file(params.gene_bed) + ch_gene_bed = Channel.value(file(params.gene_bed)) } } // // Create chromosome sizes file // - ch_chrom_sizes = CUSTOM_GETCHROMSIZES ( [ [:], ch_fasta ] ).sizes.map{ it[1] } + CUSTOM_GETCHROMSIZES ( ch_fasta.map { [ [:], it ] } ) + ch_chrom_sizes = CUSTOM_GETCHROMSIZES.out.sizes.map { it[1] } ch_fai = CUSTOM_GETCHROMSIZES.out.fai.map{ it[1] } ch_versions = ch_versions.mix(CUSTOM_GETCHROMSIZES.out.versions) @@ -138,7 +140,7 @@ workflow PREPARE_GENOME { ch_bwa_index = file(params.bwa_index) } } else { - ch_bwa_index = BWA_INDEX ( [ [:], ch_fasta ] ).index + ch_bwa_index = BWA_INDEX ( ch_fasta.map { [ [:], it ] } ).index ch_versions = ch_versions.mix(BWA_INDEX.out.versions) } } @@ -156,7 +158,7 @@ workflow PREPARE_GENOME { ch_bowtie2_index = [ [:], file(params.bowtie2_index) ] } } else { - ch_bowtie2_index = BOWTIE2_BUILD ( [ [:], ch_fasta ] ).index + ch_bowtie2_index = BOWTIE2_BUILD ( ch_fasta.map { [ [:], it ] } ).index ch_versions = ch_versions.mix(BOWTIE2_BUILD.out.versions) } } @@ -174,7 +176,7 @@ workflow PREPARE_GENOME { ch_chromap_index = [ [:], file(params.chromap_index) ] } } else { - ch_chromap_index = CHROMAP_INDEX ( [ [:], ch_fasta ] ).index + ch_chromap_index = CHROMAP_INDEX ( ch_fasta.map { [ [:], it ] } ).index ch_versions = ch_versions.mix(CHROMAP_INDEX.out.versions) } } @@ -189,7 +191,7 @@ workflow PREPARE_GENOME { ch_star_index = UNTAR_STAR_INDEX ( [ [:], params.star_index ] ).untar.map{ it[1] } ch_versions = ch_versions.mix(UNTAR_STAR_INDEX.out.versions) } else { - ch_star_index = file(params.star_index) + ch_star_index = Channel.value(file(params.star_index)) } } else { ch_star_index = STAR_GENOMEGENERATE ( ch_fasta, ch_gtf ).index From 77aac1df868210c379f59b9ce21aeaac6ff19516 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 23 Jun 2023 14:08:35 +0200 Subject: [PATCH 03/15] Remove commented line --- subworkflows/local/prepare_genome.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/local/prepare_genome.nf b/subworkflows/local/prepare_genome.nf index 4520b61e..bd7033cb 100644 --- a/subworkflows/local/prepare_genome.nf +++ b/subworkflows/local/prepare_genome.nf @@ -41,7 +41,6 @@ workflow PREPARE_GENOME { ch_fasta = GUNZIP_FASTA ( [ [:], params.fasta ] ).gunzip.map{ it[1] } ch_versions = ch_versions.mix(GUNZIP_FASTA.out.versions) } else { - // ch_fasta = file(params.fasta) ch_fasta = Channel.value(file(params.fasta)) } From 05ab0543a450455c0080f5b8c00a461374b3be8c Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 23 Jun 2023 14:20:24 +0200 Subject: [PATCH 04/15] Remove parameter narrow_peak from plot_macs2_qc --- modules/local/plot_macs2_qc.nf | 2 +- workflows/chipseq.nf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/local/plot_macs2_qc.nf b/modules/local/plot_macs2_qc.nf index 92f400d5..6a06e355 100644 --- a/modules/local/plot_macs2_qc.nf +++ b/modules/local/plot_macs2_qc.nf @@ -16,7 +16,7 @@ process PLOT_MACS2_QC { script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ def args = task.ext.args ?: '' - def peak_type = params.narrow_peak ? 'narrowPeak' : 'broadPeak' + def peak_type = is_narrow_peak ? 'narrowPeak' : 'broadPeak' """ plot_macs2_qc.r \\ -i ${peaks.join(',')} \\ diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index fc914a51..ec966a8d 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -549,7 +549,8 @@ workflow CHIPSEQ { // MODULE: MACS2 QC plots with R // PLOT_MACS2_QC ( - ch_macs2_peaks.collect{it[1]} + ch_macs2_peaks.collect{it[1]}, + is_narrow_peak ) ch_versions = ch_versions.mix(PLOT_MACS2_QC.out.versions) From 4c484fba4ef502830e680d0760fd127bb82fb946 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Fri, 23 Jun 2023 17:39:40 +0200 Subject: [PATCH 05/15] Remove first not necessary --- workflows/chipseq.nf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index ec966a8d..43694c60 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -205,7 +205,7 @@ workflow CHIPSEQ { ch_samtools_stats = FASTQ_ALIGN_BOWTIE2.out.stats ch_samtools_flagstat = FASTQ_ALIGN_BOWTIE2.out.flagstat ch_samtools_idxstats = FASTQ_ALIGN_BOWTIE2.out.idxstats - ch_versions = ch_versions.mix(FASTQ_ALIGN_BOWTIE2.out.versions.first()) + ch_versions = ch_versions.mix(FASTQ_ALIGN_BOWTIE2.out.versions) } // @@ -229,7 +229,7 @@ workflow CHIPSEQ { ch_samtools_stats = FASTQ_ALIGN_CHROMAP.out.stats ch_samtools_flagstat = FASTQ_ALIGN_CHROMAP.out.flagstat ch_samtools_idxstats = FASTQ_ALIGN_CHROMAP.out.idxstats - ch_versions = ch_versions.mix(FASTQ_ALIGN_CHROMAP.out.versions.first()) + ch_versions = ch_versions.mix(FASTQ_ALIGN_CHROMAP.out.versions) } // @@ -274,7 +274,7 @@ workflow CHIPSEQ { PICARD_MERGESAMFILES ( ch_sort_bam ) - ch_versions = ch_versions.mix(PICARD_MERGESAMFILES.out.versions.first().ifEmpty(null)) + ch_versions = ch_versions.mix(PICARD_MERGESAMFILES.out.versions.first()) // // SUBWORKFLOW: Mark duplicates & filter BAM files after merging From e88fdcdcf2748b56d0b2fbd7b43e9c696937f579 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 08:26:53 +0200 Subject: [PATCH 06/15] Fix typo --- workflows/chipseq.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/chipseq.nf b/workflows/chipseq.nf index 43694c60..01ff8545 100644 --- a/workflows/chipseq.nf +++ b/workflows/chipseq.nf @@ -550,7 +550,7 @@ workflow CHIPSEQ { // PLOT_MACS2_QC ( ch_macs2_peaks.collect{it[1]}, - is_narrow_peak + params.narrow_peak ) ch_versions = ch_versions.mix(PLOT_MACS2_QC.out.versions) From 5bb757de74fbc0f7f1ad5182f1c6a01e4180623e Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 08:49:22 +0200 Subject: [PATCH 07/15] Add is_narrow_peak to plot_macs2_qc --- modules/local/plot_macs2_qc.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/local/plot_macs2_qc.nf b/modules/local/plot_macs2_qc.nf index 6a06e355..2915b739 100644 --- a/modules/local/plot_macs2_qc.nf +++ b/modules/local/plot_macs2_qc.nf @@ -8,6 +8,7 @@ process PLOT_MACS2_QC { input: path peaks + val is_narrow_peak output: path '*.txt' , emit: txt From cc578b6452b64d360d4ad28353c0eba0dcce0ecc Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 18:53:48 +0200 Subject: [PATCH 08/15] Add ext.when, remove params to local modules and rearrange modules config --- conf/modules.config | 188 ++++++++---------- modules/local/bam_remove_orphans.nf | 3 + modules/local/bedtools_genomecov.nf | 6 +- modules/local/deseq2_qc.nf | 8 +- modules/local/frip_score.nf | 3 + modules/local/genome_blacklist_regions.nf | 3 + modules/local/gtf2bed.nf | 3 + modules/local/igv.nf | 3 + modules/local/multiqc.nf | 3 + modules/local/multiqc_custom_peaks.nf | 3 + .../multiqc_custom_phantompeakqualtools.nf | 3 + modules/local/plot_homer_annotatepeaks.nf | 3 + modules/local/plot_macs2_qc.nf | 3 + modules/local/samplesheet_check.nf | 2 +- modules/local/star_genomegenerate.nf | 3 + 15 files changed, 124 insertions(+), 113 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 2d57aa3a..a112e27d 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -21,7 +21,8 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] - withName: 'NFCORE_CHIPSEQ:CHIPSEQ:INPUT_CHECK:SAMPLESHEET_CHECK' { + withName: 'SAMPLESHEET_CHECK' { + ext.args = 'samplesheet.valid.csv' publishDir = [ path: { "${params.outdir}/pipeline_info" }, mode: params.publish_dir_mode, @@ -36,6 +37,10 @@ process { pattern: '*_versions.yml' ] } + + withName: 'KHMER_UNIQUEKMERS' { + publishDir = [ enabled: false ] + } } // @@ -62,7 +67,7 @@ process { ] } - withName: 'BWA_INDEX|BOWTIE2_BUILD|STAR_GENOMEGENERATE' { + withName: 'BWA_INDEX|BOWTIE2_BUILD|STAR_GENOMEGENERATE|CHROMAP_INDEX' { publishDir = [ path: { "${params.outdir}/genome/index" }, mode: params.publish_dir_mode, @@ -71,15 +76,6 @@ process { ] } - withName: 'UNTAR_CHROMAP_INDEX|CHROMAP_INDEX' { - publishDir = [ - path: { "${params.outdir}/genome/index/chromap" }, - mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - enabled: params.save_reference - ] - } - withName: 'GFFREAD' { ext.args = '--keep-exon-attrs -F -T' publishDir = [ @@ -111,7 +107,8 @@ process { publishDir = [ path: { "${params.outdir}/genome" }, mode: params.publish_dir_mode, - saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, + enabled: params.save_reference ] } } @@ -258,6 +255,14 @@ if (params.aligner == 'bowtie2') { if (params.aligner == 'chromap') { process { + withName: 'CHROMAP_INDEX' { + publishDir = [ + path: { "${params.outdir}/genome/${params.aligner}/index" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + } + withName: CHROMAP_CHROMAP { ext.args = '-l 2000 --low-mem --SAM' ext.prefix = { "${meta.id}.Lb" } @@ -311,7 +316,12 @@ process { withName: 'PICARD_MERGESAMFILES' { ext.args = '--SORT_ORDER coordinate --VALIDATION_STRINGENCY LENIENT --TMP_DIR tmp' ext.prefix = { "${meta.id}.mLb.sorted" } - publishDir = [ enabled: false ] + publishDir = [ + path: { "${params.outdir}/${params.aligner}/merged_library" }, + mode: params.publish_dir_mode, + pattern: '*.bam', + enabled: params.save_align_intermeds + ] } withName: '.*:BAM_MARKDUPLICATES_PICARD:PICARD_MARKDUPLICATES' { @@ -350,7 +360,6 @@ process { ] } - // Should only be published when paired end data is used and save_align_intermeds is true withName: 'BAMTOOLS_FILTER' { ext.args = { [ @@ -359,34 +368,41 @@ process { params.keep_multi_map ? '' : '-q 1' ].join(' ').trim() } - ext.prefix = { meta.single_end ? "${meta.id}.mLb.noPublish" : "${meta.id}.mLb.flT.sorted" } //TODO check with atacseq + ext.prefix = { meta.single_end ? "${meta.id}.mLb.clN.sorted" : "${meta.id}.mLb.flT.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary" }, + path: { "${params.outdir}/${params.aligner}/merged_library" }, mode: params.publish_dir_mode, - pattern: '*.mLb.flT.sorted.bam', - enabled: params.save_align_intermeds + pattern: '*.bam', + saveAs: { (meta.single_end || params.save_align_intermeds) ? "${it}" : null } ] } withName: 'BAM_REMOVE_ORPHANS' { ext.args = '--only_fr_pairs' ext.prefix = { "${meta.id}.mLb.clN" } - publishDir = [ enabled: false ] + publishDir = [ + path: { "${params.outdir}/${params.aligner}/merged_library" }, + mode: params.publish_dir_mode, + pattern: '*.bam', + enabled: params.save_align_intermeds + ] } withName: 'NFCORE_CHIPSEQ:CHIPSEQ:BAM_FILTER_BAMTOOLS:SAMTOOLS_SORT' { - ext.prefix = { "${meta.id}.mLb.clN.sorted" } + ext.args = '-n' + ext.prefix = { "${meta.id}.mLb.flT.name_sorted" } publishDir = [ path: { "${params.outdir}/${params.aligner}/mergedLibrary" }, mode: params.publish_dir_mode, - pattern: '*.bam' + pattern: '*.bam', + enabled: params.save_align_intermeds ] } withName: 'NFCORE_CHIPSEQ:CHIPSEQ:BAM_FILTER_BAMTOOLS:SAMTOOLS_INDEX' { ext.prefix = { "${meta.id}.mLb.clN.sorted" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary" }, + path: { "${params.outdir}/${params.aligner}/merged_library" }, mode: params.publish_dir_mode, pattern: '*.{bai,csi}' ] @@ -395,7 +411,7 @@ process { withName: 'NFCORE_CHIPSEQ:CHIPSEQ:BAM_FILTER_BAMTOOLS:BAM_STATS_SAMTOOLS:.*' { ext.prefix = { "${meta.id}.mLb.clN.sorted.bam" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/samtools_stats" }, + path: { "${params.outdir}/${params.aligner}/merged_library/samtools_stats" }, mode: params.publish_dir_mode, pattern: "*.{stats,flagstat,idxstats}" ] @@ -404,7 +420,7 @@ process { withName: 'PHANTOMPEAKQUALTOOLS' { ext.args2 = { "-p=$task.cpus" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/phantompeakqualtools" }, + path: { "${params.outdir}/${params.aligner}/merged_library/phantompeakqualtools" }, mode: params.publish_dir_mode, pattern: "*.{out,pdf}" ] @@ -412,25 +428,37 @@ process { withName: 'MULTIQC_CUSTOM_PHANTOMPEAKQUALTOOLS' { publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/phantompeakqualtools" }, + path: { "${params.outdir}/${params.aligner}/merged_library/phantompeakqualtools" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } withName: 'BEDTOOLS_GENOMECOV' { - ext.prefix = { "${meta.id}" } + ext.args = { + [ + (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' + ].join(' ').trim() + } + ext.prefix = { "${meta.id}.mLB.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/bigwig/scale" }, - mode: params.publish_dir_mode, - pattern: "*.txt" + [ + path: { "${params.outdir}/${params.aligner}/merged_library/bigwig" }, + mode: params.publish_dir_mode, + pattern: "*.bigWig" + ], + [ + path: { "${params.outdir}/${params.aligner}/merged_library/bigwig/scale" }, + mode: params.publish_dir_mode, + pattern: "*.txt" + ] ] } withName: 'UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}" } + ext.prefix = { "${meta.id}..mLb.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/bigwig" }, + path: { "${params.outdir}/${params.aligner}/merged_library/bigwig" }, mode: params.publish_dir_mode, pattern: "*.bigWig" ] @@ -444,12 +472,12 @@ if (!params.skip_picard_metrics) { ext.prefix = { "${meta.id}.mLb.clN.sorted" } publishDir = [ [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/picard_metrics" }, + path: { "${params.outdir}/${params.aligner}/merged_library/picard_metrics" }, mode: params.publish_dir_mode, pattern: "*_metrics" ], [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/picard_metrics/pdf" }, + path: { "${params.outdir}/${params.aligner}/merged_library/picard_metrics/pdf" }, mode: params.publish_dir_mode, pattern: "*.pdf" ] @@ -462,9 +490,9 @@ if (!params.skip_preseq) { process { withName: 'PRESEQ_LCEXTRAP' { ext.args = '-verbose -bam -seed 1' - ext.prefix = { "${meta.id}.mLb.clN" } + ext.prefix = { "${meta.id}.mLb.mkD" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/preseq" }, + path: { "${params.outdir}/${params.aligner}/merged_library/preseq" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -475,10 +503,10 @@ if (!params.skip_preseq) { if (!params.skip_plot_profile) { process { withName: 'DEEPTOOLS_COMPUTEMATRIX' { - ext.args = 'scale-regions --regionBodyLength 1000 --beforeRegionStartLength 3000 --afterRegionStartLength 3000 --skipZeros --smartLabels' + ext.args = 'scale-regions --regionBodyLength 1000 --beforeRegionStartLength 3000 --afterRegionStartLength 3000 --missingDataAsZero --skipZeros --smartLabels' ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/deepTools/plotProfile" }, + path: { "${params.outdir}/${params.aligner}/merged_library/deepTools/plotProfile" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -487,7 +515,7 @@ if (!params.skip_plot_profile) { withName: 'DEEPTOOLS_PLOTPROFILE' { ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/deepTools/plotProfile" }, + path: { "${params.outdir}/${params.aligner}/merged_library/deepTools/plotProfile" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -496,7 +524,7 @@ if (!params.skip_plot_profile) { withName: 'DEEPTOOLS_PLOTHEATMAP' { ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/deepTools/plotProfile" }, + path: { "${params.outdir}/${params.aligner}/merged_library/deepTools/plotProfile" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -504,12 +532,6 @@ if (!params.skip_plot_profile) { } } -process { - withName: 'KHMER_UNIQUEKMERS' { - publishDir = [ enabled: false ] - } -} - if (!params.skip_plot_fingerprint) { process { withName: 'DEEPTOOLS_PLOTFINGERPRINT' { @@ -520,7 +542,7 @@ if (!params.skip_plot_fingerprint) { ].join(' ').trim() } ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [ - path: { "${params.outdir}/${params.aligner}/mergedLibrary/deepTools/plotFingerprint" }, + path: { "${params.outdir}/${params.aligner}/merged_library/deepTools/plotFingerprint" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -536,11 +558,11 @@ process { params.save_macs_pileup ? '--bdg --SPMR' : '', params.macs_fdr ? "--qvalue ${params.macs_fdr}" : '', params.macs_pvalue ? "--pvalue ${params.macs_pvalue}" : '', - params.aligner == "chromap" ? "--format BAM" : '' + params.aligner == "chromap" ? "--format BAM" : '' //TODO check if not needed anymore with new chromap versions ].join(' ').trim() publishDir = [ path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", + "${params.outdir}/${params.aligner}/merged_library/macs2", params.narrow_peak? '/narrowPeak' : '/broadPeak' ].join('') }, mode: params.publish_dir_mode, @@ -551,22 +573,14 @@ process { withName: 'FRIP_SCORE' { ext.args = '-bed -c -f 0.20' publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/qc' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/qc" }, enabled: false ] } withName: 'MULTIQC_CUSTOM_PEAKS' { publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/qc' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak} ? '/narrowPeak' : '/broadPeak'}/qc" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -579,10 +593,7 @@ if (!params.skip_peak_annotation) { ext.args = '-gid' ext.prefix = { "${meta.id}_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak' }" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -594,11 +605,7 @@ if (!params.skip_peak_annotation) { withName: 'PLOT_MACS2_QC' { ext.args = '-o ./ -p macs2_peak' publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/qc' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/qc" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -608,11 +615,7 @@ if (!params.skip_peak_annotation) { ext.args = '-o ./' ext.prefix = 'macs2_annotatePeaks' publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/qc' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/qc" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -627,12 +630,7 @@ if (!params.skip_consensus_peaks) { ext.when = { meta.multiple_groups || meta.replicates_exist } ext.prefix = { "${meta.id}.consensus_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/consensus', - "/${meta.id}" - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -642,12 +640,7 @@ if (!params.skip_consensus_peaks) { ext.args = '-F SAF -O --fracOverlap 0.2' ext.prefix = { "${meta.id}.consensus_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/consensus', - "/${meta.id}" - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -660,12 +653,7 @@ if (!params.skip_consensus_peaks) { ext.args = '-gid' ext.prefix = { "${meta.id}.consensus_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/consensus', - "/${meta.id}" - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -674,12 +662,7 @@ if (!params.skip_consensus_peaks) { withName: 'ANNOTATE_BOOLEAN_PEAKS' { ext.prefix = { "${meta.id}.consensus_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/consensus', - "/${meta.id}" - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -699,13 +682,7 @@ if (!params.skip_consensus_peaks) { ].join(' ').trim() ext.prefix = { "${meta.id}.consensus_peaks" } publishDir = [ - path: { [ - "${params.outdir}/${params.aligner}/mergedLibrary/macs2", - params.narrow_peak? '/narrowPeak' : '/broadPeak', - '/consensus', - "/${meta.id}", - '/deseq2' - ].join('') }, + path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}/deseq2" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] @@ -738,10 +715,7 @@ if (!params.skip_multiqc) { withName: 'MULTIQC' { ext.args = params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' publishDir = [ - path: { [ - "${params.outdir}/multiqc", - params.narrow_peak? '/narrowPeak' : '/broadPeak' - ].join('') }, + path: { "${params.outdir}/multiqc/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] diff --git a/modules/local/bam_remove_orphans.nf b/modules/local/bam_remove_orphans.nf index 95a56c60..d6e221aa 100644 --- a/modules/local/bam_remove_orphans.nf +++ b/modules/local/bam_remove_orphans.nf @@ -17,6 +17,9 @@ process BAM_REMOVE_ORPHANS { tuple val(meta), path("${prefix}.bam"), emit: bam path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ def args = task.ext.args ?: '' prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/local/bedtools_genomecov.nf b/modules/local/bedtools_genomecov.nf index 2f38c06c..eb3d0dcc 100644 --- a/modules/local/bedtools_genomecov.nf +++ b/modules/local/bedtools_genomecov.nf @@ -15,11 +15,13 @@ process BEDTOOLS_GENOMECOV { tuple val(meta), path("*.txt") , emit: scale_factor path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def pe = meta.single_end ? '' : '-pc' - def extend = (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' """ SCALE_FACTOR=\$(grep '[0-9] mapped (' $flagstat | awk '{print 1000000/\$1}') echo \$SCALE_FACTOR > ${prefix}.scale_factor.txt diff --git a/modules/local/deseq2_qc.nf b/modules/local/deseq2_qc.nf index fe389300..d9b96e11 100644 --- a/modules/local/deseq2_qc.nf +++ b/modules/local/deseq2_qc.nf @@ -26,10 +26,12 @@ process DESEQ2_QC { path "size_factors" , optional:true, emit: size_factors path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: - def args = task.ext.args ?: '' - def peak_type = params.narrow_peak ? 'narrowPeak' : 'broadPeak' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" """ deseq2_qc.r \\ --count_file $counts \\ diff --git a/modules/local/frip_score.nf b/modules/local/frip_score.nf index ffcc6e2d..28133e0c 100644 --- a/modules/local/frip_score.nf +++ b/modules/local/frip_score.nf @@ -14,6 +14,9 @@ process FRIP_SCORE { tuple val(meta), path("*.txt"), emit: txt path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" diff --git a/modules/local/genome_blacklist_regions.nf b/modules/local/genome_blacklist_regions.nf index 4421fb6c..fcb8451c 100644 --- a/modules/local/genome_blacklist_regions.nf +++ b/modules/local/genome_blacklist_regions.nf @@ -17,6 +17,9 @@ process GENOME_BLACKLIST_REGIONS { path '*.bed' , emit: bed path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def file_out = "${sizes.simpleName}.include_regions.bed" if (blacklist) { diff --git a/modules/local/gtf2bed.nf b/modules/local/gtf2bed.nf index 91e29062..8a8e7bf9 100644 --- a/modules/local/gtf2bed.nf +++ b/modules/local/gtf2bed.nf @@ -14,6 +14,9 @@ process GTF2BED { path '*.bed' , emit: bed path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ """ gtf2bed \\ diff --git a/modules/local/igv.nf b/modules/local/igv.nf index f1f24325..cf02fd9e 100644 --- a/modules/local/igv.nf +++ b/modules/local/igv.nf @@ -23,6 +23,9 @@ process IGV { path fasta , emit: fasta path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: // scripts are bundled with the pipeline in nf-core/chipseq/bin/ def consensus_dir = "${aligner_dir}/mergedLibrary/macs2/${peak_dir}/consensus/*" """ diff --git a/modules/local/multiqc.nf b/modules/local/multiqc.nf index 31552551..d23d2cbe 100644 --- a/modules/local/multiqc.nf +++ b/modules/local/multiqc.nf @@ -56,6 +56,9 @@ process MULTIQC { path "*_plots" , optional:true, emit: plots path "versions.yml" , emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = task.ext.args ?: '' def custom_config = params.multiqc_config ? "--config $mqc_custom_config" : '' diff --git a/modules/local/multiqc_custom_peaks.nf b/modules/local/multiqc_custom_peaks.nf index 8fabe949..c19d81a5 100644 --- a/modules/local/multiqc_custom_peaks.nf +++ b/modules/local/multiqc_custom_peaks.nf @@ -14,6 +14,9 @@ process MULTIQC_CUSTOM_PEAKS { tuple val(meta), path("*.peak_count_mqc.tsv"), emit: count tuple val(meta), path("*.FRiP_mqc.tsv") , emit: frip + when: + task.ext.when == null || task.ext.when + script: def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/multiqc_custom_phantompeakqualtools.nf b/modules/local/multiqc_custom_phantompeakqualtools.nf index c7f4127f..9e59d057 100644 --- a/modules/local/multiqc_custom_phantompeakqualtools.nf +++ b/modules/local/multiqc_custom_phantompeakqualtools.nf @@ -16,6 +16,9 @@ process MULTIQC_CUSTOM_PHANTOMPEAKQUALTOOLS { tuple val(meta), path("*.spp_rsc_mqc.tsv") , emit: rsc tuple val(meta), path("*.spp_correlation_mqc.tsv"), emit: correlation + when: + task.ext.when == null || task.ext.when + script: def prefix = task.ext.prefix ?: "${meta.id}" """ diff --git a/modules/local/plot_homer_annotatepeaks.nf b/modules/local/plot_homer_annotatepeaks.nf index eed17949..36c4730e 100644 --- a/modules/local/plot_homer_annotatepeaks.nf +++ b/modules/local/plot_homer_annotatepeaks.nf @@ -17,6 +17,9 @@ process PLOT_HOMER_ANNOTATEPEAKS { path '*.tsv' , emit: tsv path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "annotatepeaks" diff --git a/modules/local/plot_macs2_qc.nf b/modules/local/plot_macs2_qc.nf index 2915b739..7599c9f8 100644 --- a/modules/local/plot_macs2_qc.nf +++ b/modules/local/plot_macs2_qc.nf @@ -15,6 +15,9 @@ process PLOT_MACS2_QC { path '*.pdf' , emit: pdf path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ def args = task.ext.args ?: '' def peak_type = is_narrow_peak ? 'narrowPeak' : 'broadPeak' diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index c28658f5..583c436f 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -21,7 +21,7 @@ process SAMPLESHEET_CHECK { """ check_samplesheet.py \\ $samplesheet \\ - samplesheet.valid.csv + $args cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/local/star_genomegenerate.nf b/modules/local/star_genomegenerate.nf index 904b0714..285df97c 100644 --- a/modules/local/star_genomegenerate.nf +++ b/modules/local/star_genomegenerate.nf @@ -16,6 +16,9 @@ process STAR_GENOMEGENERATE { path "star" , emit: index path "versions.yml", emit: versions + when: + task.ext.when == null || task.ext.when + script: def args = (task.ext.args ?: '').tokenize() def memory = task.memory ? "--limitGenomeGenerateRAM ${task.memory.toBytes() - 100000000}" : '' From eca2e06718df27dd1f7a74db5bf04fa9172f5c0c Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 18:58:30 +0200 Subject: [PATCH 09/15] Fix typo --- modules/local/bedtools_genomecov.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/bedtools_genomecov.nf b/modules/local/bedtools_genomecov.nf index eb3d0dcc..28dcc5dd 100644 --- a/modules/local/bedtools_genomecov.nf +++ b/modules/local/bedtools_genomecov.nf @@ -32,7 +32,7 @@ process BEDTOOLS_GENOMECOV { -bg \\ -scale \$SCALE_FACTOR \\ $pe \\ - $extend \\ + $args \\ | sort -T '.' -k1,1 -k2,2n > ${prefix}.bedGraph cat <<-END_VERSIONS > versions.yml From 4aa413dec02fdbf3509ba90c38b7982bd3eb1e86 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 19:36:31 +0200 Subject: [PATCH 10/15] Read args from samplesheet_check --- modules/local/samplesheet_check.nf | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/local/samplesheet_check.nf b/modules/local/samplesheet_check.nf index 583c436f..216e9fb7 100644 --- a/modules/local/samplesheet_check.nf +++ b/modules/local/samplesheet_check.nf @@ -18,6 +18,7 @@ process SAMPLESHEET_CHECK { task.ext.when == null || task.ext.when script: // This script is bundled with the pipeline, in nf-core/chipseq/bin/ + def args = task.ext.args ?: '' """ check_samplesheet.py \\ $samplesheet \\ From 4ab68b3201245fdf0f0df11bad556aa794cb9852 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Mon, 26 Jun 2023 23:15:09 +0200 Subject: [PATCH 11/15] Update output --- conf/modules.config | 4 ++-- docs/output.md | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index a112e27d..adb500b3 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -67,7 +67,7 @@ process { ] } - withName: 'BWA_INDEX|BOWTIE2_BUILD|STAR_GENOMEGENERATE|CHROMAP_INDEX' { + withName: 'BWA_INDEX|BOWTIE2_BUILD|STAR_GENOMEGENERATE' { publishDir = [ path: { "${params.outdir}/genome/index" }, mode: params.publish_dir_mode, @@ -257,7 +257,7 @@ if (params.aligner == 'chromap') { process { withName: 'CHROMAP_INDEX' { publishDir = [ - path: { "${params.outdir}/genome/${params.aligner}/index" }, + path: { "${params.outdir}/genome/index/${params.aligner}" }, mode: params.publish_dir_mode, saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] diff --git a/docs/output.md b/docs/output.md index b3198554..065dcfd3 100644 --- a/docs/output.md +++ b/docs/output.md @@ -108,19 +108,19 @@ The library-level alignments associated with the same sample are merged and subs
Output files -- `/mergedLibrary/` +- `/merged_library/` - `*.bam`: Merged library-level, coordinate sorted `*.bam` files after the marking of duplicates, and filtering based on various criteria. The file suffix for the final filtered files will be `*.mLb.clN.*`. If you specify the `--save_align_intermeds` parameter then two additional sets of files will be present. These represent the unfiltered alignments with duplicates marked (`*.mLb.mkD.*`), and in the case of paired-end datasets the filtered alignments before the removal of orphan read pairs (`*.mLb.flT.*`). -- `/mergedLibrary/samtools_stats/` +- `/merged_library/samtools_stats/` - SAMtools `*.flagstat`, `*.idxstats` and `*.stats` files generated from the alignment files. -- `/mergedLibrary/picard_metrics/` +- `/merged_library/picard_metrics/` - `*_metrics`: Alignment QC files from picard CollectMultipleMetrics. - `*.metrics.txt`: Metrics file from MarkDuplicates. -- `/mergedLibrary/picard_metrics/pdf/` +- `/merged_library/picard_metrics/pdf/` - `*.pdf`: Alignment QC plot files from picard CollectMultipleMetrics. -- `/mergedLibrary/preseq/` +- `/merged_library/preseq/` - `*.lc_extrap.txt`: Preseq expected future yield file. -> **NB:** File names in the resulting directory (i.e. `/mergedLibrary/`) will have the '`.mLb.`' suffix. +> **NB:** File names in the resulting directory (i.e. `/merged_library/`) will have the '`.mLb.`' suffix.
@@ -141,7 +141,7 @@ The [Preseq](http://smithlabresearch.org/software/preseq/) package is aimed at p
Output files -- `/mergedLibrary/bigwig/` +- `/merged_library/bigwig/` - `*.bigWig`: Normalised bigWig files scaled to 1 million mapped reads.
@@ -153,12 +153,12 @@ The [bigWig](https://genome.ucsc.edu/goldenpath/help/bigWig.html) format is in a
Output files -- `/mergedLibrary/phantompeakqualtools/` +- `/merged_library/phantompeakqualtools/` - `*.spp.out`, `*.spp.pdf`: phantompeakqualtools output files. - `*_mqc.tsv`: MultiQC custom content files. -- `/mergedLibrary/deepTools/plotFingerprint/` +- `/merged_library/deepTools/plotFingerprint/` - `*.plotFingerprint.pdf`, `*.plotFingerprint.qcmetrics.txt`, `*.plotFingerprint.raw.txt`: plotFingerprint output files. -- `/mergedLibrary/deepTools/plotProfile/` +- `/merged_library/deepTools/plotProfile/` - `*.computeMatrix.mat.gz`, `*.computeMatrix.vals.mat.tab`, `*.plotProfile.pdf`, `*.plotProfile.tab`, `*.plotHeatmap.pdf`, `*.plotHeatmap.mat.tab`: plotProfile output files.
@@ -188,10 +188,10 @@ The results from deepTools plotProfile gives you a quick visualisation for the g
Output files -- `/mergedLibrary/macs2//` +- `/merged_library/macs2//` - `*.xls`, `*.broadPeak` or `*.narrowPeak`, `*.gappedPeak`, `*summits.bed`: MACS2 output files - the files generated will depend on whether MACS2 has been run in _narrowPeak_ or _broadPeak_ mode. - `*.annotatePeaks.txt`: HOMER peak-to-gene annotation file. -- `/mergedLibrary/macs2//qc/` +- `/merged_library/macs2//qc/` - `macs2_peak.plots.pdf`: QC plots for MACS2 peaks. - `macs2_annotatePeaks.plots.pdf`: QC plots for peak-to-gene feature annotation. - `*.FRiP_mqc.tsv`, `*.peak_count_mqc.tsv`, `annotatepeaks.summary_mqc.tsv`: MultiQC custom-content files for FRiP score, peak count and peak-to-gene ratios. @@ -217,7 +217,7 @@ Various QC plots per sample including number of peaks, fold-change distribution,
Output files -- `/mergedLibrary/macs2//consensus//` +- `/merged_library/macs2//consensus//` - `*.bed`: Consensus peak-set across all samples in BED format. - `*.saf`: Consensus peak-set across all samples in SAF format. Required by featureCounts for read quantification. - `*.featureCounts.txt`: Read counts across all samples relative to consensus peak-set. @@ -245,7 +245,7 @@ The [featureCounts](http://bioinf.wehi.edu.au/featureCounts/) tool is used to co
Output files -- `/mergedLibrary/macs2//consensus//deseq2/` +- `/merged_library/macs2//consensus//deseq2/` - `*.sample.dists.txt`: Spreadsheet containing sample-to-sample distance across each consensus peak. - `*.plots.pdf`: File containing PCA and hierarchical clustering plots. - `*.dds.RData`: File containing R `DESeqDataSet` object generated by DESeq2, with either @@ -254,7 +254,7 @@ The [featureCounts](http://bioinf.wehi.edu.au/featureCounts/) tool is used to co `readRDS` to give user control of the eventual object name. - `*pca.vals.txt`: Matrix of values for the first 2 principal components. - `R_sessionInfo.log`: File containing information about R, the OS and attached or loaded packages. - - `/mergedLibrary/macs2//consensus//sizeFactors/` + - `/merged_library/macs2//consensus//sizeFactors/` - `*.txt`, `*.RData`: Files containing DESeq2 sizeFactors per sample.
From 5d8b57061a572c54bce9e1ca8da4006cab21598a Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Tue, 27 Jun 2023 19:41:59 +0200 Subject: [PATCH 12/15] Apply review changes --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index adb500b3..454f6dfa 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -456,7 +456,7 @@ process { } withName: 'UCSC_BEDGRAPHTOBIGWIG' { - ext.prefix = { "${meta.id}..mLb.clN" } + ext.prefix = { "${meta.id}.mLb.clN" } publishDir = [ path: { "${params.outdir}/${params.aligner}/merged_library/bigwig" }, mode: params.publish_dir_mode, From eb7c34941880971aad7ce9c5e994afa1a1577d56 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Tue, 27 Jun 2023 22:41:49 +0200 Subject: [PATCH 13/15] Apply review changes --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 454f6dfa..ffcbb614 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -438,7 +438,7 @@ process { ext.args = { [ (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' - ].join(' ').trim() + ].trim() } ext.prefix = { "${meta.id}.mLB.clN" } publishDir = [ From 0ae5d55703cb931a2d02cb539683c2e31b49b943 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Tue, 27 Jun 2023 23:19:57 +0200 Subject: [PATCH 14/15] Revert change --- conf/modules.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index ffcbb614..454f6dfa 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -438,7 +438,7 @@ process { ext.args = { [ (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' - ].trim() + ].join(' ').trim() } ext.prefix = { "${meta.id}.mLB.clN" } publishDir = [ From 2a5f3f4e5aa4129712dc1a5fa1979f1eddfb0977 Mon Sep 17 00:00:00 2001 From: JoseEspinosa Date: Wed, 28 Jun 2023 12:57:48 +0200 Subject: [PATCH 15/15] Get rid of unused list for ext.args --- conf/modules.config | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 454f6dfa..6b67b9aa 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -435,11 +435,7 @@ process { } withName: 'BEDTOOLS_GENOMECOV' { - ext.args = { - [ - (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' - ].join(' ').trim() - } + ext.args = { (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' } ext.prefix = { "${meta.id}.mLB.clN" } publishDir = [ [