Home

adataobsm

adataobsm refers to the obsm attribute in an AnnData object, a core data container used in the Scanpy ecosystem for single-cell transcriptomics. The obsm attribute stores observation-level multi-dimensional arrays that encode per-cell coordinates or embeddings produced by dimensionality reduction or embedding methods.

Data model: It behaves like a dictionary mapping strings to 2D arrays with shape (n_obs, k). Each

Common usage: Typical keys include X_pca, X_umap, X_tsne, and X_diffmap. The corresponding arrays contain the coordinates

Storage and interoperability: obsm arrays are stored when saving an AnnData to disk (for example in .h5ad

Notes: many analysis steps populate obsm automatically (for example, umap, tsne, and pca computations in Scanpy),

value
represents
coordinates
in
a
reduced
space
for
the
same
set
of
observations.
All
arrays
in
obsm
share
the
same
number
of
rows
(n_obs).
The
keys
typically
identify
the
embedding
or
coordinates,
such
as
X_pca,
X_umap,
X_tsne,
or
X_diffmap,
as
well
as
any
user-defined
embeddings.
for
each
observation
(cell)
in
the
specified
embedding
space.
Access
is
via
adata.obsm['X_umap']
to
obtain
the
UMAP
coordinates
(n_obs
by
2).
These
coordinates
are
commonly
used
for
visualization,
clustering,
or
downstream
analyses
that
rely
on
a
consistent
cell
representation
across
methods.
format)
and
are
preserved
across
sessions.
They
are
typically
dense
NumPy
arrays
used
for
plotting,
neighborhood
graph
construction,
and
other
analyses.
obsm
is
distinct
from
obsp,
which
holds
pairwise
relationships
such
as
distances
or
adjacency
graphs
between
observations.
but
users
can
also
add
or
modify
entries
manually.
The
obsm
container
is
part
of
the
broader
AnnData
API,
alongside
obs
(per-observation
annotations),
var
(per-variable
annotations),
and
uns
(unstructured
annotations).