rmarkello / abagen

A toolbox for working with Allen Human Brain Atlas microarray expression data
https://abagen.readthedocs.io
BSD 3-Clause "New" or "Revised" License
93 stars 41 forks source link

Problems downloading microarray data #207

Closed njh339 closed 1 year ago

njh339 commented 2 years ago

Dear Abagen Team,

Thank you for creating this wonderful resource. It must have been a huge amount of work

I'm trying to download the microarray data using files = abagen.fetch_microarray(donors='all') but it is throwing an error I haven't been able to resolve. I think the zip files might be corrupted somehow and that's why they are not fetching? The microarray file is empty so I can't try unzipping the or repairing the files manually - I think it might be the files are compromised somehow? Otherwise there maybe some sort of bug in the code.

this is what prints to screen:

files = abagen.fetch_microarray(donors='all') Downloading data from https://human.brain-map.org/api/v2/well_known_file_download/178238387 ... Downloaded 425988059 of 425988059 bytes (100.0%, 0.0s remaining) ...done. (195 seconds, 3 min) Extracting data from /Users/judithharrison/abagen-data/microarray/9f51a604a582b13fb1d4dd71e4747903/normalized_microarray_donor9861/donor9861.zip..... done. Downloading data from https://human.brain-map.org/api/v2/well_known_file_download/178238373 ... Downloaded 375850472 of 400957002 bytes (93.7%, 40.7s remaining) ...done. (611 seconds, 10 min) Error uncompressing file: [Uncompress] unknown archive file format: /Users/judithharrison/abagen-data/microarray/9f51a604a582b13fb1d4dd71e4747903/normalized_microarray_donor10021/donor10021.zip Extracting data from /Users/judithharrison/abagen-data/microarray/9f51a604a582b13fb1d4dd71e4747903/normalized_microarray_donor10021/donor10021.zip...Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/abagen/datasets/fetchers.py", line 148, in fetch_microarray files = _fetch_files(data_dir, files, resume=resume, verbose=verbose) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/abagen/datasets/utils.py", line 532, in _fetch_files raise IOError('Fetching aborted: ' + abort) OSError: Fetching aborted: [Uncompress] unknown archive file format: /Users/judithharrison/abagen-data/microarray/9f51a604a582b13fb1d4dd71e4747903/normalized_microarray_donor10021/donor10021.zip quit() newhuaweiapstaff-10-50-108-28:Python_files judithharrison$ cd /Users/judithharrison/abagen-data/microarray/ newhuaweiapstaff-10-50-108-28:microarray judithharrison$ ls newhuaweiapstaff-10-50-108-28:microarray judithharrison$ ls

Thank you for your help,

Jude

lenachenpumc commented 2 years ago

I had similar problems downloading microarray data. I downloaded the files from AHBA website and then unzipped the files into one specify file. I run "files = abagen.fetch_microarray(donors=['9861', '10021', '12876', '14380', '15496', '15697'], data_dir='xxx') "(XXX refers to the document address). Hope this can help you.

liuzhenqi77 commented 1 year ago

Thanks for reporting the issue. We have received issues like this before but we haven't been able to reproduce it reliably. It might be related to network connection stability. In this case, we recommend downloading the files from ahba website directly and place them in the corresponding directory. Meanwhile, please feel free to provide more details to help debug this issue. Thank you!

psyzxy commented 5 months ago

import abagen files = abagen.fetch_microarray(data_dir='D:/AHBAdata/', donors='all') I also encounter this problem,when I have downloaded the data and unziped before in "D:/AHBAdata/", but when I use this code,it started downloading again. How can I solve it?