CellScope.fm._fold_change

CellScope.fm. _fold_change (fea_1 : np.ndarray, fea_2 : np.ndarray, selected_number : int)

The _fold_change function computes the fold change of gene expression between two clusters and selects the top genes with the largest fold changes based on the specified number of genes.

Parameters

  • fea_1 (np.ndarray):

    Feature matrix for the first cluster.

  • fea_2 (np.ndarray):

    Feature matrix for the second cluster.

  • selected_number (int):

    Number of top markers to select.

Return

  • marker_indices (ndarray):

    Indices of the top markers based on fold change.

  • FC_values (ndarray):

    Fold change values of the selected markers.