Closed adamltyson closed 3 months ago
Interesting! I can't reproduce this on either my Macbook or my Ubuntu desktop, in a clean conda environmen with a pip install git+
from current main
branch 🤔
Could it be that you have a dev install of the BG atlas API in your env @adamltyson ?
I can reproduce on macOS with:
rm -rfv ~/.brainglobe/kim_dev*
micromamba create --name bg-atlastest -c conda-forge python=3.10 napari -y
micromamba activate bg-atlastest
pip install git+https://github.com/brainglobe/brainglobe-napari
napari
Plugins
-> BrainGlobe Atlas Viewer
kim_dev_mouse_idisco_10um
Bgatlas_api: kim_dev_mouse_idisco_10um not found locally. Downloading...
which takes a while.I'm guessing it's something wrong/different with these atlases, but I don't know why I can reproduce and you can't.
why is it called kim_mouse_idisco_10um
for you and kim_mouse_10um
for me?
Do we have different versions of the bg-atlasapi
? I have 1.0.2 from pypi
FWIW I can type the commands above into a terminal (with mamba
instead of micromamba
but that shouldn't matter?), click on the first kim
atlas and get:
Ah, mystery solved, these are different atlases. I should have been more specific with my original message. kim_mouse_10um
works, but any atlas starting with kim_dev
doesn't. The Kim lab have made a lot of atlases!
Locally, I don't get any kim_dev
atlases - is that because they are not included in the bg-atlasapi
version I have?
Huh. The version shouldn't make any difference. What's the output of brainglobe list
?
Never mind... I was silly :joy: didn't scroll down far enough :flushed: I can reproduce! :tada:
This can be reproduced without napari or the widget by
from bg_atlasapi import BrainGlobeAtlas
atlas = BrainGlobeAtlas("kim_dev_mouse_stp_10um")
print(atlas)
The problem is that metadata["citation"].split(", ")
for this atlas returns a list with 6 elements:
['Kim', 'Yongsoo (2022)', '“KimLabDevCCFv001”', 'Mendeley Data', 'V1', 'doi: 10.17632/2svx788ddf.1']
, but L27 of bg_atlasapi.utils
expects just 2 elements.
For reference, the same line metadata["citation"].split(", ")
for the allen_mouse_100um
atlas at the same point in the code looks like:
['Wang et al 2020', 'https://doi.org/10.1016/j.cell.2020.04.007']
Ultimately, I think this is a problem with the kim_dev_...
atlas itself, specifically, the metadata.json
file
Closed by #304
Not sure if this is an error with the atlas, my machine or the plugin, but I noticed that loading all the
kim_dev
atlases cause an error.Full traceback
``` --------------------------------------------------------------------------- ValueError Traceback (most recent call last) File ~/projects/brainglobe/brainglobe-napari/src/brainglobe_napari/atlas_viewer_widget.py:130, in AtlasViewerWidget.__init__.