You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title={Recovering gene interactions from single-cell data using data diffusion},
26
+
author={Van Dijk, David and Sharma, Roshan and Nainys, Juozas and Yim, Kristina and Kathail, Pooja and Carr, Ambrose J and Burdziak, Cassandra and Moon, Kevin R and Chaffer, Christine L and Pattabiraman, Diwakar and others},
title={Mapping single-cell data to reference atlases by transfer learning},
38
+
author={Lotfollahi, Mohammad and Naghipourfar, Mohsen and Luecken, Malte D and Khajavi, Matin and B{\"u}ttner, Maren and Wagenstetter, Marco and Avsec, {\v{Z}}iga and Gayoso, Adam and Yosef, Nir and Interlandi, Marta and others},
title={An integrated transcriptomic cell atlas of human neural organoids},
50
+
author={He, Zhisong and Dony, Leander and Fleck, Jonas Simon and Sza{\l}ata, Artur and Li, Katelyn X and Sli{\v{s}}kovi{\'c}, Irena and Lin, Hsiu-Chuan and Santel, Malgorzata and Atamian, Alexander and Quadrato, Giorgia and others},
title={Benchmarking spatial and single-cell transcriptomics integration methods for transcript distribution prediction and cell type deconvolution},
62
+
author={Li, Bin and Zhang, Wen and Guo, Chuang and Xu, Hao and Li, Longfei and Fang, Minghao and Hu, Yinlei and Zhang, Xinye and Yao, Xinfeng and Tang, Meifang and others},
Copy file name to clipboardExpand all lines: src/cellmapper/cellmapper.py
+44-29Lines changed: 44 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -186,9 +186,7 @@ def compute_neighbors(
186
186
use_rep
187
187
Data representation based on which to find nearest neighbors. If None, a joint PCA will be computed.
188
188
method
189
-
Method to use for computing neighbors. "sklearn" and "pynndescent" run on CPU, "rapids" and "faiss" run on GPU.
190
-
Note that all but "pynndescent" perform exact neighbor search. With GPU acceleration, "faiss" is usually
191
-
fastest and more memory efficient than "rapids".
189
+
Method to use for computing neighbors. "sklearn" and "pynndescent" run on CPU, "rapids" and "faiss" run on GPU. Note that all but "pynndescent" perform exact neighbor search. With GPU acceleration, "faiss" is usually fastest and more memory efficient than "rapids".
192
190
metric
193
191
Distance metric to use for nearest neighbors.
194
192
only_yx
@@ -202,13 +200,15 @@ def compute_neighbors(
202
200
203
201
Returns
204
202
-------
205
-
Nothing, but updates the following attributes:
206
-
knn
207
-
Nearest neighbors object.
208
-
n_neighbors
209
-
Number of nearest neighbors.
210
-
only_yx
211
-
Whether only yx neighbors were computed.
203
+
None
204
+
205
+
Notes
206
+
-----
207
+
Updates the following attributes:
208
+
209
+
- ``knn``: Nearest neighbors object.
210
+
- ``n_neighbors``: Number of nearest neighbors.
211
+
- ``only_yx``: Whether only yx neighbors were computed.
Method to use for computing the mapping matrix. Options include:
240
-
- "jaccard": Jaccard similarity. Inspired by GLUE: Cao et al., Nature Biotechnology, 2022: https://www.nature.com/articles/s41587-022-01284-4
241
-
- "gaussian": Gaussian kernel with adaptive bandwith. Loosely inspired by MAGIC: Van Dijk et al., Cell, 2018: https://www.sciencedirect.com/science/article/pii/S0092867418307244?via%3Dihub
242
-
- "scarches": scArches kernel. Inspired by scArches: Lotfollahi et al., Nature Biotechnology, 2021: https://www.nature.com/articles/s41587-021-01001-7
240
+
241
+
- "jaccard": Jaccard similarity. Inspired by GLUE :cite:`cao2022multi`
242
+
- "gaussian": Gaussian kernel with adaptive bandwidth. Loosely inspired by MAGIC :cite:`van2018recovering`
243
+
- "scarches": scArches kernel. Inspired by scArches :cite:`lotfollahi2022mapping`
243
244
- "inverse_distance": Inverse distance kernel.
244
245
- "random": Random kernel, useful for testing.
245
-
- "hnoca": HNOCA kernel. Inspired by HNOCA-tools: He et al., Nature 2024: https://www.nature.com/articles/s41586-024-08172-8
246
+
- "hnoca": HNOCA kernel. Inspired by HNOCA-tools :cite:`he2024integrated`
246
247
247
248
Returns
248
249
-------
249
-
Nothing, but updates the following attributes:
250
-
mapping_matrix
251
-
Mapping matrix for label transfer.
250
+
None
251
+
252
+
Notes
253
+
-----
254
+
Updates the following attributes:
255
+
256
+
- ``mapping_matrix``: Mapping matrix for label transfer.
252
257
"""
253
258
ifself.knnisNoneorself.n_neighborsisNone:
254
259
raiseValueError("Neighbors have not been computed. Call compute_neighbors() first.")
0 commit comments