spatialProximityScore
spatialProximityScore ¶
spatialProximityScore(
data,
label="spatial_pscore",
plotScore="both",
orderXAxis=None,
color="grey",
figsize=None,
fileName="spatial_pscore.pdf",
outputDir=None,
saveDir=None,
show=True,
returnData=False,
returnFig=False,
dpi=300,
transparent=False,
sdataTable=None,
**kwargs
)
Proximity volume and density scores, as a bar chart.
Reads the summary table that
sp.tl.spatialProximityScore writes to
uns[label] — one row per image, with a proximity volume (what fraction of
all cells are in the interaction zone) and a proximity density (how enriched
that zone is for the pair of interest).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(AnnData | SpatialData | str, required)
|
The cell table. An |
required |
label
|
str
|
Key in |
'spatial_pscore'
|
plotScore
|
str
|
|
'both'
|
orderXAxis
|
list
|
Explicit row order. |
None
|
color
|
str
|
Bar colour. |
'grey'
|
figsize
|
tuple
|
Figure size in inches. Scaled from the number of rows when |
None
|
fileName
|
str
|
File name for the saved figure. The extension decides the format. |
'spatial_pscore.pdf'
|
outputDir
|
str
|
Directory to save the figure in. When |
None
|
saveDir
|
str
|
Deprecated alias for |
None
|
show
|
bool
|
Call |
True
|
returnData
|
bool
|
Return the |
False
|
returnFig
|
bool
|
Return |
False
|
dpi
|
int
|
Resolution of the saved figure. |
300
|
transparent
|
bool
|
Save with a transparent background. |
False
|
sdataTable
|
str
|
Which |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
None | DataFrame | tuple
|
|