CellScope.gev.compare_violin_plot_between_classes

CellScope.gev. compare_violin_plot_between_classes (fea : np.ndarray, marker_gene_indices : list, marker_gene_name : list, cluster1 : np.ndarray, cluster2 : np.ndarray, class_name : list = [‘1’, ‘2’], figsize : tuple = (10, 3), save_fig : bool = False, save_path : str = None)

The compare_violin_plot_between_classes function visualizes and compares the expression distributions of marker genes between two specified cell clusters using violin plots. It allows for customization of figure size, class names, and the option to save the generated plots to a file.

Parameters

  • fea (np.ndarray | csr_matrix):

    Feature matrix for gene expression.

  • marker_gene_indices (list):

    List of indices for marker genes.

  • marker_gene_name (list):

    List of marker gene names.

  • cluster1 (np.ndarray):

    Indices of the first cluster.

  • cluster2 (np.ndarray):

    Indices of the second cluster.

  • class_name (list, optional, default=[‘1’, ‘2’]):

    Names of the classes for labeling in the violin plot.

  • figsize (tuple, optional, default=(10, 3)):

    Size of the figure.

  • save_fig (bool, optional, default=False):

    If set to True, saves the figure to the specified path.

  • save_path (str, optional):

    File path to save the figure. Required if save_fig=True.

Return

  • This function does not return any values. It displays a violin plot comparing gene expression between two classes.