Skip to content

Commit

Permalink
important fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBoyeau committed Sep 8, 2024
1 parent 9e78249 commit 0c177c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/test_vivs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def test_jax():
crttool.train_all()
crttool.get_importance()
crttool.get_importance(n_mc_per_pass=10)
crttool.get_hier_importance(n_clusters_list=[5, 10])
crttool.get_cell_scores(gene_ids=[1, 2, 3])
crttool.get_latent()

Expand All @@ -53,6 +54,7 @@ def test_jax():
crttool.train_all()
crttool.get_importance()
crttool.get_importance(n_mc_per_pass=10)
crttool.get_hier_importance(n_clusters_list=[5, 10])
crttool.get_cell_scores(gene_ids=[1, 2, 3])
crttool.get_latent()

Expand Down
2 changes: 1 addition & 1 deletion vivs/_dl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __len__(self):
def __getitem__(self, idx):
xmat = self.x_mat[idx]
if sp.issparse(xmat):
xmat = xmat.toarray()
xmat = xmat.toarray().squeeze()
return {
REGISTRY_KEYS.X_KEY: xmat,
REGISTRY_KEYS.BATCH_KEY: self.batch_indices[idx],
Expand Down
2 changes: 1 addition & 1 deletion vivs/_vivs.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def plot_hier_importance(
)
if not are_indices_contiguous:
raise ValueError("Gene indices are not contiguous")
is_cluster_detected = (res_cluster["padj"] < 0.1).all()
is_cluster_detected = (res_cluster["padj"] < significance_threshold).all()
if is_cluster_detected:
plot_df.append(
{
Expand Down

0 comments on commit 0c177c1

Please sign in to comment.