From 6e3c5d9bd3381ae70608bcc724b7aacdf5959343 Mon Sep 17 00:00:00 2001 From: Omer Weissbrod Date: Thu, 9 May 2024 23:01:19 +0300 Subject: [PATCH] fix hadnling of non-human organisms --- ldsc_polyfun/sumstats.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ldsc_polyfun/sumstats.py b/ldsc_polyfun/sumstats.py index 49ec4a3..0a15206 100644 --- a/ldsc_polyfun/sumstats.py +++ b/ldsc_polyfun/sumstats.py @@ -248,6 +248,7 @@ def _merge_and_log(ld, sumstats, noun, log): def _read_ld_sumstats(args, log, fh, alleles=True, dropna=True): + global _N_CHR _N_CHR = args.num_chr sumstats = _read_sumstats(args, log, fh, alleles=alleles, dropna=dropna) ref_ld = _read_ref_ld(args, log) @@ -283,6 +284,7 @@ def _read_ld_sumstats(args, log, fh, alleles=True, dropna=True): def estimate_h2(args, log): '''Estimate h2 and partitioned h2.''' args = copy.deepcopy(args) + global _N_CHR _N_CHR = args.num_chr if args.samp_prev is not None and args.pop_prev is not None: args.samp_prev, args.pop_prev = list(map(