Skip to content

Commit

Permalink
Bug fix in LDMatrix.load.
Browse files Browse the repository at this point in the history
  • Loading branch information
shz9 committed May 22, 2024
1 parent 987770b commit 9cdc274
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions magenpy/GWADataLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion magenpy/LDMatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9cdc274

Please sign in to comment.