Two root for the pseudotime?

Hello, i wonder if i can use two roots for computing my pseudotime?
If yes , how sould i do ? I’m not used to python

Also , here is what i have done for doing a trajectory inference

sc.pp.neighbors(anndata, n_neighbors=50, use_rep=‘X_PCA_INT’), resolution = 1),groups=‘leiden’)
anndata.uns[‘xroot’] = np.flatnonzero(anndata.obs[‘leiden’] ==‘8’)[0] # <=== i would like to use two different clusters,
root =np.flatnonzero(anndata.obs[‘leiden’]==‘8’)[0])

i still have no idea how to do it :confused:

I’m not sure this is going to be possible within scanpy. I would suggest you instead use CellRank which has much richer tooling for fate mapping/ trajectory inference.

Hi there! Yes, indeed, looking at CellRank would be a good option, in particular, the CytoTRACE kernel may be what you’re looking for. See our docs with tutorials at CellRank for directed single-cell fate mapping — CellRank master documentation

In particular, for the CytoTRACE kernel, take a look at this tutorial: CellRank beyond RNA velocity — CellRank master documentation