Skip to content

Commit

Permalink
Merge pull request #333 from nf-core/revert-301-dev
Browse files Browse the repository at this point in the history
Revert "DO NOT MERGE yet: Discuss fixes of #164 #168 #169 "
  • Loading branch information
JoseEspinosa authored Sep 6, 2023
2 parents e5a87a5 + 1030a66 commit e034e1e
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 423 deletions.
68 changes: 1 addition & 67 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -465,37 +465,6 @@ process {
]
}

withName: '.*:MERGED_LIBRARY_BAM_SHIFT_READS:DEEPTOOLS_ALIGNMENTSIEVE' {
ext.args = '--ATACshift'
ext.prefix = { "${meta.id}.mLb.clN.shifted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/shifted_reads" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.save_align_intermeds
]
}

withName: '.*:MERGED_LIBRARY_BAM_SHIFT_READS:SAMTOOLS_SORT' {
ext.prefix = { "${meta.id}.mLb.clN.shifted.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/shifted_reads" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.shift_reads
]
}

withName: '.*:MERGED_LIBRARY_BAM_SHIFT_READS:SAMTOOLS_INDEX' {
ext.prefix = { "${meta.id}.mLb.clN.shifted.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_library/shifted_reads" },
mode: params.publish_dir_mode,
pattern: '*.bai',
enabled: params.shift_reads
]
}

