metachat.pp.LRC_unfiltered
- metachat.pp.LRC_unfiltered(adata, LRC_name=None, LRC_source='marker', obs_name=None, quantile=90.0, copy=False)[source]
Identify unfiltered candidate LRC (long-range channel) spots based on the quantile of a marker feature.
This function selects candidate points whose marker feature (e.g., gene expression or score) exceeds a specified quantile threshold. The result is stored in
adata.obs['LRC_<LRC_name>_<LRC_source>_unfiltered']as categorical values (0 or 1).Parameters
- adataanndata.AnnData
Annotated data matrix with shape
n_obs × n_var.- LRC_namestr
The name of the long-range channel (e.g.,
'Blood'or'CSF').- LRC_sourcestr, default=’marker’
The type of feature used for selection (e.g.,
'marker','score'). This will be included in the generated column name.- obs_namestr
The key in
adata.obscontaining the numeric feature used for quantile selection.- quantilefloat, default=90.0
The percentile threshold (0–100). Example: 90.0 means select all points above the 90th percentile.
- copybool, default=False
If True, returns a copy of the modified AnnData object. Otherwise modifies the input object in place and returns None.
Returns
- adataanndata.AnnData or None
If
copy=True, returns a copy of the AnnData with a new column'LRC_<LRC_name>_<LRC_source>_unfiltered'in.obs. Otherwise, modifies in place and returns None.
Notes
The resulting column is stored as a pandas
Categoricalwith values {0, 1}.