Skip to content

Save and export

Skopia keeps your work in the backend's memory while you analyze. To keep it after the backend stops, export the dataset as an .h5ad; to take tables or gene sets to another tool, export those. This page also covers starting a new session and what survives a browser reload or a backend restart.

Where to find it

File → Export… for the dataset, cell metadata and gene sets. File → New session… to unload everything. The notebook and Markdown export is File → Analysis record… (Analysis record and notebook export).

Export

File → Export… opens Export data with three formats:

Format What it contains Suggested name
AnnData (.h5ad) The whole active dataset with everything added in this session <dataset>_skopia.h5ad
Cell metadata (.tsv) Every .obs column, tab-separated, cell ids in the first column <dataset>_annotations.tsv
Gene sets (.json) Every gene set in the Genes panel, with folders and down-regulated genes <dataset>_gene_sets.json

<dataset> is the loaded file's name without its extension.

Run it

  1. Make the dataset you want to export the active one (click its tab).
  2. Open File → Export… and pick a format.
  3. Browse to a folder and edit the file name. Existing files of the same kind in that folder are listed; if your name matches one, Skopia warns that it will be overwritten.
  4. Click Save. The backend writes the file and reports the path and size.

The backend writes the file directly to the folder you picked, so a multi-gigabyte .h5ad does not travel through the browser. The folder is on the machine running the backend. Each format remembers the last folder you used.

Backend on another machine

When the backend runs on a server and you are browsing from a laptop, use download to browser instead at the bottom of the dialog. The file goes to your browser's download folder under a fixed name: skopia_export.h5ad, cell_annotations.tsv or gene_sets.json.

What the .h5ad carries

The export is a copy of the live dataset (the live one is not changed) with a few additions:

Where What
uns['skopia_analysis_record'] The analysis record as a JSON string, so reopening the file continues its history (Analysis record)
uns['skopia_provenance'] The Skopia build that wrote the file
uns['skopia_string_columns'] Names of .obs columns that were strings (see below)
uns['skopia_lines_json'] Drawn shapes and lines, in full
obsm['X_<line>_projection'] For each drawn line, each cell's position along it and distance from it (two columns)

Everything else Skopia wrote during the session is already in the dataset and is saved with it: new .obs columns, embeddings, layers, saved subsets, figures, text labels and territories. What Skopia writes to AnnData lists the keys.

String columns come back as strings

anndata writes every string .obs column as a categorical, and refuses to write one with missing values any other way. So that a column you converted to string (The .obs manager) does not come back categorical, the export records the string columns in uns['skopia_string_columns']. When Skopia loads the file, it turns those columns back into strings and drops the record; the next export rewrites it. Other tools that open the file see categoricals.

Other exports

What Where Formats
Selected .obs columns The .obs manager → Export TSV or CSV
One folder of gene sets A folder's ⋯ menu in the Genes panel → Export ▸ JSON, GMT or CSV
A figure The Figures tab or Panels PNG; SVG for most saved figures
The analysis as code File → Analysis record… Jupyter notebook or Markdown

See Gene sets for the gene set file formats.

Start a new session

File → New session… unloads every dataset and reloads the page, ready for a new analysis.

  1. Open File → New session…. The dialog lists the datasets that will be unloaded.
  2. If you have work to keep, click Export first… to open the export dialog.
  3. Tick Also delete all gene sets only if you want an empty Genes panel too. It is off by default because gene sets are not tied to a dataset.
  4. Click Start new session.

After the reload, the plot area shows Load a dataset… for the next one. To empty only the Genes panel, use File → Clear all gene sets…, which offers Download a backup (JSON) first before deleting.

What survives a reload or a restart

The backend holds the datasets and everything computed on them. The browser holds only the view.

Event What is kept What is lost
Browser refresh, or closing and reopening the tab Every loaded dataset with its session work (filters, deleted cells, PCA, neighbors, UMAP, clusterings, scores, transformed embeddings, saved subsets, figures), drawn shapes and text labels, gene sets, and the dataset arrangement (tab order, tab names, Split, pane sizes) The current selection and coloring, and other view state
Closing a dataset (tab ×) or replacing it on load The other datasets Everything computed on that dataset since it was loaded
File → New session… Gene sets, unless you tick Also delete all gene sets Every dataset and its session work
Backend restart Nothing in memory; your exported files and the shipped and user configuration Every dataset, its session work, and the gene sets

Gene sets live in the backend process, not in a dataset: the Genes panel saves every change to the backend and reloads from it after a refresh. A backend restart clears them. Export them first (File → Export… → Gene sets (.json)) and re-import the file afterwards.

Export before you stop the backend

Stopping the backend, or a crash, discards every dataset's session work. The original files on disk are never modified by an analysis; only an export writes your results. Export an .h5ad at milestones you would not want to redo.