Skip to content

The .obs manager

The .obs manager lists every cell annotation column in the active dataset with its type, counts and a preview, and lets you delete, export, merge, rename, duplicate or convert columns. Use it to tidy a dataset before export, to find the column a tool wrote, or to fix a column whose type is wrong (cluster ids stored as numbers, say).

Where to find it

Cells panel header → ⚙ .obs

The table

Each row is one .obs column. The header shows the column and cell counts.

Column What it shows
Column The name, with badges: colour-by (the column cells are currently colored by), subset <name> (the membership column of a saved cell subset), a tool prefix (UCell_, LR_, SCN_, contour_, territory_, cnv, leiden, louvain, dpt_), and colours (a palette is stored for it in uns['<column>_colors'])
Type Kind (categorical, boolean, integer, float, string, other) followed by the pandas dtype
Unique Number of distinct values
Missing Number of cells with no value, highlighted when above zero
Preview The three most frequent values for labels, or min · median · max over the finite values for numbers
  • Click a header to sort by it; click again to reverse.
  • Type in Filter by name… to narrow the list, and click the kind chips (each shows a count) to show only those kinds.
  • Tick the box at the left of a row to select it. Shift-click ticks a range; the header box ticks every row shown.
  • Click a row (not its box) to focus it for Rename, Duplicate as and Convert to.

Delete columns

Tick one or more columns and click Delete N. The confirmation lists the columns and warns about anything else that goes with them:

  • Stored color palettes for those columns.
  • A saved cell subset whose membership column is among them. The subset is removed from the subset list.
  • The column you are coloring by.

The deletion is one step in the analysis record.

Export columns

Tick columns, choose TSV or CSV in the format select, and click Export. The browser downloads obs_columns.tsv (or .csv) with cell ids in the first column and the ticked columns in .obs order. To export every column, use File → Export… → Cell metadata (.tsv) instead (Save and export).

Merge columns

Merge folds several columns into one. The typical case is an annotation split across columns, such as cell_type__A and cell_type__B after a combine, or labels written in pieces to separate columns.

  1. Tick two or more columns and click Merge N.
  2. Edit the name under Merge into. The default is the ticked columns' common prefix cut back to a word boundary (cell_type__A + cell_type__B → cell_type; leiden_1 + leiden_2 → leiden), or merged when there is none; a suffix is added if the name is taken.
  3. Untick keep the source columns if you want them removed.
  4. Click Merge.

For each cell, the first ticked column in .obs order that has a value wins. Missing values, empty strings and unassigned count as no value, so gaps in one column fill from the next. The panel shows the order it will use. After the merge, the status line says how many cells had a value in more than one column; for those, a later column's value was ignored.

Sources Result
Labels (categorical or string) Categorical
Numbers Float; integer when every source is an integer column and no cell is left empty
Booleans, or labels mixed with numbers Refused
A saved subset's membership column Refused

Rename, duplicate, convert

Click a row, then:

Rename
Gives the column a new name. Its stored palette moves with it, and results recorded under the column name for saved subsets (Leiden, pseudotime) follow the rename. A name already in use is refused.
Duplicate as
Copies the column under a new name, by default <column>_copy.
Convert to

Changes the column's type. Only conversions that make sense for the column are offered:

Target Offered for Notes
categorical Any non-categorical column
string Any non-string column Missing values stay missing
numeric Any non-numeric column Refused if a value does not parse; the message gives the count and an example
boolean Columns with at most two values and none missing true/false, yes/no and 1/0 map themselves; otherwise pick which value becomes True

A conversion drops the column's stored palette, since the old colors no longer match its values.

Every operation refreshes the Cells panel and every column picker, and is recorded so the exported notebook replays it exactly.

Saved subset columns

A saved cell subset is stored as a boolean column subset_<name> plus a registry entry (Named subsets and the subset tree). The column is named after the subset, so the manager protects it:

  • It cannot be renamed or converted, and cannot be merged.
  • It can be duplicated, but not to a name starting with subset_. No rename, duplicate or merge may create a name with that prefix, because saved subsets own it.
  • Deleting it removes the subset from the subset list. Results computed on the subset (its PCA, UMAP or Leiden keys) are not deleted with the column; delete the subset from the subset tree to remove them too.

Tips and pitfalls

String columns and h5ad

anndata writes string columns as categoricals. Skopia records which columns were strings at export and restores them when it reopens the file, so a conversion to string survives a round trip through Skopia. Other tools reading the file see categoricals. See Save and export.

The column you color by

Renaming the column cells are colored by keeps the coloring under the new name, and converting it makes the plot re-read its values. Deleting it is flagged in the confirmation.

Column names containing /

The manager sends column names in the request body, not the URL, so names that contain / can be renamed, converted and deleted here.