Load your data¶
How to open your own files in Skopia, what a file should contain to be useful, and what survives a browser refresh or a backend restart.
File formats¶
| Format | How to point at it | Notes |
|---|---|---|
AnnData .h5ad |
the file | The native format. Everything Skopia computes can be saved back into one. |
10x Genomics .h5 |
the file | A Cell Ranger feature-barcode matrix. |
10x Visium HD *_feature_slice.h5 |
the file | Rebinned from 2 µm to 8 µm bins on load, with spatial coordinates and the 10x graph and k-means clusters as .obs columns. The first load takes about 1 to 2 minutes; the result is cached as an .h5ad next to the source (it can be around 1 GB; delete it to reclaim the space). |
| 10x matrix folder | the folder | Holds matrix.mtx, barcodes.tsv, and features.tsv (Cell Ranger v3) or genes.tsv (v2), each gzipped or not. |
| Prefixed 10x trio, as on GEO | the *_matrix.mtx or *_matrix.mtx.gz file |
Companions <prefix>_barcodes.tsv(.gz) and <prefix>_features.tsv(.gz) or <prefix>_genes.tsv(.gz) in the same folder. The file browser lists the trio by its prefix. GEO's gzipped v2 genes.tsv.gz, which scanpy's own reader does not open, is accepted. |
Seurat .rds |
the file, through File → Load… only | Converted through R. Needs R with the Seurat and SeuratDisk packages, installed separately (SeuratDisk is not a conda package). |
Open a file from the File menu¶
- Open File → Load…. The Load Dataset dialog opens on the last folder you browsed.
- Find the file. The sidebar has Home, Desktop, Documents, Downloads and your Recent files; the path at the top is clickable; Filter this folder narrows a long listing. Only loadable entries are shown:
.h5ad,.h5and.rdsfiles, 10x matrix folders and prefixed trios. - Click the entry, or type a full path under Or enter path directly:.
- Under Load into:, choose Replace with the current dataset's name, or New dataset to open the file alongside the ones already loaded.
- Click Load.
The paths are on the computer running the backend. When you run both processes on your own machine, as in Install, that is the same computer.
Name a file at launch¶
Set SKOPIA_DATA_PATH when you start the backend, and the file loads into the first dataset slot:
This accepts an .h5ad, a 10x .h5 or Visium HD feature_slice.h5, a 10x matrix folder or a *_matrix.mtx(.gz) trio file. It does not accept .rds: the R conversion runs only from File → Load….
Without SKOPIA_DATA_PATH, the backend loads the bundled toy dataset toy_spatial.h5ad. If the path does not exist, the backend prints a warning and starts with nothing loaded; open a file with File → Load….
The folder backend/skopia/data/ in the Skopia checkout holds other bundled datasets you can open the same way: toy_spatial_3sections.h5ad (three sections of one synthetic tissue, labeled in obs['section'], for spatial tools where distances between sections must be ignored) and the pair toy_localize_spatial.h5ad and toy_localize_scrna.h5ad (a benchmark for Localize).
Load a second dataset¶
Skopia holds several datasets at once, each in its own slot. Choose New dataset under Load into: in the Load dialog. A row of dataset tabs appears above the plot; the active tab is the dataset the panels and menus act on, and Split shows them side by side. A second dataset is how you compare two samples without merging them, or give Localize its spatial reference. To merge files into one dataset instead, use File → Combine datasets… (Combine datasets).
See Datasets, split view and compare.
What an .h5ad should contain¶
Skopia works with whatever the file has, but these parts decide what you can do right away.
.X- Raw counts or log-normalized expression. Skopia classifies
.Xand every layer from its own values (raw counts, normalized, log-normalized, z-scored and others) and shows the verdict next to the Source: picker, so you know whether to run Normalize Total and Log1p first. If.Xholds integer counts and there is nocountslayer, Skopia copies.Xintolayers['counts']on load, so the raw counts stay reachable after normalization. See Expression scale detection. .obs- Per-cell annotations (cell types, samples, clusters, QC metrics). Each column appears in the Cells panel, where you can color by it and select by its labels. Category colors stored in
uns['<column>_colors'], scanpy's convention, are used when present. .obsm- Embeddings. Every
.obsmarray with at least two columns is listed in the Embedding: dropdown (X_umap,X_pca,X_tsneand so on). A file without one has nothing to draw until you compute PCA or UMAP under Analyze. obsm['spatial']- Spatial coordinates. Skopia treats
obsm['spatial'], or failing thatobsm['X_spatial'], as the dataset's tissue coordinates, which the spatial tools (spatial neighbors, contour, sections, ligand-receptor) need. Coordinates stored under another name can be chosen explicitly from the spatial tools' prerequisite warning. .var- Gene names as the index. If the file also has another identifier column (symbols beside Ensembl IDs, say), the Genes panel's Gene IDs dropdown switches between them.
A file that Skopia saved also carries its own results, drawings, figures and analysis record in .uns; reopening it continues where you left off. See What Skopia writes to AnnData.
What survives a refresh or a restart¶
The backend holds every loaded dataset and everything computed on it, in memory. The browser holds only the view.
- A browser refresh loses nothing computed: the datasets, your session's results, drawn shapes, gene sets and the tab arrangement come back. The current selection and coloring do not.
- Restarting the backend clears everything that was not exported, including gene sets. The files on disk are never changed by an analysis; only an export writes your results.
Export an .h5ad at milestones, and export gene sets (File → Export…) before stopping the backend. The full table is in Save and export.