Skip to content

Questions about tutorials, CellRank2 compatibility, and GPU usage #52

@asmlgkj

Description

@asmlgkj

Hi scFates team,

First of all, thank you for developing such an excellent tool! scFates is incredibly powerful for pseudotime and bifurcation analysis, with rich visualization options. I've been learning from the tutorials and found them very helpful.

However, due to my limited experience, I encountered several questions while working through the documentation. I would greatly appreciate your guidance.


1. Is sc.pp.scale() still necessary?

In the Basic Curved trajectory analysis tutorial, sc.pp.scale(adata) is used. However, the current scanpy documentation no longer recommends this step. Should we still include it for scFates analysis?


2. Data download and legend for scf.pl.single_trend()

  • Where can I download the hgForebrainGlut.h5ad dataset used in the tutorial?
  • For scf.pl.single_trend(adata, "PRDX1", basis="pca", color_exp="k"), how can I add a colorbar/legend to indicate what the colors represent?

3. Legend and combined plotting for scf.pl.trends()

  • How can I add a legend/colorbar to scf.pl.trends() to show what the colors represent?
  • Is it possible to plot all gene clusters together in a single figure instead of looping through each cluster separately?

4. Inconsistent preprocessing between tutorials

I noticed that the preprocessing steps differ significantly between:

This makes it confusing to understand what the standard/recommended preprocessing pipeline should be for a typical dataset. Could you clarify the recommended workflow?


5. Palantir tutorial code is broken

In the Bone marrow fates tutorial, the following code no longer works:

counts = palantir.io.from_csv('https://github.com/dpeerlab/Palantir/raw/master/data/marrow_sample_scseq_counts.csv.gz')
norm_df = sc.pp.normalize_per_cell(counts, copy=True)

It seems the API has changed. Could you update the tutorial or provide a workaround?


6. CellRank2 compatibility and root selection

In the Conversion from CellRank pipeline tutorial:

a) CellRank2 compatibility issue:

I'm using CellRank 2.x (the current version), and the following code throws an error:

vk = cr.kernels.VelocityKernel.from_adata(adata, key="T_fwd")

Error:

TypeError: assert_array_equal() got an unexpected keyword argument 'x'

Does scFates support CellRank 2.x? If not, what version is recommended?

b) Root selection logic:

In the tutorial, the root is set manually:

scf.tl.root(adata, 164)

How was node 164 determined to be the root? Is there a way to programmatically identify the root node (e.g., based on a variable like palantir_pseudotime)? Hardcoding the node ID makes the code less reproducible.

c) scVelo pseudotime support:

Can scFates use pseudotime from scVelo's scv.tl.velocity_pseudotime(adata) directly for root selection or trajectory orientation?


7. GPU usage documentation

I couldn't find a tutorial or documentation on how to use scFates with GPU acceleration. Could you provide an example workflow showing:

  • How to enable GPU for tree inference (scf.tl.tree)
  • Which functions support GPU acceleration
  • Any specific environment setup required

Thank you so much for your time and help! I really appreciate your work on this tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions