theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
400 stars 103 forks source link

scv.read(adata.h5ad) does not load spliced and unspliced layers #1242

Closed mdu4003 closed 2 months ago

mdu4003 commented 2 months ago

Hello,

I am trying to do scvelo analysis on snRNAseq. I prepared the adata.h5ad using kb-python with a index built with the --workflow nucleus. I used that workflow also in kb count. The log shows that both matrixes are generated and combined in the adata.h5ad file. But when I read it with scv.read, the object shows 0 Layers. ... This is the log for the counting: TCD_sn_KB.out.8877564.txt

This is the command in scvelo: adata_Epi_TCD35_P = scv.read("/Users/diazmeco/Desktop/SCU/TCD35kb_P/counts_unfiltered/adata.h5ad", chunk_size=100000) adata_EpiTCD35 AnnData object with n_obs × n_vars = 182745 × 33696 obs: 'n_genes'

This is my scvelo: scvelo.txt

Thank you very much! Best regards, Angeles

mdu4003 commented 2 months ago

I started from scratch with new version of kb-python and workflow=nac. The only issue now is that I have nascent (unspliced) and mature (spliced) which are not recognized by scv.pp.filter_and_normalize. scv.pp.filter_and_normalize(adata_Epi_TCD35_P_filt, min_shared_counts=20, n_top_genes=2000) WARNING: Could not find spliced / unspliced counts.

Do you have any solution? Should we re-name the layers somehow? Thanks!

mdu4003 commented 2 months ago

I copied the layers with a new name: adata_filt.layers["unspliced"] = adata_filt.layers["nascent"] adata_filt.layers["spliced"] = adata_filt.layers["mature"] It seems to be solved. Can you add a modification for scvelo to recognize this new nomenclature?

WeilerP commented 2 months ago

Won't be implemented for now.