metachat.pp.LRC_filtered
- metachat.pp.LRC_filtered(adata, LRC_name=None, LRC_cluster=None, LRC_source='marker', copy=False)[source]
Assign final LRC (long-range channel) clusters after local density clustering.
This function uses the cluster assignment results from
mc.pp.LRC_cluster()to label candidate LRC points and remove outliers. The output is stored inadata.obs['LRC_<LRC_name>_<LRC_source>_filtered'].Parameters
- adataanndata.AnnData
Annotated data matrix (
n_obs × n_var).- LRC_namestr
Name of the long-range channel (e.g.
'Blood'or'CSF').- LRC_clusterpydpc.dpc.Cluster
The clustering object returned by
mc.pp.LRC_cluster().- LRC_sourcestr, default=’marker’
Type of feature used for LRC identification (included in the key name).
- copybool, default=False
If True, return a copy of the modified AnnData. Otherwise, modify in place and return None.
Returns
- adataanndata.AnnData or None
The AnnData object with a new categorical column
'LRC_<LRC_name>_<LRC_source>_filtered'in.obs. Cluster numbers indicate LRC cluster IDs (starting from 1), while 0 indicates non-LRC or outlier points. Returns None ifcopy=False.
Notes
This function should be run after both
mc.pp.LRC_unfiltered()andmc.pp.LRC_cluster().