pachterlab / kallistobustools

kallisto | bustools workflow for pre-processing single-cell RNA-seq data
https://kallistobus.tools/
MIT License
115 stars 30 forks source link

.h5ad file does not contain layers spliced and unspliced #61

Open mdu4003 opened 5 months ago

mdu4003 commented 5 months ago

Hello, I am trying to run scvelo in snRNAseq. I used kb-python to prepare the counts from my fastq data. I generated an index using—-workflow nucleus, and I ran kb count with that workflow, too. This is my code:

kb count -i INDEX_mm39_nucleus/index.idx -g INDEX_mm39_nucleus/transcripts_to_genes.txt -x 10xv3 --workflow nucleus --h5ad -c1 INDEX_mm39_nucleus/cdna_transcripts_to_capture.txt -c2 INDEX_mm39_nucleus/intron_transcripts_to_capture.txt -t 20 -m 64G ../scRNAseq/raw/TCD36_PL/TCD36_S1_L001_R1_001.fastq.gz ../scRNAseq/raw/TCD36_PL/TCD36_S1_L001_R2_001.fastq.gz -o /kbcount/TCD36kb_PL

When I load the unfiltered adata.h5ad using: adata_Epi_TCD35_P = ad.read_h5ad("TCD36kb_PL/counts_unfiltered/adata.h5ad", chunk_size=100000) The object has 0 layers adata_Epi_TCD35_P Out[48]: AnnData object with n_obs × n_vars = 272419 × 33696

Do you have any ideas on why this is happening, please?

I am using:

packages in environment at /home/mdu4003/.conda/envs/kbpython:

#

Name Version Build Channel

_libgcc_mutex 0.1 main
anndata 0.8.0 pypi_0 pypi attrs 22.2.0 pypi_0 pypi beautifulsoup4 4.11.2 pypi_0 pypi bleach 6.0.0 pypi_0 pypi ca-certificates 2023.01.10 h06a4308_0
certifi 2022.12.7 py39h06a4308_0
charset-normalizer 3.1.0 pypi_0 pypi click 8.1.3 pypi_0 pypi contourpy 1.0.7 pypi_0 pypi cycler 0.11.0 pypi_0 pypi defusedxml 0.7.1 pypi_0 pypi fastjsonschema 2.16.3 pypi_0 pypi fonttools 4.39.1 pypi_0 pypi h5py 3.8.0 pypi_0 pypi idna 3.4 pypi_0 pypi importlib-metadata 6.0.0 pypi_0 pypi importlib-resources 5.12.0 pypi_0 pypi jinja2 3.1.2 pypi_0 pypi joblib 1.2.0 pypi_0 pypi jsonschema 4.17.3 pypi_0 pypi jupyter-client 8.0.3 pypi_0 pypi jupyter-core 5.2.0 pypi_0 pypi jupyterlab-pygments 0.2.2 pypi_0 pypi kb-python 0.28.2 pypi_0 pypi kiwisolver 1.4.4 pypi_0 pypi ld_impl_linux-64 2.38 h1181459_1
libffi 3.3 he6710b0_2
libgcc-ng 9.1.0 hdf63c60_0
libstdcxx-ng 9.1.0 hdf63c60_0
llvmlite 0.39.1 pypi_0 pypi loompy 3.0.7 pypi_0 pypi markupsafe 2.1.2 pypi_0 pypi matplotlib 3.7.1 pypi_0 pypi mistune 2.0.5 pypi_0 pypi natsort 8.3.1 pypi_0 pypi nbclient 0.7.2 pypi_0 pypi nbconvert 7.2.10 pypi_0 pypi nbformat 5.7.3 pypi_0 pypi ncurses 6.3 h7f8727e_2
networkx 3.0 pypi_0 pypi ngs-tools 1.8.5 pypi_0 pypi numba 0.56.4 pypi_0 pypi numpy 1.23.5 pypi_0 pypi numpy-groupies 0.9.20 pypi_0 pypi openssl 1.1.1t h7f8727e_0
packaging 23.0 pypi_0 pypi pandas 1.5.3 pypi_0 pypi pandocfilters 1.5.0 pypi_0 pypi patsy 0.5.3 pypi_0 pypi pillow 9.4.0 pypi_0 pypi pip 23.0.1 py39h06a4308_0
platformdirs 3.1.1 pypi_0 pypi plotly 5.13.1 pypi_0 pypi pygments 2.14.0 pypi_0 pypi pynndescent 0.5.8 pypi_0 pypi pyparsing 3.0.9 pypi_0 pypi pyrsistent 0.19.3 pypi_0 pypi pysam 0.20.0 pypi_0 pypi python 3.9.12 h12debd9_1
python-dateutil 2.8.2 pypi_0 pypi pytz 2022.7.1 pypi_0 pypi pyzmq 25.0.1 pypi_0 pypi readline 8.1.2 h7f8727e_1
requests 2.28.2 pypi_0 pypi scanpy 1.9.3 pypi_0 pypi scikit-learn 1.2.2 pypi_0 pypi scipy 1.10.1 pypi_0 pypi seaborn 0.12.2 pypi_0 pypi session-info 1.0.0 pypi_0 pypi setuptools 65.6.3 py39h06a4308_0
shortuuid 1.0.11 pypi_0 pypi six 1.16.0 pypi_0 pypi soupsieve 2.4 pypi_0 pypi sqlite 3.38.5 hc218d9a_0
statsmodels 0.13.5 pypi_0 pypi stdlib-list 0.8.0 pypi_0 pypi tenacity 8.2.2 pypi_0 pypi threadpoolctl 3.1.0 pypi_0 pypi tinycss2 1.2.1 pypi_0 pypi tk 8.6.12 h1ccaba5_0
tornado 6.2 pypi_0 pypi tqdm 4.65.0 pypi_0 pypi traitlets 5.9.0 pypi_0 pypi typing-extensions 4.5.0 pypi_0 pypi tzdata 2022g h04d1e81_0
umap-learn 0.5.3 pypi_0 pypi urllib3 1.26.15 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi wheel 0.38.4 py39h06a4308_0
xz 5.2.5 h7f8727e_1
zipp 3.15.0 pypi_0 pypi zlib 1.2.12 h7f8727e_2

Thank you very much!

mdu4003 commented 5 months ago

I started from scratch with newest kb-python installation and I generated the index using workflow nac. I used also this workflow to generate the counts from my snRNAseq. Now I do have the layers, but instead of spliced and unspliced, I have ambiguous, nascent and mature. How can I change the names here to use scvelo later? scvelo is looking for unsplcied and spliced. Thanks!

mdu4003 commented 5 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.