Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BAM_REGION optional #84

Merged
merged 5 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Initial release of nf-core/phaseimpute, created with the [nf-core](https://nf-co
- [#56](https://github.com/nf-core/phaseimpute/pull/56) - Move to nf-test to check the output files names generated. Fix validation and concatenation by chromosomes missing. Add dedicated GLIMPSE1 subworkflow. Fix posfile generation to be done once for glimpse and stitch.
- [#68](https://github.com/nf-core/phaseimpute/pull/68) - QUILT can handle external params chunks and hap-legend files.
- [#78](https://github.com/nf-core/phaseimpute/pull/78) - Separate validate step from panel preparation.
- [#84](https://github.com/nf-core/phaseimpute/pull/84) - Change depth computation to use SAMTOOLS_DEPTH and make separation by chromosome only if regions are specified.
- [#85](https://github.com/nf-core/phaseimpute/pull/85) - Use external params in individual tests for tools.

### `Fixed`
Expand Down
35 changes: 26 additions & 9 deletions conf/steps/simulation.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,42 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_COVERAGE' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_DEPTH' {
publishDir = [enabled: false]
ext.prefix = { "${meta.id}_C${meta.chr ?: "all"}.stats" }
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_VIEW' {
ext.prefix = { params.input_region ?
"${meta.id}_D${meta.depth}_C${meta.chr ?: "all"}" :
"${meta.id}"
}
publishDir = [
path: { "${params.outdir}/simulation/stats/" },
path: { "${params.outdir}/simulation/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
saveAs: { params.input_region ? null : it }
]
ext.prefix = { "${meta.id}_R${meta.region.replace(':','_')}.stats" }
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_VIEW' {
ext.prefix = { "${meta.id}_D${meta.depth}_R${meta.region.replace(':','_')}" }
publishDir = [ enabled: false ]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_INDEX_1' {
publishDir = [ enabled: false ]
publishDir = [
path: { "${params.outdir}/simulation/" },
mode: params.publish_dir_mode,
saveAs: { params.input_region ? null : it }
]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_MERGE' {
ext.prefix = { "${meta.id}" }
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_DOWNSAMPLE:SAMTOOLS_INDEX_2' {
ext.args = ""
}

// Coverage process
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_TRT' {
ext.prefix = { "${meta.id}_truth" }
publishDir = [ enabled: false ]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:SAMTOOLS_COVERAGE_SIM' {
ext.prefix = { "${meta.id}" }
publishDir = [ enabled: false ]
}
}
4 changes: 4 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ workflow NFCORE_PHASEIMPUTE {
ch_input_validate = ch_input
}

if (params.steps.split(',').contains("all")) {
ch_input_truth = ch_input
}

//
// WORKFLOW: Run pipeline
//
Expand Down
8 changes: 7 additions & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,16 @@
},
"samtools/coverage": {
"branch": "master",
"git_sha": "38afbe42f7db7f19c7a89607c0a71c68f3be3131",
"git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519",
"installed_by": ["modules"],
"patch": "modules/nf-core/samtools/coverage/samtools-coverage.diff"
},
"samtools/depth": {
"branch": "master",
"git_sha": "04fbbc7c43cebc0b95d5b126f6d9fe4effa33519",
"installed_by": ["modules"],
"patch": "modules/nf-core/samtools/depth/samtools-depth.diff"
},
"samtools/faidx": {
"branch": "master",
"git_sha": "f153f1f10e1083c49935565844cccb7453021682",
Expand Down
4 changes: 2 additions & 2 deletions modules/nf-core/samtools/coverage/environment.yml

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

12 changes: 5 additions & 7 deletions modules/nf-core/samtools/coverage/main.nf

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

31 changes: 7 additions & 24 deletions modules/nf-core/samtools/coverage/samtools-coverage.diff

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

18 changes: 9 additions & 9 deletions modules/nf-core/samtools/coverage/tests/main.nf.test.snap

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/depth/environment.yml

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

39 changes: 39 additions & 0 deletions modules/nf-core/samtools/depth/main.nf

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

54 changes: 54 additions & 0 deletions modules/nf-core/samtools/depth/meta.yml

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

14 changes: 14 additions & 0 deletions modules/nf-core/samtools/depth/samtools-depth.diff

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

Loading