withName: '.*:MERGED_LIBRARY_BAM_TO_BIGWIG:BEDTOOLS_GENOMECOV' {
ext.args = { (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' }
ext.prefix = { "${meta.id}.mLb.clN" }
Expand Down Expand Up @@ -623,12 +592,9 @@ if (!params.skip_plot_fingerprint) {
process {
withName: '.*:MERGED_LIBRARY_CALL_ANNOTATE_PEAKS:MACS2_CALLPEAK' {
ext.args = [
'--format BED',
'--keep-dup all',
'--nomodel',
'--shift -75',
'--extsize 150',
params.narrow_peak ? '--call-summits' : "--broad --broad-cutoff ${params.broad_cutoff}",
params.narrow_peak ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
params.save_macs_pileup ? '--bdg --SPMR' : '',
params.macs_pvalue ? "--pvalue ${params.macs_pvalue}" : '',
params.macs_fdr ? "--qvalue ${params.macs_fdr}" : ''
Expand Down Expand Up @@ -820,37 +786,6 @@ if (!params.skip_merge_replicates) {
]
}

withName: '.*:MERGED_REPLICATE_BAM_SHIFT_READS:DEEPTOOLS_ALIGNMENTSIEVE' {
ext.args = '--ATACshift'
ext.prefix = { "${meta.id}.mRp.clN.shifted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_replicate" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.save_align_intermeds
]
}

withName: '.*:MERGED_REPLICATE_BAM_SHIFT_READS:SAMTOOLS_SORT' {
ext.prefix = { "${meta.id}.mRp.clN.shifted.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_replicate/shifted_reads" },
mode: params.publish_dir_mode,
pattern: '*.bam',
enabled: params.shift_reads
]
}

withName: '.*:MERGED_REPLICATE_BAM_SHIFT_READS:SAMTOOLS_INDEX' {
ext.prefix = { "${meta.id}.mRp.clN.shifted.sorted" }
publishDir = [
path: { "${params.outdir}/${params.aligner}/merged_replicate/shifted_reads" },
mode: params.publish_dir_mode,
pattern: '*.bai',
enabled: params.shift_reads
]
}

withName: '.*:MERGED_REPLICATE_BAM_TO_BIGWIG:BEDTOOLS_GENOMECOV' {
ext.args = { (meta.single_end && params.fragment_size > 0) ? "-fs ${params.fragment_size}" : '' }
ext.prefix = { "${meta.id}.mRp.clN" }
Expand Down Expand Up @@ -883,7 +818,6 @@ if (!params.skip_merge_replicates) {
process {
withName: '.*:MERGED_REPLICATE_CALL_ANNOTATE_PEAKS:MACS2_CALLPEAK' {
ext.args = [
'--format BED',
'--keep-dup all',
'--nomodel',
params.narrow_peak ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
Expand Down
147 changes: 47 additions & 100 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,13 @@
"nf-core": {
"ataqv/ataqv": {
"branch": "master",
"git_sha": "56421e1a812bc2f9e77dbe9f297e9d9c580cb8a5",
"installed_by": [
"modules"
]
"git_sha": "11c7e5b3073845889060c793786bf3177275d62e",
"installed_by": ["modules"]
},
"ataqv/mkarv": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
},
"bedtools/bamtobed": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": [
"modules"
]
"git_sha": "11c7e5b3073845889060c793786bf3177275d62e",
"installed_by": ["modules"]
},
"bowtie2/align": {
"branch": "master",
Expand All @@ -33,17 +22,13 @@
},
"bowtie2/build": {
"branch": "master",
"git_sha": "e797efb47b0d3b2124753beb55dc83ab9512bceb",
"installed_by": [
"modules"
]
"git_sha": "6a24fbe314bb2e6fe6306c29a63076ea87e8eb3c",
"installed_by": ["modules"]
},
"bwa/index": {
"branch": "master",
"git_sha": "9518fa4f65f3fb8cde24fde7d40333b39ec8fd65",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"bwa/mem": {
"branch": "master",
Expand All @@ -57,52 +42,38 @@
},
"chromap/index": {
"branch": "master",
"git_sha": "3a8e3ca607132a468c07c69aaa3bccd55eb983b8",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"custom/dumpsoftwareversions": {
"branch": "master",
"git_sha": "8022c68e7403eecbd8ba9c49496f69f8c49d50f0",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"custom/getchromsizes": {
"branch": "master",
"git_sha": "cf5b9c30a2adacc581793afb79fae5f5b50bed01",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"deeptools/computematrix": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"deeptools/plotfingerprint": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"deeptools/plotheatmap": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"deeptools/plotprofile": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
Expand All @@ -111,10 +82,8 @@
},
"gffread": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"gunzip": {
"branch": "master",
Expand All @@ -128,24 +97,18 @@
},
"khmer/uniquekmers": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"macs2/callpeak": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"picard/collectmultiplemetrics": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"picard/markduplicates": {
"branch": "master",
Expand All @@ -154,17 +117,13 @@
},
"picard/mergesamfiles": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"preseq/lcextrap": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"samtools/flagstat": {
"branch": "master",
Expand Down Expand Up @@ -193,10 +152,8 @@
},
"subread/featurecounts": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"trimgalore": {
"branch": "master",
Expand All @@ -210,28 +167,22 @@
},
"umitools/extract": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"fastq_fastqc_umitools_trimgalore"
]
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["fastq_fastqc_umitools_trimgalore"]
},
"untar": {
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905",
"installed_by": [
"modules"
]
"git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e",
"installed_by": ["modules"]
}
}
},
"subworkflows": {
"nf-core": {
"bam_markduplicates_picard": {
"branch": "master",
"git_sha": "6daac2bc63f4847e0c7cc661f4f5b043ac13faaf",
"installed_by": [
"subworkflows"
]
"git_sha": "a9784afdd5dcda23b84e64db75dc591065d64653",
"installed_by": ["subworkflows"]
},
"bam_sort_stats_samtools": {
"branch": "master",
Expand All @@ -250,10 +201,8 @@
},
"fastq_align_bwa": {
"branch": "master",
"git_sha": "ac75f79157ecc64283a2b3a559f1ba90bc0f2259",
"installed_by": [
"subworkflows"
]
"git_sha": "a9784afdd5dcda23b84e64db75dc591065d64653",
"installed_by": ["subworkflows"]
},
"fastq_align_chromap": {
"branch": "master",
Expand All @@ -262,13 +211,11 @@
},
"fastq_fastqc_umitools_trimgalore": {
"branch": "master",
"git_sha": "b51a69e30973c71950225c817ad07a3337d22c40",
"installed_by": [
"subworkflows"
]
"git_sha": "a9784afdd5dcda23b84e64db75dc591065d64653",
"installed_by": ["subworkflows"]
}
}
}
}
}
}
}
2 changes: 2 additions & 0 deletions modules/local/bedtools_genomecov.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ process BEDTOOLS_GENOMECOV {
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def pe = meta.single_end ? '' : '-pc'
"""
SCALE_FACTOR=\$(grep '[0-9] mapped (' $flagstat | awk '{print 1000000/\$1}')
echo \$SCALE_FACTOR > ${prefix}.scale_factor.txt
Expand All @@ -30,6 +31,7 @@ process BEDTOOLS_GENOMECOV {
-ibam $bam \\
-bg \\
-scale \$SCALE_FACTOR \\
$pe \\
$args \\
> tmp.bg
Expand Down
Loading

0 comments on commit e034e1e

Please sign in to comment.