cellink.pp.low_abundance_filter#
- cellink.pp.low_abundance_filter(adata, *, abundance_threshold=1e-06, method='mean', inplace=True, copy=True)#
Filter out low-abundance metabolites.
This function removes metabolites (features) with abundance below a specified threshold. Users can choose whether to filter based on the mean or median abundance across samples.
- Parameters:
adata (
AnnData) – The annotated data matrix of shapen_obsxn_vars, where rows correspond to samples and columns to metabolites.abundance_threshold (
float(default:1e-06)) – The minimum abundance level to retain a metabolite. Features with abundance below this threshold will be filtered out.method (
str(default:'mean')) – Method to calculate abundance: “mean” or “median”.inplace (
bool(default:True)) – Whether to updateadataor return a copy of the new AnnData object.copy (
bool(default:True)) – Whether to modify a copied input object. Not compatible with inplace=False.
- Return type:
- Returns:
Returns the AnnData object with filtered metabolites or updates the input
adataif inplace is True.