From cb3cdc75481a68ecc6be5a99bce73b07d3bd8671 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Tue, 16 Sep 2025 17:23:06 +0000 Subject: [PATCH] chunk_size for ref panel --- selphi.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/selphi.py b/selphi.py index 99fa35d..916089d 100644 --- a/selphi.py +++ b/selphi.py @@ -279,6 +279,12 @@ def selphi( action="store_true", help="Exit if memory limit is exceeded instead of reducing cores (default: %(default)s)", ) + parser.add_argument( + "--chunk_size", + type=int, + default=10000, + help="Chunk size for sparse reference panel creation (default: %(default)s)", + ) args = parser.parse_args() cmd = " \ \n".join([f" --{k} {v}" for k, v in vars(args).items() if v is not None]) @@ -337,7 +343,7 @@ def selphi( check=True, ) SparseReferencePanel(str(add_suffix(ref_base_path, ".srp"))).from_bcf( - str(ref_source_path), threads=args.cores + str(ref_source_path), chunk_size=args.chunk_size, threads=args.cores ) else: subprocess.run( @@ -347,7 +353,7 @@ def selphi( shell=True, ) SparseReferencePanel(str(add_suffix(ref_base_path, ".srp"))).from_xsi( - str(ref_source_path), threads=args.cores + str(ref_source_path), chunk_size=args.chunk_size, threads=args.cores ) logger.info(f"\n{timestamp()}: Reference panel files saved to {ref_base_path}") if not args.target: