Hey,
I have realized that sc.pp.neighbours(adata, n_neighbors = 5) does not create 4 neighbours for all cells, some of them are empty:
adata_train.obsp[‘distances’].tolil().rows
array([list([223, 280, 316, 5791]), list([3877, 5899, 7766, 7807]),
list([165, 304, 423, 713]), ..., list([]),
list([94, 865, 7077, 7666]), list([])], dtype=object)
This ends up in an error when using sc.tl.ingest(). The same happens with other number for n_neighbors). Is this a bug or a feature? My dataset only has 92 genes. How can I avoid this?
I also wrote here: Ingest won't integrate datasets of different lengths · Issue #2085 · scverse/scanpy · GitHub
Cheers,