TrajAtlas.TRAVMap.getTrajExpression#

TrajAtlas.TRAVMap.getTrajExpression(data, subsetLineage=None, run_milo=True, run_pseudobulk=True, feature_key='rna', n_interval=100, milo_nhood_prop=0.1, sample_col=None, group_col=None, time_col=None, njob=-1, min_cell=4)[source]#

Get pseudotemporal expression profiles from trajectories.

See also

gene modules.

Firstly, we initiate the TrajDiff pipeline to generate pseudobulk profiles within neighborhoods. Subsequently, we project the gene expression within these neighborhoods onto the pseudotime axis.

Parameters:
  • data (MuData | AnnData) – AnnData object with KNN graph defined in obsp or MuData object with a modality with KNN graph defined in obsp

  • subsetLineage (str) – Key in obs that stores lineage information that you want to subset here. The value must be boolean. See Projecting Osteogenic Datasets onto Differentiation Atlas and OPCST Model Using TrajAtlas on how to predict lineage in osteogenesis datasets. By default, all cells are treated as a lineage. (default: None)

  • run_milo – You can choose whether to run the milo pipeline to generate neighborhoods. If you have already executed the TrajDiff pipeline, you can set the parameter to False to skip this step. (default: True)

  • run_pseudobulk – You can choose whether to run the milo pipeline to generate pseudobulk. If you have already executed the TrajDiff pipeline, you can set the parameter to False to skip this step. (default: True)

  • feature_key (str) – Key to store the cell-level AnnData object in the MuData object. (default: ‘rna’)

  • n_interval (int) – Specify the number of intervals to split the pseudotime axis. (default: 100)

  • milo_nhood_prop (float) – Fraction of cells to sample for neighbourhood index search. (default: 0.1)

  • sample_col (str) – Keys in obs that you store sample information. (default: None)

  • group_col (str) – Keys in obs that you store group information. (default: None)

  • time_col (str) – Keys in obs that you store pseudotime information. See Projecting Osteogenic Datasets onto Differentiation Atlas and OPCST Model Using TrajAtlas on how to predict pseudotime in osteogenesis datasets. (default: None)

  • njob (int) – Number of parallel jobs to use.

  • min_cell (int) – Minimal cell number to check which sample to keep within neighborhoods. (default: 4)

Returns:

: MuData object with pseudotemporal gene expression are stored in MuData[‘tdiff’]uns[“cpm_dict”]