Convenience wrapper around SOMAExperimentAxisQuery, to build and execute a
query, and return it as a Seurat object.
Usage
get_seurat(
census,
organism,
measurement_name = "RNA",
X_layers = c(counts = "raw", data = NULL),
obs_value_filter = NULL,
obs_coords = NULL,
obs_column_names = NULL,
obsm_layers = FALSE,
var_value_filter = NULL,
var_coords = NULL,
var_column_names = NULL,
var_index = "feature_id"
)Arguments
- census
The census object, usually returned by
cellxgene.census::open_soma().- organism
The organism to query, usually one of
Homo sapiensorMus musculus- measurement_name
The measurement object to query. Defaults to
RNA.- X_layers
A named character of
Xlayers to add to the Seurat assay, where the names are the names of Seurat slots (countsordata) and the values are the names of layers withinX.- obs_value_filter
A SOMA
value_filteracross columns in theobsdataframe, expressed as string.- obs_coords
A set of coordinates on the obs dataframe index, expressed in any type or format supported by SOMADataFrame's read() method.
- obs_column_names
Columns to fetch for the
obsdata frame.- obsm_layers
Names of arrays in obsm to add as the cell embeddings; pass FALSE to suppress loading in any dimensional reductions.
- var_value_filter
Same as
obs_value_filterbut forvar.- var_coords
Same as
obs_coordsbut forvar.- var_column_names
Columns to fetch for the
vardata frame.- var_index
Name of column in ‘var’ to add as feature names.
Examples
if (FALSE) { # \dontrun{
census <- open_soma()
seurat_obj <- get_seurat(
census,
organism = "Homo sapiens",
obs_value_filter = "cell_type == 'leptomeningeal cell'",
var_value_filter = "feature_id %in% c('ENSG00000107317', 'ENSG00000106034')"
)
seurat_obj
census$close()
} # }