Skip to content

Commit

Permalink
Adding code to split bam on chromosome in order to try and paralleliz…
Browse files Browse the repository at this point in the history
…e and speed up umitools dedup. Also tweaking some of structure of the results folder
  • Loading branch information
atrull314 committed Mar 25, 2024
1 parent 6e358bc commit 602a675
Show file tree
Hide file tree
Showing 13 changed files with 759 additions and 17 deletions.
81 changes: 76 additions & 5 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,38 @@ if (!params.skip_qc){

process {
withName:'.*:BAM_SORT_STATS_SAMTOOLS_DEDUP:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}.dedup" }
ext.prefix = { "${meta.id}.dedup.sorted" }
publishDir = [
path: { "${params.outdir}/${meta.id}/qc/samtools/dedup" },
path: { "${params.outdir}/${meta.id}/bam/dedup" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}
}

process {
withName:'.*:BAM_SORT_STATS_SAMTOOLS_SPLIT:BAM_STATS_SAMTOOLS:.*' {
ext.prefix = { "${meta.id}.sorted" }
publishDir = [
enabled: false
]
}
}
}

if (!params.skip_qc) {

process {
withName:'.*:RSEQC_READDISTRIBUTION' {
publishDir = [
path: { "${params.outdir}/${meta.id}/qc/rseqc" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

}

}

/////////////////////
Expand Down Expand Up @@ -224,6 +248,23 @@ if (!params.skip_save_minimap2_index) {
}
}

process {
withName: '.*:UCSC_GTFTOGENEPRED' {
publishDir = [
enabled: false
]
}
}

process {
withName: '.*:UCSC_GENEPREDTOBED' {
publishDir = [
enabled: false
]
}
}


//////////////////////
// FASTQ PROCESSING //
//////////////////////
Expand Down Expand Up @@ -394,6 +435,7 @@ process {

process {
withName:'.*:BAM_SORT_STATS_SAMTOOLS_DEDUP:SAMTOOLS_SORT' {
ext.prefix = { "${meta.id}.dedup.sorted" }
publishDir = [
path: { "${params.outdir}/${meta.id}/bam/dedup" },
mode: params.publish_dir_mode,
Expand All @@ -402,6 +444,15 @@ process {
}
}

process {
withName:'.*:BAM_SORT_STATS_SAMTOOLS_SPLIT:.*' {
ext.prefix = { "${meta.id}.sorted" }
publishDir = [
enabled: false
]
}
}

// SAMTOOLS_INDEX

process {
Expand Down Expand Up @@ -436,6 +487,7 @@ process {

process {
withName:'.*:BAM_SORT_STATS_SAMTOOLS_DEDUP:SAMTOOLS_INDEX' {
ext.prefix = { "${meta.id}.dedup.sorted" }
publishDir = [
path: { "${params.outdir}/${meta.id}/bam/dedup" },
mode: params.publish_dir_mode,
Expand All @@ -444,6 +496,14 @@ process {
}
}

process {
withName:'.*:SAMTOOLS_MERGE'{
publishDir = [
enabled: false
]
}
}

////////////////////////
// BARCODE CORRECTION //
////////////////////////
Expand Down Expand Up @@ -472,13 +532,24 @@ process {
// UMI DEDUPLICATION //
///////////////////////

process {
withName: '.*:BAMTOOLS_SPLIT' {
ext.args = {
[
"-reference"
].join(' ').trim()
}
publishDir = [
enabled: false
]
}
}

process {
withName: '.*:UMITOOLS_DEDUP' {
ext.prefix = { "${meta.id}.dedup" }
publishDir = [
path: { "${params.outdir}/${meta.id}/bam/dedup" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
enabled: false
]
}
}
Expand Down
10 changes: 10 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"bamtools/split": {
"branch": "master",
"git_sha": "3f5420aa22e00bd030a2556dfdffc9e164ec0ec5",
"installed_by": ["modules"]
},
"cat/cat": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
Expand Down Expand Up @@ -65,6 +70,11 @@
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["bam_sort_stats_samtools"]
},
"samtools/merge": {
"branch": "master",
"git_sha": "f4596fe0bdc096cf53ec4497e83defdb3a94ff62",
"installed_by": ["modules"]
},
"samtools/sort": {
"branch": "master",
"git_sha": "a0f7be95788366c1923171e358da7d049eb440f9",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bamtools/split/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions modules/nf-core/bamtools/split/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions modules/nf-core/bamtools/split/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions modules/nf-core/samtools/merge/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 61 additions & 0 deletions modules/nf-core/samtools/merge/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 602a675

Please sign in to comment.