TrajAtlas.TrajDiff.split_gene#

TrajAtlas.TrajDiff.split_gene(mdata, mode='Kmean', FDR=0.05, kmean_cluster=10, stage_threshold=10, feature_key='rna', select_genes=None)[source]#

Group genes into gene clusters based on their pseudotemporal expression patterns. Currently, we offer two clustering strategies: Kmeans and Stage. In Kmeans mode, genes are grouped using Kmeans clustering, which identifies differential expression patterns between two groups. In Stage mode, genes are grouped based on the stage (early or late) at which they exhibit differential expression (up or down).

See also

differential genes.

Parameters:
  • mdata (MuData) – MuData object processed by TrajDiff process.

  • mode (Literal['Kmean', 'Stage']) – Gene group strategy, either Kmean or Stage. If Kmean were selected, genes are grouped using Kmeans clustering. If Stage were selected genes are grouped based on the stage. (default: “Kmean”)

  • FDR (int) – False discovery rate to discover significant genes. (default: 0.05)

  • kmean_cluster (int) – If ‘Kmeans’ is chosen in the mode parameters, you can specify the number of clusters for this parameter. (Default: 10)

  • stage_threshold (int) – If ‘Stage’ is chosen in the mode parameters, you can specify the threshold of every stage (early/late) to select stage-specific genes. (Default: 10)

  • feature_key (str) – Key to store the cell-level AnnData object in the MuData object. (Default: “rna”)

  • select_genes (Optional[list]) – Custom gene sets are allowed. If not provided, we are using significant genes. (Default: None)

Returns:

: Gene category. Also update MuData in MuData[feature_key].var.