Skip to content

Commit

Permalink
Merge pull request #363 from samuelruizperez/dev
Browse files Browse the repository at this point in the history
Fix publishDir paths in modules.config
  • Loading branch information
JoseEspinosa authored Oct 16, 2023
2 parents 74ef5af + e5db239 commit f7d76c9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@ module_order:
name: "MERGED LIB: SAMTools (unfiltered)"
info: "This section of the report shows SAMTools results after merging libraries and before filtering."
path_filters:
- "./alignment/mergedLibrary/unfiltered/*.mLb.mkD.sorted.bam*"
- "./alignment/merged_library/unfiltered/*.mLb.mkD.sorted.bam*"
- picard:
name: "MERGED LIB: Picard (unfiltered)"
info: "This section of the report shows picard results after merging libraries and before filtering."
path_filters:
- "./alignment/mergedLibrary/unfiltered/picard_metrics/*"
- "./alignment/merged_library/unfiltered/picard_metrics/*"
- preseq:
name: "MERGED LIB: Preseq (unfiltered)"
info: "This section of the report shows Preseq results after merging libraries and before filtering."
- samtools:
name: "MERGED LIB: SAMTools (filtered)"
info: "This section of the report shows SAMTools results after merging libraries and after filtering."
path_filters:
- "./alignment/mergedLibrary/filtered/*.mLb.clN.sorted.bam*"
- "./alignment/merged_library/filtered/*.mLb.clN.sorted.bam*"
- picard:
name: "MERGED LIB: Picard (filtered)"
info: "This section of the report shows picard results after merging libraries and after filtering."
path_filters:
- "./alignment/mergedLibrary/filtered/picard_metrics/*"
- "./alignment/merged_library/filtered/picard_metrics/*"
- deeptools:
name: "MERGED LIB: deepTools"
anchor: "mlib_deeptools"
Expand Down
34 changes: 17 additions & 17 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ process {
ext.prefix = { "${meta.id}.mLb.mkD.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.txt'
],
[
path: { "${params.outdir}/${params.aligner}/mergedLibrary" },
path: { "${params.outdir}/${params.aligner}/merged_library" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.save_align_intermeds
Expand All @@ -344,7 +344,7 @@ process {

withName: '.*:BAM_MARKDUPLICATES_PICARD:SAMTOOLS_INDEX' {
publishDir = [
path: { "${params.outdir}/${params.aligner}/mergedLibrary" },
path: { "${params.outdir}/${params.aligner}/merged_library" },
mode: params.publish_dir_mode,
pattern: '*.{bai,csi}',
enabled: params.save_align_intermeds
Expand All @@ -354,7 +354,7 @@ process {
withName: '.*:BAM_MARKDUPLICATES_PICARD:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}.mLb.mkD.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}'
]
Expand Down Expand Up @@ -392,7 +392,7 @@ process {
ext.args = '-n'
ext.prefix = { "${meta.id}.mLb.flT.name_sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/mergedLibrary" },
path: { "${params.outdir}/${params.aligner}/merged_library" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.save_align_intermeds
Expand Down Expand Up @@ -559,7 +559,7 @@ process {
publishDir = [
path: { [
"${params.outdir}/${params.aligner}/merged_library/macs2",
params.narrow_peak? '/narrowPeak' : '/broadPeak'
params.narrow_peak? '/narrow_peak' : '/broad_peak'
].join('') },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
Expand All @@ -569,14 +569,14 @@ process {
withName: 'FRIP_SCORE' {
ext.args = '-bed -c -f 0.20'
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/qc" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/qc" },
enabled: false
]
}

withName: 'MULTIQC_CUSTOM_PEAKS' {
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak} ? '/narrowPeak' : '/broadPeak'}/qc" },
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 }
]
Expand All @@ -589,7 +589,7 @@ if (!params.skip_peak_annotation) {
ext.args = '-gid'
ext.prefix = { "${meta.id}_peaks" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak' }" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -611,7 +611,7 @@ if (!params.skip_peak_annotation) {
ext.args = '-o ./'
ext.prefix = 'macs2_annotatePeaks'
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/qc" },
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 }
]
Expand All @@ -626,7 +626,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}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/consensus/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -636,7 +636,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}/merged_library/macs2/${params.narrow_peak? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/consensus/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -649,7 +649,7 @@ if (!params.skip_consensus_peaks) {
ext.args = '-gid'
ext.prefix = { "${meta.id}.consensus_peaks" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/consensus/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -658,7 +658,7 @@ if (!params.skip_consensus_peaks) {
withName: 'ANNOTATE_BOOLEAN_PEAKS' {
ext.prefix = { "${meta.id}.consensus_peaks" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/consensus/${meta.id}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -678,7 +678,7 @@ if (!params.skip_consensus_peaks) {
].join(' ').trim()
ext.prefix = { "${meta.id}.consensus_peaks" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrowPeak' : '/broadPeak'}/consensus/${meta.id}/deseq2" },
path: { "${params.outdir}/${params.aligner}/merged_library/macs2/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}/consensus/${meta.id}/deseq2" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand All @@ -692,7 +692,7 @@ if (!params.skip_igv) {
withName: 'IGV' {
publishDir = [
[
path: { "${params.outdir}/igv/${params.narrow_peak? '/narrowPeak' : '/broadPeak' }" },
path: { "${params.outdir}/igv/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}" },
mode: params.publish_dir_mode,
pattern: '*.{txt,xml}'
],
Expand All @@ -711,7 +711,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'}" },
path: { "${params.outdir}/multiqc/${params.narrow_peak ? '/narrow_peak' : '/broad_peak'}" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
Expand Down
8 changes: 4 additions & 4 deletions modules/local/igv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ process IGV {
val aligner_dir
val peak_dir
path fasta
path ("${aligner_dir}/mergedLibrary/bigwig/*")
path ("${aligner_dir}/mergedLibrary/macs2/${peak_dir}/*")
path ("${aligner_dir}/mergedLibrary/macs2/${peak_dir}/consensus/*")
path ("${aligner_dir}/merged_library/bigwig/*")
path ("${aligner_dir}/merged_library/macs2/${peak_dir}/*")
path ("${aligner_dir}/merged_library/macs2/${peak_dir}/consensus/*")
path ("mappings/*")

output:
Expand All @@ -27,7 +27,7 @@ process IGV {
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/*"
def consensus_dir = "${aligner_dir}/merged_library/macs2/${peak_dir}/consensus/*"
"""
find * -type l -name "*.bigWig" -exec echo -e ""{}"\\t0,0,178" \\; > bigwig.igv.txt
find * -type l -name "*Peak" -exec echo -e ""{}"\\t0,0,178" \\; > peaks.igv.txt
Expand Down
16 changes: 8 additions & 8 deletions modules/local/multiqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ process MULTIQC {
path ('alignment/library/*')
path ('alignment/library/*')

path ('alignment/mergedLibrary/unfiltered/*')
path ('alignment/mergedLibrary/unfiltered/*')
path ('alignment/mergedLibrary/unfiltered/*')
path ('alignment/mergedLibrary/unfiltered/picard_metrics/*')
path ('alignment/merged_library/unfiltered/*')
path ('alignment/merged_library/unfiltered/*')
path ('alignment/merged_library/unfiltered/*')
path ('alignment/merged_library/unfiltered/picard_metrics/*')

path ('alignment/mergedLibrary/filtered/*')
path ('alignment/mergedLibrary/filtered/*')
path ('alignment/mergedLibrary/filtered/*')
path ('alignment/mergedLibrary/filtered/picard_metrics/*')
path ('alignment/merged_library/filtered/*')
path ('alignment/merged_library/filtered/*')
path ('alignment/merged_library/filtered/*')
path ('alignment/merged_library/filtered/picard_metrics/*')

path ('preseq/*')

Expand Down
2 changes: 1 addition & 1 deletion workflows/chipseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ workflow CHIPSEQ {
if (!params.skip_igv) {
IGV (
params.aligner,
params.narrow_peak ? 'narrowPeak' : 'broadPeak',
params.narrow_peak ? 'narrow_peak' : 'broad_peak',
PREPARE_GENOME.out.fasta,
UCSC_BEDGRAPHTOBIGWIG.out.bigwig.collect{it[1]}.ifEmpty([]),
ch_macs2_peaks.collect{it[1]}.ifEmpty([]),
Expand Down

0 comments on commit f7d76c9

Please sign in to comment.