Skip to content

Commit

Permalink
Merged ktrns/master into ktrns/dev. Fixed nf-core#164 (4/5 bp shift), f…
Browse files Browse the repository at this point in the history
…ixed nf-core#168 (write genome fa and fai for IGV), fixed nf-core#169 (peak calling).
  • Loading branch information
ktrns committed Jul 3, 2023
2 parents eb04c86 + df64c3a commit f14eeb8
Show file tree
Hide file tree
Showing 12 changed files with 499 additions and 108 deletions.
70 changes: 68 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,37 @@ 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 = {
[
Expand Down Expand Up @@ -590,9 +621,12 @@ if (!params.skip_plot_fingerprint) {
process {
withName: '.*:MERGED_LIBRARY_CALL_ANNOTATE_PEAKS:MACS2_CALLPEAK' {
ext.args = [
'--format BED',
'--keep-dup all',
'--nomodel',
params.narrow_peak ? '' : "--broad --broad-cutoff ${params.broad_cutoff}",
'--shift -75',
'--extsize 150',
params.narrow_peak ? '--call-summits' : "--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 @@ -784,6 +818,37 @@ 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 = {
[
Expand Down Expand Up @@ -820,6 +885,7 @@ 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 Expand Up @@ -957,7 +1023,7 @@ if (!params.skip_igv) {
[
path: { "${params.outdir}/genome" },
mode: params.publish_dir_mode,
pattern: '*.{fa,fasta}'
pattern: '*.{fa,fasta,fai}'
]
]
}
Expand Down

0 comments on commit f14eeb8

Please sign in to comment.