Home

adataobs

adataobs refers to the observation metadata stored in an AnnData object, a data structure widely used for single-cell genomics analysis in Python with libraries such as Scanpy and anndata. The adata.obs attribute contains per-cell annotations in a tabular format, behaving like a pandas DataFrame. Each row represents an observation (cell) and each column a metadata attribute, with the row names aligned to adata.obs_names and to the corresponding rows of the expression matrix adata.X.

Commonly stored columns include biological and technical annotations such as sample, batch, donor, cell_type, and quality

adata.obs is mutable and can be created or updated by assigning a DataFrame or new columns, with

In summary, adataobs is the per-cell metadata backbone of an AnnData object, enabling annotation, filtering, and

control
metrics
like
percent_mito,
n_counts,
and
n_genes.
The
exact
columns
depend
on
the
dataset
and
analysis
goals.
This
metadata
is
used
to
filter,
group,
or
color
cells
in
visualizations
and
to
drive
downstream
analyses
such
as
clustering,
differential
expression,
and
integration
with
other
datasets.
The
adata.var
attribute
stores
gene-level
metadata,
providing
a
parallel
structure
for
features,
while
adata.obsm
can
contain
per-cell
embeddings
produced
by
dimensionality
reduction
methods.
the
requirement
that
the
index
matches
adata.obs_names
(the
per-cell
identifiers).
Examples
include
adding
a
new
column
or
subsetting
by
a
condition,
e.g.,
adata.obs['batch']
=
batch_array
or
adata[adata.obs['cell_type']
==
'T_cell'].
integration
of
single-cell
data
alongside
gene
expression
and
dimensionality
reduction
information.