Cnv.crosstabmap#
missionbio.mosaic.cnv.Cnv.crosstabmap
- Cnv.crosstabmap(columns: Union[str, ndarray, DataFrame], index: Union[str, ndarray, DataFrame] = 'label', normalize: str = 'all', row_order: Optional[Sequence] = None, col_order: Optional[Sequence] = None) Figure #
Crosstab heatmap for all barcodes.
It displays a cross-tabulation of the values in columns and index. The values are fetched from the
crosstab()
method and displayed as a heatmap.Example
>>> import missionbio.mosaic as ms >>> sample = ms.load_example_dataset("3 cell mix") >>> sample.dna.crosstabmap(sample.protein.get_labels())
- Parameters:
- columnsUnion[str, np.ndarray, pd.DataFrame]
Name of the row attribute or array of values to be used as columns. Uses
get_attribute()
constrained by row to retrieve the values. This is passed tocrosstab()
as is.- indexUnion[str, np.ndarray, pd.DataFrame], default
LABEL
Name of the row attribute or array of values to be used as index. Uses
get_attribute()
constrained by row to retrieve the values. This is passed tocrosstab()
as is.- normalize{‘all’, ‘index’, ‘columns’, ‘off’}, default: “all”
Normalize by dividing all values by the sum of values.
‘all’ : normalize all values.
‘index’ : normalize by the sum of values in the index.
‘columns’ : normalize by the sum of values in the columns.
‘off’ : no normalization.
This is passed to
crosstab()
as is.- row_orderOptional[Sequence]
The subset of the list of row items to show on the plot. If None, all the row items are plotted.
- col_orderOptional[Sequence]
The subset of the list of column items to show on the plot. If None, all the column items are plotted.
- Returns:
- go.Figure
The crosstab heatmap.
< Class Cnv