From 9cdc2747c78692f71cb49cec33501e5832ffe0c5 Mon Sep 17 00:00:00 2001 From: Shadi Date: Wed, 22 May 2024 15:58:21 -0400 Subject: [PATCH] Bug fix in `LDMatrix.load`. --- magenpy/GWADataLoader.py | 8 ++++---- magenpy/LDMatrix.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/magenpy/GWADataLoader.py b/magenpy/GWADataLoader.py index 3e3d894..d27b1a1 100644 --- a/magenpy/GWADataLoader.py +++ b/magenpy/GWADataLoader.py @@ -539,13 +539,13 @@ def read_summary_statistics(self, return if self.verbose and len(sumstats_files) < 2: - print("> Reading summary statistics file...") + print("> Reading summary statistics...") self.sumstats_table = {} for f in tqdm(sumstats_files, total=len(sumstats_files), - desc="Reading summary statistics files", + desc="Reading summary statistics", disable=not self.verbose or len(sumstats_files) < 2): ss_tab = SumstatsTable.from_file(f, sumstats_format=sumstats_format, parser=parser, **parse_kwargs) @@ -585,13 +585,13 @@ def read_ld(self, ld_store_paths): return if self.verbose and len(ld_store_files) < 2: - print("> Reading LD matrix...") + print("> Reading LD metadata...") self.ld = {} for f in tqdm(ld_store_files, total=len(ld_store_files), - desc="Reading LD matrices", + desc="Reading LD metadata", disable=not self.verbose or len(ld_store_files) < 2): z = LDMatrix.from_path(f) self.ld[z.chromosome] = z diff --git a/magenpy/LDMatrix.py b/magenpy/LDMatrix.py index bf4d821..0639fe3 100644 --- a/magenpy/LDMatrix.py +++ b/magenpy/LDMatrix.py @@ -1395,7 +1395,8 @@ def load(self, self.release() self._mat = self.load_data(return_symmetric=return_symmetric, - dtype=dtype) + dtype=dtype, + return_as_csr=True) # Update the flags: self.in_memory = True