Demo scanpy-native implementation of random-walk graph laplacian smoothing for single-cell transcriptomics data.
doc/RW_graph_laplacian_smoothing.pdf
from graph_laplacian import RWGLSmooth
rw_smoother = RWGLSmooth(
adata,
alpha=0.05, # diffusion coefficient
)
rw_smoother.step(
feature_matrix=adata.X,
steps=10,
key_added='X_rw_smooth_10_steps', # added to adata.layers
in_place=True,
verbose=True,
)