From 7dc16d29cfcf5294903719ac2c1abd197c5ddc3e Mon Sep 17 00:00:00 2001 From: "doron.haviv12@gmail.com" Date: Wed, 16 Oct 2024 12:28:13 -0400 Subject: [PATCH 1/3] fix test req --- requirements.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 06a2147..9e63058 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ scanpy >= 1.10.0 numpy >= 1.23.1 anndata >= 0.10.6 -flax >= "0.8.2" -optax >= "0.2.1" -chex >= "0.1.81" -tensorflow_probability >= "0.22.0" -clu >= "0.0.11" -tqdm >= "4.66.1" \ No newline at end of file +flax >= 0.8.2 +optax >= 0.2.1 +chex >= 0.1.81 +tensorflow_probability >= 0.22.0 +clu >= 0.0.11 +tqdm >= 4.66.1 \ No newline at end of file From 498d3be81b7842d5b1355b40d966e8984b33709c Mon Sep 17 00:00:00 2001 From: "doron.haviv12@gmail.com" Date: Wed, 16 Oct 2024 12:31:23 -0400 Subject: [PATCH 2/3] fix latent --- scenvi/ENVI.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scenvi/ENVI.py b/scenvi/ENVI.py index 268cf17..6c01d74 100644 --- a/scenvi/ENVI.py +++ b/scenvi/ENVI.py @@ -626,12 +626,12 @@ def latent_rep(self): :return: nothing, adds 'envi_latent' self.spatial_data.obsm and self.spatial_data.obsm """ - self.spatial_data.obsm["envi_latent"] = self.encode( + self.spatial_data.obsm["envi_latent"] = np.asarray(self.encode( self.spatial_data.X, mode="spatial" - ) - self.sc_data.obsm["envi_latent"] = self.encode( + )) + self.sc_data.obsm["envi_latent"] = np.asarray(self.encode( self.sc_data[:, self.spatial_data.var_names].X, mode="sc" - ) + )) def impute_genes(self): """ From 0c34e1f81abb74e1ef6bf9f5cf495ada9cfaa8ab Mon Sep 17 00:00:00 2001 From: "doron.haviv12@gmail.com" Date: Wed, 16 Oct 2024 12:34:24 -0400 Subject: [PATCH 3/3] fix covet infer --- scenvi/ENVI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scenvi/ENVI.py b/scenvi/ENVI.py index 6c01d74..c4064ef 100644 --- a/scenvi/ENVI.py +++ b/scenvi/ENVI.py @@ -657,9 +657,9 @@ def infer_niche_covet(self): :return: nothing, adds 'COVET_SQRT' and 'COVET' to self.sc_data.obsm """ - self.sc_data.obsm["COVET_SQRT"] = self.decode_cov( + self.sc_data.obsm["COVET_SQRT"] = np.asarray(self.decode_cov( self.sc_data.obsm["envi_latent"] - ) + )) self.sc_data.obsm["COVET"] = np.matmul( self.sc_data.obsm["COVET_SQRT"], self.sc_data.obsm["COVET_SQRT"] )