scRank icon indicating copy to clipboard operation
scRank copied to clipboard

Can perb_score be compared across calculations?

Open zqun1 opened this issue 10 months ago • 3 comments

Hi scRank team,

Thank you for developing this very interesting tool. For my scRNA-seq, I have the same cells treated by four different conditions. Now I want to compare the sensitivity to anti-PD-1 after the treatments. I thought of two different ways:

  1. Run scRank on the combined datasets and split the results, which seems not possible because the calculation is done based on the whole cluster, i.e., the whole cluster have an average score. In this case, I could not split the results. --> No.
  2. Run scRank on each dataset and compare the perb_score. However, I don't know if the perb_score could be compared across calculations. Could you please comment on this? For example, under condition A, my cell of interest has a perb_score of 2.71x10^-5; under condition B, my cell of interest has a perb_score of 3.05x10^-6. In this case, can I say that condition B decreases the sensitivity of my cell compared to condition A?

Thank you!

zqun1 avatar Mar 14 '25 19:03 zqun1

Hi, @zqun1

Instead of running scRank separately for each dataset, I suggest treating each condition as a distinct cell state within the same cell type and running scRank on the combined dataset. This ensures that perturbation scores are calculated on networks with the same gene featuers, making them more comparable.

Here’s how you can modify your Seurat object before running scRank:

  1. Ensure that your metadata contains both cell_type and condition.

  2. Create a new metadata column that combines cell_type and condition to define unique cell states:

combined_obj$cell_state <- paste0(combined_obj$cell_type, "_", combined_obj$condition)
  1. Run scRank using this new cell_state column as the cluster identity:
scRank_obj <- CreateScRank(input = combined_obj,
                    cell_type = 'cell_state',
                    ...)

Lee0498 avatar Mar 15 '25 03:03 Lee0498

Thank you @Lee0498 ! This is a nice workaround. Do you plan to implement a "subset" or "split" function for scRank objects? For example in my case, after calculation I want to plot_dim the results. But I don't want to plot all combinations of cell_type and condition in one plot. Splitting each combination and plot in different panels would make the visualization more interpretable, while still keeping the same scoring scale.

zqun1 avatar May 30 '25 13:05 zqun1

Hi @zqun1, thanks for your feedback!

We’ve added a subsetScRank() function for scRank objects, which allows you to subset the object based on metadata fields — similar to the subset() function in Seurat. You can install the latest version to try it out.

For example, to plot only cells in a specific condition:

plot_dim(subsetScRank(scRank_obj, condition == "group1"))

Lee0498 avatar Jun 05 '25 14:06 Lee0498