CellScope.fm.FindMarker
CellScope.fm. FindMarker (fea : np.ndarray | csr_matrix, cluster1 : np.ndarray, cluster2 : np.ndarray, selected_number : int = 5, selected_method : str = ‘diff pct’)
The FindMarker function identifies marker genes that differentiate two clusters.
It supports various selection methods, such as ‘diff pct’, ‘diff mean’, ‘FC’ (Fold Change), ‘Wilcoxon’ [GE65], and ‘t-test’ [KT15], and returns the top specified number of marker genes.
Parameters
fea (
np.ndarray|csr_matrix):The feature matrix of shape (n_cell, n_gene), where rows correspond to cells and columns to genes.
cluster1 (
np.ndarray):Indices of cells belonging to the first cluster.
cluster2 (
np.ndarray):Indices of cells belonging to the second cluster.
selected_number (
int, optional, default=5):Number of top markers to select.
selected_method (
str, optional, default=’diff pct’):The method for selecting markers. Options include ‘diff pct’, ‘diff mean’, ‘FC’, ‘Wilcoxon’, and ‘t-test’.
Return
marker_indices (
ndarray):Indices of the selected marker genes.
marker_values (
ndarray):Corresponding values of the selected markers based on the chosen method.