Plexora

MetadataColumn

One annotation column, aligned row-for-row with the loaded table.

Generated from Plexora 0.0.55View source
from plexora.api import MetadataColumn
MetadataColumn(name: str, values: np.ndarray, categories: tuple[str, ...] | None = None)

Some source columns are not part of the main cell table -- an AnnData .obs column that was never chosen as the id, a coordinate or a marker, for instance -- and are read on demand instead of being loaded up front. A MetadataColumn holds the values of one of those, in the same row order as the table it accompanies.

categories carries the source's own category order when it declares one (a pandas Categorical column, for example), because that ordering cannot be recovered from the values alone: sorted alphabetically, "Stage 10" comes before "Stage 2". None means the source did not declare an order, and the values may be sorted however is convenient.

Fields

namestrrequired

The column's name.

valuesnp.ndarrayrequired

The column's values, one per row of the table it accompanies.

categoriestuple[str, ...] | Nonedefault None

The source's own category order, if it declared one; otherwise None.