MetadataColumn
One annotation column, aligned row-for-row with the loaded table.
from plexora.api import MetadataColumnMetadataColumn(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
namestrrequiredThe column's name.
valuesnp.ndarrayrequiredThe column's values, one per row of the table it accompanies.
categoriestuple[str, ...] | Nonedefault NoneThe source's own category order, if it declared one; otherwise None.