Skip to content

Commit 99a9b69

Browse files
committed
Added parsing the model_specific_settings.conf file
1 parent 4e35f7a commit 99a9b69

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ Performance comparison between “ClairS v0.4.0 with the SS model”, “ClairS
8181
------
8282

8383
## Latest Updates
84-
*v0.4.2 (Jue 29, 2025)* : Added `--snv_min_qual` and `--indel_min_qual` options to independently set the minimum QUAL threshold for SNVs and Indels to be marked as 'PASS', while deprecating the legacy `--qual` option.
84+
*v0.4.3 (Jul 9, 2025)* : Added parsing the `model_specific_settings.conf` file in the folder of a model and set parameters accordingly. Initially in this version, `snv_min_qual=` and `indel_min_qual=` are supported in the configuration file.
85+
86+
*v0.4.2 (Jun 29, 2025)* : Added `--snv_min_qual` and `--indel_min_qual` options to independently set the minimum QUAL threshold for SNVs and Indels to be marked as 'PASS', while deprecating the legacy `--qual` option.
8587

8688
*v0.4.1 (Nov 29)* : Added ssrs model for PacBio Revio (`hifi_revio_ssrs`) and illumina (`ilmn_ssrs`) platforms.
8789

run_clairs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,18 @@ def check_args(args):
667667
elif args.indel_min_qual is None:
668668
args.qual = args.indel_min_qual = param.min_thred_qual[args.platform] if args.platform in param.min_thred_qual else param.min_thred_qual['ont']
669669

670+
model_path = os.path.dirname(args.pileup_model_path)
671+
config_file = os.path.join(model_path, 'model_specific_settings.conf')
672+
if os.path.exists(config_file):
673+
with open(config_file, 'r') as config_fp:
674+
for line in config_fp:
675+
if line.startswith('snv_min_qual'):
676+
args.snv_min_qual = int(line.split('=')[1].strip())
677+
print("[INFO] Set SNV minimum quality `--snv_min_qual` to {} according to the parameter config file".format(args.snv_min_qual))
678+
elif line.startswith('indel_min_qual'):
679+
args.indel_min_qual = int(line.split('=')[1].strip())
680+
print("[INFO] Set Indel minimum quality `--indel_min_qual` to {} according to the parameter config file".format(args.indel_min_qual))
681+
670682
if args.skip_steps is not None:
671683
check_skip_steps_legal(args)
672684
if args.enable_realignment and args.platform != 'ilmn':

shared/param.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# parameters
22
caller_name = "clairs"
3-
version = "0.4.2"
3+
version = "0.4.3"
44

55
from itertools import accumulate
66

0 commit comments

Comments
 (0)