SCP icon indicating copy to clipboard operation
SCP copied to clipboard

Error running scVelo and PAGA

Open bapoorva opened this issue 1 year ago • 2 comments

Hi,

I have a single cell dataset that was processed using Seurat. So my suerat object has an SCT assay well and the dimensions are different from the RNA assay. When i run RunPAGA or RunSCVELO, I'm getting the following error.

>scrna <- RunPAGA(
  srt = scrna, group_by = "var_cluster",
  linear_reduction = "PCA", nonlinear_reduction = "UMAP", return_seurat = TRUE
)
Assay 'SCT' is in the srt object but not converted.
Assay 'ambiguous' is in the srt object but not converted.
Error in py_set_attr_impl(x, name, value) : 
  ValueError: Value passed for key 'spliced' is of incorrect shape. Values of layers must match dimensions (0, 1) of parent. Value had shape (7227, 18401) while it should have had (7227, 55361).

Can you help me out with this please ?

bapoorva avatar Nov 01 '22 18:11 bapoorva

RunPAGA or RunSCVELO use the "RNA" assay as an "X" matrix in anndata by default. I found that your "spliced" assay has 18401 features, which may be a subset of the full features in the "RNA" assay. If these features are the same as in the SCTassay, then you can specify assay_X="SCT"

zhanghao-njmu avatar Nov 02 '22 03:11 zhanghao-njmu

I found that feature numbers being different between assays would cause the adata conversion to fail. In the latest version, I have solved this problem. And added the example of SCT assay for scvelo. Please refer to the RunSCVELO documentation. @bapoorva

zhanghao-njmu avatar Nov 04 '22 23:11 zhanghao-njmu