Skip to content

Commit

Permalink
Update test_tl.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ajitjohnson committed Apr 26, 2024
1 parent 6c2ead1 commit 0e8b930
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions scimap/tests/test_tl.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,20 @@ def test_spatial_count (adata):
assert np.allclose(loaded_data, adata.uns['spatial_count'].to_numpy()), "The arrays do not match."


#spatial_cluster
def test_spatial_cluster (adata):
from scimap.tools.spatial_count import spatial_count
adata = spatial_count (adata, phenotype='phenotype',method='knn',radius=5)
# test spatial cluster
from scimap.tools.spatial_cluster import spatial_cluster
adata = spatial_cluster(adata, df_name='spatial_count')
# load expected data
loaded_data = load_pickle(os.getcwd() + '/scimap/tests/expected_test_values/test_spatial_cluster.pkl')
assert loaded_data == list(adata.obs['spatial_kmeans']), "The lists do not match."


# =============================================================================
# #spatial_cluster
# def test_spatial_cluster (adata):
# from scimap.tools.spatial_count import spatial_count
# adata = spatial_count (adata, phenotype='phenotype',method='knn',radius=5)
# # test spatial cluster
# from scimap.tools.spatial_cluster import spatial_cluster
# adata = spatial_cluster(adata, df_name='spatial_count')
# # load expected data
# loaded_data = load_pickle(os.getcwd() + '/scimap/tests/expected_test_values/test_spatial_cluster.pkl')
# assert loaded_data == list(adata.obs['spatial_kmeans']), "The lists do not match."
#
#
# =============================================================================
#spatial_lda
def test_spatial_lda (adata):
from scimap.tools.spatial_lda import spatial_lda
Expand Down

0 comments on commit 0e8b930

Please sign in to comment.