SC2Spa.pl.DrawGenes2

SC2Spa.pl.DrawGenes2(adata: ~anndata._core.anndata.AnnData, gene: str, coords_name='spatial', lim=False, xlim=[650, 5750], ylim=[650, 5750], figsize=(10, 10), alpha=0.7, cmap=<matplotlib.colors.ListedColormap object>, FM=True, scST=False, CTL=None, c_name='simp_name', root='transfer2/FM_Valid1/', s=2, Sparse=True, title=False, save=None)

Show the expression of a gene in cells or ST beads

The figure will be saved as root + save + ‘_’ + gene + ‘.png’

Parameters

adata

anndata file. Cell type information should be stored in adata.obs[c_name] if CTL!=None Fine mapping result should be stored in adata.obs[‘FM’] if FM==True Coordinate Information should be stored in adata.obsm[coords_name] Reconstruction info should be stored in adata.obs[‘Recon_scST’]

gene

The gene to be drawn

CTL

A list of the names of cell types to be drawn. Default ‘’.

s

size of beads in the figure

cmap

colormap. See matplotlib

FM

Draw finely mapped beads of cells if True

scST

Draw reconstructed single-cell ST data if True

Sparse

True if the gene expression matrix is saved in sparse format

alpha

control the transparency of the scatters. 1 is transparent. 0 is opaque.

figsize

figure size

Returns

None