Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Import a saved Seurat object

Import RNA counts, cell metadata and saved PCA and UMAP coordinates from a Seurat RDS file. This tutorial uses a 1,000-cell PBMC example, followed by a tiny synthetic file that shows how CyteArc handles skipped metadata and an active SCT assay. No R session is needed.

The PBMC file is Hua Yichao’s SeuratExtend example data, licensed under CC0 and derived from 10x Genomics data under CC BY 4.0. The synthetic file was made for CyteArc and uses its BSD-3-Clause license. See Third-party notices for data credits.

Download and inspect the PBMC object

Download the file from CyteArc’s public example bucket, then check its contents.

Loading...
Loading...

Started: 2026-10-23T14:34:31.338706Z | Wall time: 3.334 s

Active assay: RNA | Cells: 1000
namedimensionsimportable
0RNA(17195, 1000)True

Started: 2026-10-23T14:34:34.675647Z | Wall time: 1.370 s

namedimensionsroleassayUsed
0pca(1000, 50)graphCoordinatesRNA
1umap(1000, 2)displayEmbeddingRNA

Started: 2026-10-23T14:34:36.049131Z | Wall time: 0.011 s

('orig.ident', 'nCount_RNA', 'nFeature_RNA', 'percent.mt', 'seurat_clusters', 'cluster')

Started: 2026-10-23T14:34:36.063574Z | Wall time: 0.710 s

Select metadata and reductions

Keep RNA counts, PCA, UMAP and four metadata columns. cell_metadata chooses the columns; default_assay chooses which imported assay later analyses use by default.

Use reduction_roles to mark PCA as coordinates for a graph and UMAP as a display layout. These roles are already recognized in this file, but naming them shows how to override a role when needed. The coordinates are imported as they are.

Imported assays: ('RNA',) | Default: RNA
codeobjectPathmessage
0ignored_seurat_slotcommandsSeurat slot 'commands' is not imported
1ignored_normalized_layerassays/RNA/datanormalized slot 'data' is not imported
2ignored_normalized_layerassays/RNA/scale.datanormalized slot 'scale.data' is not imported
3ignored_assay_slotassays/RNA/var.featuresassay slot 'var.features' is not imported
4ignored_reduction_slotreductions/pca/miscreduction slot 'misc' is not imported

Started: 2026-10-23T14:34:36.776823Z | Wall time: 5.413 s

The commands notice says that Seurat’s command history was omitted. Counts, selected metadata, identities and coordinates were imported. Review these notices to see which parts of your source object were kept.

DataStore has 1000 (1000) cells with 1 assays: RNA Cell metadata: 'I', 'ids', 'names', 'RNA_nCounts', 'RNA_nFeatures', 'RNA_percentMito', 'RNA_percentRibo', 'nCount_RNA', 'nFeature_RNA', 'orig.ident', 'percent.mt' RNA assay has 17195 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'nCells', 'vst.mean', 'vst.variable', 'vst.variance', 'vst.variance.expected', 'vst.variance.standardized'

Started: 2026-10-23T14:34:42.194696Z | Wall time: 2.002 s

Saved Seurat UMAP colored by active identities. Monocytes labeled Mono CD14 and Mono FCGR3A occupy neighboring regions, with a smaller DC population.

Started: 2026-10-23T14:34:44.200005Z | Wall time: 1.564 s

Pass the imported layout and identities directly to plots.embedding, as above. To build a graph from the saved PCA, pass imported.reductionArtifacts["pca"] to ds.graph.ann_index; see Build a neighborhood graph stage by stage.

Read partial-import notices

The PBMC file has no unsupported metadata or SCT assay. The small file below adds a list-valued notes column, an active SCT assay derived from RNA, and coordinates called layout. Its three cells and two genes are synthetic. The file is embedded in the notebook so this example also works in the downloaded copy.

Source
581

Started: 2026-10-23T14:34:45.766877Z | Wall time: 0.009 s

Active assay: SCT
Inferred role: graphCoordinates
codeobjectPathmessage
0skipped_metadata_columnmeta.data/notescell metadata column 'notes' is not imported: metadata column uses unsupported R type VECTOR

Started: 2026-10-23T14:34:45.778787Z | Wall time: 0.031 s

The reader skips the list-valued notes column and keeps the scalar columns. If a column is essential, name it in cell_metadata: an unsupported column then raises an error instead of being skipped.

The name layout was treated as graph coordinates. We know it is a display layout, so set its role explicitly when importing it.

Imported assays: ('RNA', 'SCT') | Default: RNA
Layout kind: embedding
codeobjectPathmessage
0sct_default_assayactive.assayactive assay 'SCT' holds SCTransform-corrected counts, so the default assay is 'RNA', whose raw counts its models were fitted to; pass default_assay='SCT' to keep the active assay
1skipped_metadata_columnmeta.data/notescell metadata column 'notes' is not imported: metadata column uses unsupported R type VECTOR
2sct_corrected_countsassays/SCT/countscounts of SCTAssay 'SCT' are SCTransform-corrected counts, not the raw counts of assay 'RNA'
3ignored_assay_slotassays/SCT/SCTModel.listassay slot 'SCTModel.list' is not imported

Started: 2026-10-23T14:34:45.812997Z | Wall time: 1.246 s

The import kept both assays and made RNA the default. The sct_default_assay notice explains why: SCT holds corrected counts, and its model identifies RNA as their raw-count source. This choice is reported by the writer, after inspection.

Choose a raw-count default explicitly

To keep only RNA, select it and set default_assay="RNA". The default must be an imported assay. Use raw counts for analyses that require them; choosing SCT explicitly would make its corrected counts the default.

{'assays': ('RNA',), 'default': 'RNA', 'notices': []}

Started: 2026-10-23T14:34:47.064303Z | Wall time: 0.438 s

See CyteArc for Seurat users for the workflow map and Import and export for H5AD and Matrix Market export.