Skip to content

Commit

Permalink
Merge pull request #837 from Clinical-Genomics/fix/umi_intervalbed
Browse files Browse the repository at this point in the history
refactor: umi intervalbed
  • Loading branch information
ashwini06 authored Dec 17, 2021
2 parents 86e1b36 + 1b81a73 commit 9f68b5e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions BALSAMIC/constants/workflow_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
"init_tumorLOD": 0.5,
"error_rate": 5,
"prunefactor": 3,
"padding": 100,
"disable_detect": "sv",
},
}
3 changes: 3 additions & 0 deletions BALSAMIC/snakemake_rules/umi/sentieon_varcall_tnscope.rule
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rule sentieon_tnscope_umi:
init_tumor_lod = params.tnscope_umi.init_tumorLOD,
error_rate = params.tnscope_umi.error_rate,
prune_factor = params.tnscope_umi.prunefactor,
padding = params.tnscope_umi.padding,
tumor = "TUMOR",
pcr_model = params.common.pcr_model
threads:
Expand All @@ -44,6 +45,8 @@ export SENTIEON_LICENSE={params.sentieon_lic};
-t {threads} \
-r {input.ref_fa} \
-i {input.bam} \
--interval {input.bed} \
--interval_padding {params.padding} \
--algo {params.algo} \
--tumor_sample {params.tumor} \
--dbsnp {input.dbsnp} \
Expand Down
3 changes: 3 additions & 0 deletions BALSAMIC/snakemake_rules/umi/sentieon_varcall_tnscope_tn.rule
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ rule sentieon_tnscope_umi_tn:
error_rate = params.tnscope_umi.error_rate,
prune_factor = params.tnscope_umi.prunefactor,
pcr_model = params.common.pcr_model,
padding = params.tnscope_umi.padding,
tumor = "TUMOR",
normal = "NORMAL"
threads:
Expand All @@ -47,6 +48,8 @@ export SENTIEON_LICENSE={params.sentieon_lic};
-r {input.ref_fa} \
-i {input.bamT} \
-i {input.bamN} \
--interval {input.bed} \
--interval_padding {params.padding} \
--algo {params.algo} \
--tumor_sample {params.tumor} \
--normal_sample {params.normal} \
Expand Down
2 changes: 2 additions & 0 deletions BALSAMIC/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,13 +617,15 @@ class UMIParamsTNscope(BaseModel):
init_tumorLOD: float (required); minimum tumor log odds in the initial pass calling variants
error_rate: int (required); allow error-rate to consider in calling
prunefactor: int (required); pruning factor in the kmer graph
padding: int(required); amount to pad bed interval regions
"""

algo: str
init_tumorLOD: float
min_tumorLOD: int
error_rate: int
prunefactor: int
padding: int
disable_detect: str


Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[X.X.X]
-------

Added:
^^^^^^

* Call umi variants using TNscope in bed defined regions #821


[8.2.4]
-------

Expand Down
2 changes: 2 additions & 0 deletions tests/utils/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def test_umiparams_tnscope():
"min_tumorLOD": 6,
"error_rate": 5,
"prunefactor": 3,
"padding": 30,
"disable_detect": "abc",
}

Expand All @@ -362,6 +363,7 @@ def test_umiparams_tnscope():
assert test_tnscope_params_built.error_rate == 5
assert test_tnscope_params_built.prunefactor == 3
assert test_tnscope_params_built.disable_detect == "abc"
assert test_tnscope_params_built.padding == 30


def test_params_vardict():
Expand Down

0 comments on commit 9f68b5e

Please sign in to comment.