Skip to content

Commit 0623e2e

Browse files
authored
Merge pull request #369 from JoseEspinosa/fixes
Increase memory and use sort in `bedtool_genomecov` process when dealing with merged replicates
2 parents 641228c + e53da35 commit 0623e2e

File tree

6 files changed

+41
-19
lines changed

6 files changed

+41
-19
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
- [[#327](https://github.com/nf-core/atacseq/issues/327)] - Consistently support `.csi` indices as alternative to `.bai` to allow SAMTOOLS_INDEX to be used with the `-c` flag.
1111
- [[#356](https://github.com/nf-core/atacseq/issues/356)] - Get rid of the `lib` folder and rearrange the pipeline accordingly.
12-
- Updated pipeline template to [nf-core/tools 2.13.1](https://github.com/nf-core/tools/releases/tag/2.13.1)
1312
- Updated pipeline template to [nf-core/tools 2.14.1](https://github.com/nf-core/tools/releases/tag/2.14.1)
1413
- [[#359](https://github.com/nf-core/atacseq/issues/359)] - Fix `--save_unaligned` description in schema.
14+
- [[#344](https://github.com/nf-core/atacseq/issues/344)] - Fix memory issues when sorting merged replicates after `bedtools genomecov`.
15+
16+
### Parameters
17+
18+
| Old parameter | New parameter |
19+
| ------------- | -------------------------------- |
20+
| | `--skip_merged_replicate_bigwig` |
21+
22+
> **NB:** Parameter has been **updated** if both old and new parameter information is present.
23+
> **NB:** Parameter has been **added** if just the new parameter information is present.
24+
> **NB:** Parameter has been **removed** if parameter information isn't present.
1525
1626
## [[2.1.2](https://github.com/nf-core/atacseq/releases/tag/2.1.2)] - 2022-08-07
1727

conf/base.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ process {
5757
errorStrategy = 'retry'
5858
maxRetries = 2
5959
}
60+
withName: '.*:MERGED_REPLICATE_BAM_TO_BIGWIG:BEDTOOLS_GENOMECOV' {
61+
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
62+
}
6063
}

modules/local/bedtools_genomecov.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ process BEDTOOLS_GENOMECOV {
3535
$args \\
3636
> tmp.bg
3737
38-
bedtools sort -i tmp.bg > ${prefix}.bedGraph
38+
sort -k1,1 -k2,2n tmp.bg > ${prefix}.bedGraph
3939
4040
cat <<-END_VERSIONS > versions.yml
4141
"${task.process}":

nextflow.config

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,16 @@ params {
6060
skip_deseq2_qc = false
6161

6262
// Options: QC
63-
skip_qc = false
64-
skip_fastqc = false
65-
skip_picard_metrics = false
66-
skip_preseq = true
67-
skip_plot_profile = false
68-
skip_plot_fingerprint = false
69-
skip_ataqv = false
70-
skip_igv = false
71-
skip_multiqc = false
63+
skip_qc = false
64+
skip_fastqc = false
65+
skip_picard_metrics = false
66+
skip_preseq = true
67+
skip_plot_profile = false
68+
skip_plot_fingerprint = false
69+
skip_ataqv = false
70+
skip_merged_replicate_bigwig = false
71+
skip_igv = false
72+
skip_multiqc = false
7273

7374
// Options: Config
7475
bamtools_filter_pe_config = "$projectDir/assets/bamtools_filter_pe.json"

nextflow_schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,11 @@
383383
"type": "boolean",
384384
"description": "Skip consensus peak generation, annotation and counting.",
385385
"fa_icon": "fas fa-fast-forward"
386+
},
387+
"skip_merged_replicate_bigwig": {
388+
"type": "boolean",
389+
"description": "Skip generation of bigwig files for merged replicates.",
390+
"fa_icon": "fas fa-fast-forward"
386391
}
387392
}
388393
},

workflows/atacseq.nf

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,17 @@ workflow ATACSEQ {
562562
ch_markduplicates_replicate_metrics = MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.metrics
563563
ch_versions = ch_versions.mix(MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.versions)
564564

565-
// SUBWORKFLOW: Normalised bigWig coverage tracks
566-
//
567-
MERGED_REPLICATE_BAM_TO_BIGWIG (
568-
MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.bam.join(MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.flagstat, by: [0]),
569-
ch_chrom_sizes
570-
)
571-
ch_ucsc_bedgraphtobigwig_replicate_bigwig = MERGED_REPLICATE_BAM_TO_BIGWIG.out.bigwig
572-
ch_versions = ch_versions.mix(MERGED_REPLICATE_BAM_TO_BIGWIG.out.versions)
565+
if (!params.skip_merged_replicate_bigwig) {
566+
//
567+
// SUBWORKFLOW: Normalised bigWig coverage tracks
568+
//
569+
MERGED_REPLICATE_BAM_TO_BIGWIG (
570+
MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.bam.join(MERGED_REPLICATE_MARKDUPLICATES_PICARD.out.flagstat, by: [0]),
571+
ch_chrom_sizes
572+
)
573+
ch_ucsc_bedgraphtobigwig_replicate_bigwig = MERGED_REPLICATE_BAM_TO_BIGWIG.out.bigwig
574+
ch_versions = ch_versions.mix(MERGED_REPLICATE_BAM_TO_BIGWIG.out.versions)
575+
}
573576

574577
// Create channels: [ meta, bam, ([] for control_bam) ]
575578
if (params.with_control) {

0 commit comments

Comments
 (0)