From 3a3875829e68209b1bff12db04b14c79dd1a64ce Mon Sep 17 00:00:00 2001 From: LindoNkambule Date: Mon, 10 Jun 2024 11:09:20 -0400 Subject: [PATCH] Use number of samples to estimate disk space for merging imputed files --- gwaspy/imputation/impute.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gwaspy/imputation/impute.py b/gwaspy/imputation/impute.py index 7e20a11..236e7a4 100644 --- a/gwaspy/imputation/impute.py +++ b/gwaspy/imputation/impute.py @@ -12,6 +12,8 @@ def run_impute(backend: Union[hb.ServiceBackend, hb.LocalBackend] = None, vcf_ref: str = None, software: str = 'impute5', output_filename: str = None, + n_samples: int = None, + n_panel_samples: int = 4091, out_dir: str = None ): @@ -35,6 +37,8 @@ def run_impute(backend: Union[hb.ServiceBackend, hb.LocalBackend] = None, input_path=input_file, reference_path=ref_path, output_filename=output_filename, + n_samples=n_samples, + n_panel_samples=n_panel_samples, output_path=out_dir ) elif software == 'glimpse2': @@ -54,6 +58,8 @@ def main(): parser.add_argument('--vcf-ref', type=str, default='hgdp1kgp') parser.add_argument('--local', action='store_true') parser.add_argument('--billing-project', required=True) + parser.add_argument('--n-samples', type=int, required=True) + parser.add_argument('--n-ref-samples', type=int, default=4091) parser.add_argument('--software', type=str, default='impute5', choices=['beagle5', 'glimpse2', 'impute5']) parser.add_argument('--output-filename', type=str, required=True) parser.add_argument('--out-dir', type=str, required=True) @@ -71,6 +77,8 @@ def main(): vcf_ref=args.vcf_ref, software=args.software, output_filename=args.output_filename, + n_samples=args.n_samples, + n_panel_samples=args.n_ref_samples, out_dir=args.out_dir) backend.close()