dpeerlab / Palantir

Single cell trajectory detection
https://palantir.readthedocs.io
GNU General Public License v2.0
203 stars 45 forks source link

def select_branch_cells( ): #145

Open yitengfei120011 opened 1 week ago

yitengfei120011 commented 1 week ago

Hi,in select_branch_cells function why " prob_thresholds - eps < sorted_fate_probs" is true and as a selected cell? How are the selected cells explained biologically?

katosh commented 1 week ago

Hi @yitengfei120011, thank you for this interesting question!

The cells are selected based on the fate probability computed by Palantir. The tool simply selects all cells for a specific fate that have a higher probability to achieved this fate than 99% (if the default q=0.01 is used) of all younger cells (according to pseudo-time) minus a tolerance eps. These are the cells with the highest probability to achieve this fate for a given pseudo-timepoint. You can control the amount of cells you want to select by manipulating the parameters q and eps.

Since we assume that all cells have a non-zero probability to become any fate, this binary selection for a branch does not reflect the actual fate choice of a cell. It only selects cells that have a high probability to achieve this fate. These cells are therefore just representative for cells that do achieve this fate to best of our knowledge, based on the computed fate probabilities. This representative set also aims to include sufficient cells at any pseudo-time to enable gene-expression trends inference along a branch, to infer a trajectory in cell-state space, or to visualize a trajectory on the UMAP with plot_trajectory.

Does this answer your question? Let me know if I can clarify this further or if you have any other questions!

@ManuSetty please correct me if I am missing something!