Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hyjforesight opened this issue Dec 1, 2021 · 1 comment

Comments

@hyjforesight
Copy link

hyjforesight commented Dec 1, 2021

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
Copy link
Owner

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

YH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants