foldchange
Short Description
sm.pl.foldchange
: The Function allows users to visualize foldchange in abundance of celltypes between samples/ROI's.
Run sm.tl.foldchange
first to compute the foldchange.
Function
foldchange(adata, label='foldchange', p_val=0.05, nonsig_color='grey', subset_xaxis=None, subset_yaxis=None, cmap='vlag', log=True, center=0, method='heatmap', invert_axis=None, parallel_coordinates_color=None, matplotlib_bbox_to_anchor=(1.04, 1), matplotlib_legend_loc='upper left', xticks_rotation=90, return_data=False, **kwargs)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
Anndata object |
required | |
label |
strong
|
label used when running |
'foldchange'
|
p_val |
float
|
p_val cut-off above which is considered not-significant. The cells containing non-significant changes will be highlighted in the heatmap. |
0.05
|
nonsig_color |
string
|
Color used to highlight non-significant fold changes in the heatmap. |
'grey'
|
subset_xaxis |
list
|
Subset x-axis before plotting. Pass in a list of categories. eg- subset_xaxis = ['CelltypeA', 'CellTypeB']. |
None
|
subset_yaxis |
list
|
Subset y-axis before plotting. Pass in a list of categories. eg- subset_yaxis = ['ROI_1', 'ROI_5']. |
None
|
cmap |
string
|
Color map. Can be a name or a Colormap instance (e.g. 'magma', 'viridis'). |
'vlag'
|
log |
bool
|
Convert foldchange to log2 scale. |
True
|
center |
float
|
The center value to be used in heatmap. |
0
|
method |
string
|
Two methods are available for plotting the foldchanges |
'heatmap'
|
invert_axis |
bool
|
Flip the axis of the plot. |
None
|
parallel_coordinates_color |
list
|
Custom colors for each category. |
None
|
matplotlib_bbox_to_anchor |
tuple
|
Bounding box argument used along with matplotlib_legend_loc to control the legend location when using the matplotlib method. |
(1.04, 1)
|
matplotlib_legend_loc |
TYPE
|
Location of legend used along with matplotlib_bbox_to_anchor to control the legend location when using the matplotlib method. |
'upper left'
|
xticks_rotation |
int
|
Angle the x-axis ticks. |
90
|
return_data |
bool
|
Return the final data used for plotting. |
False
|
**kwargs |
Additional keyword arguments passed to: |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Plot |
Data used for the plot if |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Source code in scimap/plotting/_foldchange.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|