Skip to content

Commit

Permalink
Merge pull request #27 from uclahs-cds/yashpatel-parameterize-deletio…
Browse files Browse the repository at this point in the history
…n-by-state

Deletion state parameterization
  • Loading branch information
yashpatel6 authored Aug 9, 2023
2 parents 4964bc1 + ba96324 commit 22890fd
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

---

## [1.0.0-rc.3] - 2023-08-09
### [Added]
- Customization options for which input BAMs to delete with metapipeline

---

## [1.0.0-rc.2] - 2023-08-02
### [Added]
- Custom resource allocation updates through configuration parameters
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ For normal-only or tumour-only samples, exclude the fields for the other state.
| `work_dir` | optional | path | Path of working directory for Nextflow. When included in the sample config file, Nextflow intermediate files and logs will be saved to this directory. With ucla_cds, the default is `/scratch` and should only be changed for testing/development. Changing this directory to `/hot` or `/tmp` can lead to high server latency and potential disk space limitations, respectively. |
| `docker_container_registry` | optional | string | Registry containing tool Docker images. Default: `ghcr.io/uclahs-cds` |
| `metapipeline_delete_input_bams` | optional | boolean | Set to true to delete the input BAM files once the initial processing step is complete. **WARNING**: This option should NOT be used for individual runs of call-gSNP; it's intended for metapipeline-DNA to optimize disk space usage by removing files that are no longer needed from the `workDir`. |
| `metapipeline_final_output_dir` | optional | string | Absolute path for the final output directory of metapipeline-DNA that's expected to contain the output BAM from align-DNA. **WARNING**: This option should not be used for individual runs of call-gSNP; it's intended for metapipeline-DNA to optimize disk space usage. |
| `metapipeline_final_output_dir` | optional | string | Absolute path for the final output directory of metapipeline-DNA that's expected to contain the output BAM from align-DNA. **WARNING**: This option should not be used for individual runs of recalibrate-BAM; it's intended for metapipeline-DNA to optimize disk space usage. |
| `metapipeline_states_to_delete` | optional | list | List of states for which to delete input BAMs. **WARNING**: This option should not be used for individual runs of recalibrate-BAM; it's intended for metapipeline-DNA to optimize disk space usage. |
| `base_resource_update` | optional | namespace | Namespace of parameters to update base resource allocations in the pipeline. Usage and structure are detailed in `template.config` and below. |

#### Base resource allocation updaters
Expand Down
1 change: 1 addition & 0 deletions config/default.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ params {
cache_intermediate_pipeline_steps = false

metapipeline_delete_input_bams = false
metapipeline_states_to_delete = ['normal', 'tumor']

docker_container_registry = "ghcr.io/uclahs-cds"

Expand Down
10 changes: 10 additions & 0 deletions config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ metapipeline_final_output_dir:
type: 'String'
required: false
help: 'Directory containing final outputs to check before input deletion'
metapipeline_states_to_delete:
type: 'List'
required: true
help: 'List of states for which to delete input BAMs'
default:
- 'normal'
- 'tumor'
choice:
- 'normal'
- 'tumor'
base_resource_update:
type: 'ResourceUpdateNamespace'
required: false
Expand Down
1 change: 1 addition & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ workflow {
* Input file deletion
*/
input_ch_samples_with_index
.filter{ params.metapipeline_states_to_delete.contains(it.sample_type) }
.map{ sample -> sample.path }
.flatten()
.unique()
Expand Down
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ manifest {
name = 'recalibrate-BAM'
author = 'Yash Patel'
description = 'Nextflow pipeline to perform Indel Realignment and Base Quality Score Recalibration'
version = '1.0.0-rc.2'
version = '1.0.0-rc.3'
}

0 comments on commit 22890fd

Please sign in to comment.