JingyiGF / HERBS

MIT License
18 stars 15 forks source link

Issue downloading Allen mice atlas #12

Open dcupolillo opened 1 year ago

dcupolillo commented 1 year ago

Hello!

I post this in case anyone run in the same issue.

I had no problems installing herbs (0.0.17) using pip on Anaconda3 on Windows 10 (Python 3.10.4). However, I am having troubles when downloading the Allen mice atlas (slice thickness 10 µm).

Following the cookbook, on the GUI window, I ran the first 'Download', then 'Download meshes'. It was unclear to me what to do when asked to fill in the 'Bregma coordinates (voxel)' (the download meshes bar remains at 0%) so I left them at 0, 0, 0 and then ran 'Process'. After a while, I get the following error on the Anaconda prompt:

Traceback (most recent call last):
File "C:\Users\Barberis_LAB\Anaconda3\envs\herbs\lib\site-packages\herbs\allen_downloader.py", line 106, in run
shutil.copyfile(join(mesh_path, '997.pkl'), target)
File "C:\Users\Barberis_LAB\Anaconda3\envs\herbs\lib\shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Barberis_LAB/Anaconda3/envs/herbs/Lib/site-packages/herbs/atlas\\meshes\\997.pkl'

I tried several times, the issue is always the same although the missing .pkl file has been different (and consequently the process bar gets stuck at different %). I tried waiting for some hours, until I eventually close the process.

image

Thank you for your work!

JingyiGF commented 1 year ago

Hmmmmm, downloading all meshes do take some time. Could you please wait until all files are downloaded and then start processing the atlas raw data? According to the Allen webpage Q&A, Allen mouse ccf has no Bregma coordinates. If you are super familiar with your brain data and know approximately where the Bregma locates on Allen ccf, you can set it. Otherwise, leave it as 0, 0, 0, the internal calculating will consider the middle point as origin.

I personally strongly recommend that users download and store atlases outside of herbs code folder. that is, users need to choose a folder or create a new folder somewhere else than HERBS!!!

And please save different atlases into different folders.

Virginia9733 commented 1 year ago

Hi there, I am facing a similar issue. Downloading Mesh for over two hours, but the progress bar didn't change at all. There is no error message though, I have tried it two times, but it still seems like something is going wrong. HERBS-download Allen Mice Atlas1

JingyiGF commented 1 year ago

Hi @Virginia9733, I wonder if you clicked the download mesh button before the first 2 files are finished or not? Could you please list the steps you did according? For example, first download the atlas data and wait until it finishes. Second, click download mesh button to download meshes.

JingyiGF commented 1 year ago

Hi @Virginia9733, I wonder if you clicked the download mesh button before the first two files finished downloading? Could you please list the steps you did?

Virginia9733 commented 1 year ago

Thank you so much for your reply! Yes, that's exactly what I did. I waited until the first two finished downloading, then press the button to download mesh, then till now it's over 3 hours, nothing changed. Also, the anaconda prompt did not show any error messages.

dcupolillo commented 1 year ago

Hello! If I understood correctly, when you download meshes, the download progress is not shown. For instance in my case, I clicked the 'process' button before the download meshes was actually finished.

In a second attempt, I checked the download time in the folder where the meshes were saved. For Allen brain atlas in the end it was 671 .obj files. When I realized it wasn't downloading anything more, I clicked the 'process' button and from there it was ok.

I hope this can help.

Virginia9733 commented 1 year ago

Thanks! It works! Actually the mesh finished downloading 1 hour ago, like you said the final file size is 671. Now the Process is in progress, 76%, fingers crossed! Thanks!

JingyiGF commented 1 year ago

Thanks for the update. I will limit the click ability of all buttons. I never tried clicking buttons without finishing the previous steps. I see the problems now. Thanks for the updating again. It was a mystery for me for some time.

dcupolillo commented 1 year ago

Thank you for the work! For me it was misleading the fact that the cookbook says that downloading meshes takes some time, but nothing tells you when it is done or that it is in fact ongoing. So I ended up waiting for hours, or thinking I had to click 'process' for it to start.