muon.tl.snf#
- muon.tl.snf(mdata: MuData, n_neighbors: int = 20, neighbor_keys: str | Dict[str, str | None] | None = None, key_added: str | None = None, n_iterations: int = 20, sigma: float = 0.5, eps: float = np.float64(2.220446049250313e-16), copy: bool = False) MuData | None#
Similarity network fusion (SNF)
See Wang et al., 2014 (DOI: 10.1038/nmeth.2810).
Reference implementation can be found in the SNFtool R package: cran/SNFtool
- Parameters:
mdata – MuData object
n_neighbors (int (default: 20)) – Number of neighbours to be used in the K-nearest neighbours step
neighbor_keys (Keys in .uns where per-modality neighborhood information is stored. Defaults to
"neighbors".) – If set as a dictionary, only the modalities present inneighbor_keyswill be used for multimodal nearest neighbor search. If set as a string, has to exist in all modalities.key_added (If not specified, the multimodal neighbors data is stored in
.uns["neighbors"], distances and) – connectivities are stored in.obsp["distances"]and.obsp["connectivities"], respectively. If specified, the neighbors data is added to.uns[key_added], distances are stored in.obsp[key_added + "_distances"]and connectivities in.obsp[key_added + "_connectivities"].n_iterations (int (default: 20)) – Number of iterations for the diffusion process
sigma (float (default: 0.5)) – Variance for the local model when calculating affinity matrices
eps (Small number to avoid numerical errors.) –
copy (Return a copy instead of writing to
mdata.) –