Description
When running milo.count_nhoods on my adata object, I encountered a ValueError indicating that the length of values does not match the length of the index.
My code:
d = 30
k = 50
sc.pp.neighbors(adata, n_neighbors=k, n_pcs=d)
milo.make_nhoods(adata, prop=0.1)
milo.count_nhoods(adata, sample_col="sample")
Error Message
ValueError: Length of values (5251) does not match length of index (5185)
My number of number of nonzero nhood indices (adata.obs["nhood_ixs_refined"] != 0).sum()), which is 5251 does not match the shape of nhoods matrix (adata.obsm["nhoods"].shape) :(80422, 5185).
Varying n_neighbors and n_pcs also leads to mismatch, albeit of varying proportions.
Can you please let me know how I can troubleshoot?
Description
When running
milo.count_nhoodson myadataobject, I encountered aValueErrorindicating that the length of values does not match the length of the index.My code:
Error Message
My number of number of nonzero nhood indices (
adata.obs["nhood_ixs_refined"] != 0).sum()), which is 5251 does not match the shape of nhoods matrix (adata.obsm["nhoods"].shape) :(80422, 5185).Varying n_neighbors and n_pcs also leads to mismatch, albeit of varying proportions.
Can you please let me know how I can troubleshoot?