| inspect_sc | R Documentation |
Inspects the structure and contents of a supported single-cell data file without performing a conversion. Supported inputs include Seurat and SingleCellExperiment objects stored as RDS files, AnnData H5AD files, and Loom files.
inspect_sc(path_to_file)
path_to_file |
Path to an RDS, H5AD, or Loom file. |
The function reports basic information such as the number of cells and features, available assays or layers, dimensional reductions, metadata, and a sample of cell names. Additional format-specific information is reported when available.
Invisibly returns a list containing information about the inspected object. The contents of the list depend on the input format.
if (requireNamespace("Seurat", quietly = TRUE)) {
counts <- matrix(
c(1, 0, 3, 0, 2, 1),
nrow = 2,
dimnames = list(
c("Gene1", "Gene2"),
c("Cell1", "Cell2", "Cell3")
)
)
obj <- Seurat::CreateSeuratObject(counts = counts)
path <- tempfile(fileext = ".rds")
saveRDS(obj, path)
inspect_sc(path)
unlink(path)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.