cospar.pl.barcode_heatmap¶
-
cospar.pl.
barcode_heatmap
(adata, selected_times=None, selected_fates=None, color_bar=True, rename_fates=None, normalize=False, binarize=False, log_transform=False, fig_width=4, fig_height=6, figure_index='', plot=True, pseudocount=1e-10, order_map_x=False, order_map_y=False, fate_normalize_source='X_clone', select_clones_with_fates=None, select_clones_without_fates=None, select_clones_mode='or', **kwargs)¶ Plot barcode heatmap among different fate clusters.
We clonal measurement at selected time points and show the corresponding heatmap among selected fate clusters.
- Parameters
- adata :
AnnData
object - selected_times : list, optional (default: None)
Time points to select the cell states.
- selected_fates : list, optional (default: all)
List of fate clusters to use. If set to be [], use all.
- color_bar : bool, optional (default: True)
Plot color bar.
- rename_fates : list, optional (default: None)
Provide new names in substitution of names in selected_fates. For this to be effective, the new name list needs to have names in exact correspondence to those in the old list.
- normalize
To perform cluster-wise then clone-wise normalization per time point
- binarize : bool
Binarize the coarse-grained barcode count matrix, just for the purpose of plotting.
- log_transform : bool, optional (default: False)
If true, perform a log transform. This is needed when the data matrix has entries varying by several order of magnitude.
- fig_width : float, optional (default: 4)
Figure width.
- fig_height : float, optional (default: 6)
Figure height.
- plot : bool
True: plot the result. False, suppress the plot.
- pseudocount : float
Pseudocount for the heatmap (needed for ordering the map)
- order_map_x : bool
Whether to re-order the x coordinate of the matrix or not
- order_map_y : bool
Whether to re-order the y coordinate of the matrix or not
- fate_normalize_source
Source for cluster-wise normalization: {‘X_clone’,’state_info’}. ‘X_clone’: directly row-normalize coarse_X_clone; ‘state_info’: compute each cluster size directly, and then normalize coarse_X_clone. The latter method is useful if we have single-cell resolution for each fate.
- select_clones_with_fates : list = None,
Select clones that labels fates from this list.
- select_clones_without_fates : list = None,
Exclude clones that labels fates from this list.
- select_clones_mode : str = {'or','and'}
Logic rule for selection.
- Returns
- --------
- coarse-grained X_clone matrix and the selected clusters are returned at : The
- The coarse-grained X_clone keeps all clones and maintains their ordering. : adata.uns['barcode_heatmap']
- adata :