Creates an AnnData object with cells in obs, selected marker signals in
X, and x/y in obsm$spatial. The optional anndataR package and its
Python runtime are required.
See also
Other interoperability:
cs_as_spe(),
cs_from_spe()
Examples
if (requireNamespace("anndataR", quietly = TRUE)) {
x <- cs_example()
cs_as_anndata(x, cs_signal_policy(cs_markers(x)))
}
#> InMemoryAnnData object with n_obs × n_vars = 80 × 4
#> obs: 'cell_id', 'image_id', 'sample_id', 'x', 'y', 'area', 'x_px', 'y_px'
#> var: 'marker'
#> uns: 'cellspec'
#> obsm: 'spatial'