deconvatac.tl.spatialdwls

deconvatac.tl.spatialdwls#

Functions#

spatialdwls(adata_spatial, adata_ref, labels_key[, ...])

Run SpatialDWLS

Module Contents#

deconvatac.tl.spatialdwls.spatialdwls(adata_spatial, adata_ref, labels_key, cluster_key='leiden', n_cell=50, tfidf=True, r_lib_path=None, results_path='./spatialdwls_results')#

Run SpatialDWLS

Parameters#

adata_spatialAnnData

AnnData of the spatial data , filtered by highly variable features. Feature space needs to be the same as the one of adata_ref. Normalized counts are expected to be saved in .X. Names of observations and features are expected as row names of adata_spatial.obs and adata_spatial.var.

adata_refAnnData
AnnData of the reference data, filtered by highly variable features. Feature space needs to be the same as the one of adata_spatial.

Normalized counts are expected to be saved in .X. Names of observations and features are expected as row names of adata_ref.obs and adata_ref.var.

labels_keystr

Cell type key in adata_ref.obs for label information.

cluster_keystr

Cluster key in adata_spatial.obs for cluster information.

n_cellint

Number of cells per spot.

tfidfbool

Whether the normalized counts are TFIDF-normalized.

r_lib_pathstr

Path to R library.

results_pathstr

Path to save estimated cell type abundances to.

Returns#

  • Saves estimated proportions as csv-file to results_path.