allensdk=0.12.4
so we will update our code first.
Hi, I think that the problem that marmaduke is talking depends on the function mcc.get_structure_mask(ID)
I update allensdk to the recent version (0.14.3) however when I run that function in a loop for several ID (almost all the ids that represent a primary injection structure), after a while I get the following error:
10112017-11-30 11:55:28,942 allensdk.api.api.retrieve_file_over_http INFO Downloading URL: http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/structure_masks/structure_masks_100/structure_934.nrrd
INFO:allensdk.api.api.retrieve_file_over_http:Downloading URL: http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/structure_masks/structure_masks_100/structure_934.nrrd
2017-11-30 11:55:29,606 allensdk.api.api.retrieve_file_over_http ERROR Couldn't retrieve file /dat1/francesca/PythonScript/Allen_data/annotation/ccf_2017/structure_masks/resolution_100/structure_934.nrrd from http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/structure_masks/structure_masks_100/structure_934.nrrd (request).
ERROR:allensdk.api.api.retrieve_file_over_http:Couldn't retrieve file /dat1/francesca/PythonScript/Allen_data/annotation/ccf_2017/structure_masks/resolution_100/structure_934.nrrd from http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/structure_masks/structure_masks_100/structure_934.nrrd (request).
2017-11-30 11:55:29,608 allensdk.api.api.retrieve_file_over_http ERROR We weren't able to download a structure mask for structure {0}.
You can instead build the mask locally using
ReferenceSpace.many_structure_masks
ERROR:allensdk.api.api.retrieve_file_over_http:We weren't able to download a structure mask for structure {0}.
You can instead build the mask locally using
ReferenceSpace.many_structure_masks
We are using that function since we need an efficient way to get the volume of each injection structure, how can I fix the problem? Or there is another way to get the volume information for each structure?
thanks
get_projection_matrix
, which does not require structure masks, so I expect that's a different issue.
from allensdk.core.mouse_connectivity_cache import MouseConnectivityCache
mcc = MouseConnectivityCache(manifest_file='mcc/manifest.json')
exps = mcc.get_experiments(injection_structure_ids=[934])
len(exps) == 0 # this is true
# just to be safe, let's crawl through the experiments
exps = mcc.get_experiments()
for exp in exps:
injection_ids = [ inj['id'] for inj in exp['injection-structures']]
if 934 in injection_ids:
print(exp) # this never happens