foldChange
foldChange ¶
foldChange(
data,
label="foldchange",
pVal=0.05,
nonsigColor="grey",
subsetXAxis=None,
subsetYAxis=None,
cmap="vlag",
log=True,
center=0,
method="heatmap",
invertAxis=None,
parallelCoordinatesColor=None,
fileName="foldchange.pdf",
outputDir=None,
saveDir=None,
show=True,
returnData=False,
returnFig=False,
dpi=300,
transparent=False,
sdataTable=None,
**kwargs
)
Plot cell-type abundance fold changes between groups.
Reads uns[label + "_fc"] (falling back to uns[label]), the matrix that
sp.tl.foldChange writes: one row per comparison
group, one column per phenotype.
method="heatmap" draws a diverging heatmap centred on center, with the
colour limits made symmetric so that equal up- and down-changes read the same.
method="parallel_coordinates" draws one line per phenotype across the groups.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
(AnnData | SpatialData | str, required)
|
The cell table. An |
required |
label
|
str
|
The |
'foldchange'
|
pVal
|
float
|
Significance threshold. Accepted for signature compatibility; the current implementation does not mask by p-value. |
0.05
|
nonsigColor
|
str
|
Colour for non-significant cells. Accepted for signature compatibility;
see |
'grey'
|
subsetXAxis
|
list
|
Restrict to these columns (phenotypes). |
None
|
subsetYAxis
|
list
|
Restrict to these rows (groups). |
None
|
cmap
|
str
|
Matplotlib colormap. |
'vlag'
|
log
|
bool
|
Plot |
True
|
center
|
float
|
The value the diverging colormap is centred on. |
0
|
method
|
str
|
|
'heatmap'
|
invertAxis
|
bool
|
Accepted for signature compatibility with scimap; transpose the matrix yourself if you need the other orientation. |
None
|
parallelCoordinatesColor
|
str | list
|
Line colours for |
None
|
**kwargs
|
dict
|
Extra options. |
{}
|
fileName
|
str
|
File name for the saved figure. The extension decides the format. |
'foldchange.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
|
|