Hi – I’m having a challenge reshaping the 1D density ISH data into 3D for Developing Mouse Brain.
Here’s an example (in python) for the Lgals1 gene for Dev Mouse Brain – p28:
- Download the p28 density data from the API using this call: https://api.brain-map.org/grid_data/download/100040756?include=density
- Save into a numpy array called ‘density_1d’. The array has a length of 158,629 (which corresponds to the 1D version of the 73x41x53 3D voxel space.
- Reshape into 3D via this code: density_3d = np.reshape(density_1d, (73, 41, 53))
Attached are visualizations of the 1D array and the 3D reshaped array:
The 3D visualization should look much more like a brain, but it looks like noise, suggesting that the reshape/transformation failed. Can you help suggest how to properly reshape into 3D?
Thanks for any help you can give!
Also, I’m curious why the 1D array doesn’t have any data above voxel 80,000? I found that the density files for all of the 2,000 genes in p28 developing mouse brain had no data above voxel 110,000. Does it have to do with the shape of the brain?