Skip to content

Commit

Permalink
toy adata n_obs = 30, use sc.pp.neighbors(n_pcs=n_obs - 1) to avoid t…
Browse files Browse the repository at this point in the history
…he reported errors
  • Loading branch information
KangchengHou committed Nov 24, 2023
1 parent 83d6264 commit f91fe48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_method_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_downstream_group_analysis():

adata, df_cov, df_gs, dic_res_ref = load_toy_data()
df_full_score = dic_res_ref["REF_COV_FULL"]
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=40)
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=min(40, adata.n_obs - 1))

dic_res = scdrs.method.downstream_group_analysis(
adata, df_full_score, ["cell_type"]
Expand Down Expand Up @@ -118,7 +118,7 @@ def test_gearys_c():
"""

adata, df_cov, df_gs, dic_res_ref = load_toy_data()
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=40)
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=min(40, adata.n_obs - 1))

v_x = np.arange(adata.shape[0])
gc = scdrs.method.gearys_c(adata, v_x)
Expand Down

0 comments on commit f91fe48

Please sign in to comment.