tiledbsoma.ExperimentAxisQuery.to_spatialdata¶
- ExperimentAxisQuery.to_spatialdata(X_name: str, *, column_names: AxisColumnNames | None = None, X_layers: Sequence[str] = (), obsm_layers: Sequence[str] = (), obsp_layers: Sequence[str] = (), varm_layers: Sequence[str] = (), varp_layers: Sequence[str] = (), drop_levels: bool = False, scene_presence_mode: str = 'obs')¶
Returns a SpatialData object containing the query results
This is a low-level routine intended to be used by loaders for other in-core formats, such as AnnData, which can be created from the resulting objects.
- Parameters:
X_name – The X layer to read and return in the
X
slot.column_names – The columns in the
var
andobs
dataframes to read.X_layers – Additional X layers to read and return in the
layers
slot.obsm_layers – Additional obsm layers to read and return in the obsm slot.
obsp_layers – Additional obsp layers to read and return in the obsp slot.
varm_layers – Additional varm layers to read and return in the varm slot.
varp_layers – Additional varp layers to read and return in the varp slot.
drop_levels – If
True
remove unused categories from the AnnData table with the measurement data.scene_presence_mode – Method for determining what scenes to return data from. Valid options are
obs
(useobs_spatial_presence
dataframe) andvar
(usevar_spatial_presence
dataframe). Defaults toobs
.