huangyh09 / brie

BRIE: Bayesian Regression for Isoform Estimate in Single Cells
https://brie.readthedocs.io
Apache License 2.0
41 stars 15 forks source link

UnboundLocalError: local variable 'adata' referenced before assignment #38

Open hyjforesight opened 2 years ago

hyjforesight commented 2 years ago

Hello BRIE2, Thanks for this amazing package! I'm using the loom file as input, but it generates errors as below. Also tried on py3.7, doesn't work. Environment: Python 3.8, Ubuntu 20.04 LTS Could you please help me with this issue? Thanks! Best, YJ

(base) hyjforesight@W10D-GW97ZC3:~$ brie-quant -i /home/hyjforesight/loom/cellsorted_WT_IEC_G123B.loom -o /home/hyjforesight/brie2/brie_quant_cell.h5ad -c /home/hyjforesight/WT_IEC_barcodes.tsv --interceptMode=gene --LRTindex=All --layers spliced,unspliced 2021-11-30 18:49:53.274751: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2021-11-30 18:49:53.275065: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "/home/hyjforesight/miniconda3/bin/brie-quant", line 8, in sys.exit(main()) File "/home/hyjforesight/miniconda3/lib/python3.8/site-packages/brie/bin/quant.py", line 213, in main quant(options.in_file, options.cell_file, options.gene_file, File "/home/hyjforesight/miniconda3/lib/python3.8/site-packages/brie/bin/quant.py", line 53, in quant _idx = brie.match(adata.obs.index, dat_tmp[1:, 0]).astype(float) UnboundLocalError: local variable 'adata' referenced before assignment

huangyh09 commented 2 years ago

Hi, BRIE2 doesn't support the .loom file yet. You have to convert it to a .h5ad file (AnnData) first.

YH