Hi all,
Making a new post following on from a previous post (as people’s roles may have changed in the meantime and I don’t want to cause them unnecessary noise)
I am working on maintaining the Brainrender tool. From what I understand in the post, Brainrender relied on a cache of some AIBS streamline data from experiment 174957972 hosted at https://neuroinformatics.nl/HBP/allen-connectivity-viewer/json/streamlines_174957972.json.gz .
However, this URL now returns 403 Forbidden
(see this Brainrender issue for more details)
I am wondering
is there now a way to easily download the streamline data from Python (ideally again as a compressed JSON file)?
if not, would it be OK to manually download the data and host it on the BrainGlobe GIN server instead of the out-dated cache?
Any advice is appreciated!
1 Like
As a new user I couldn’t post more than two links in one post, so linking the previous post this follows on from in this comment.
Same question here, but I wonder whether one can use a post request to access this link: https://neuroinformatics.nl/HBP/allen-connectivity-viewer/streamline-downloader.html
Just bumping this, does anybody know the best way to retrieve the streamlines for a specific experiment?
I have repackaged this data from the server into a new format…a “precomputed” skeleton format that is compatible with neuroglancer and for which there is a python library that is available for reading.
here is a neuroglancer link: Neuroglancer
[click login at bottom of screen to unshorten link]
the precomputed source location from the link is: precomputed://gs://allen_neuroglancer_ccf/allen_mesoscale
I would use the python library cloud-volume to access this bucket and pull streamlines skeletons for each of the experiments. GitHub - seung-lab/cloud-volume: Read and write Neuroglancer datasets programmatically.
here is an example snippet…
import cloudvolume
cv = cloudvolume.CloudVolume(‘precomputed://gs://allen_neuroglancer_ccf/allen_mesoscale’, use_https=True)
streamline = cv.skeleton.get(479983421)
Streamline has vertices in nanometers and edges as indices into the vertices, and if you perform connected components analysis of each graph you will find each streamline is a different component.
if you don’t want to use python you can get the steamline at this https address pattern.
https://storage.googleapis.com/allen_neuroglancer_ccf/allen_mesoscale/skeleton/[EXPERIMENT_ID]
The resulting binary needs to be interpreted according to the precomputed format
# Skeleton representation of segmented objects
A skeleton representation of some or all segmented objects may be specified as a directory tree
consisting of the following files:
- `info` file in JSON format specifying the [metadata](#skeleton-info-json-file-format).
- For each segment ID for which there is a skeleton representation, a segment data file specifying
the [encoded skeleton](#encoded-skeleton-file-format) for a single segment.
The actual storage of the manifest and mesh fragment data depends on whether the unsharded or
[sharded](./sharded.md) format is used.
## Skeleton info JSON file format
The `info` file is a JSON-format text file. The root value must be a JSON object with the following
members:
- `"@type"`: Must be `"neuroglancer_skeletons"`.
- `"transform"`: JSON array of 12 numbers specifying a 4x3 homogeneous coordinate transform from the
"stored model" coordinate space to a "model" coordinate space. The "stored model" coordinate
This file has been truncated. show original
the reference info file for this dataset can be found here
https://storage.googleapis.com/allen_neuroglancer_ccf/allen_mesoscale/skeleton/info
2 Likes
Thanks @fcollman , much appreciated.