fix: replace dead streamlines URL with Allen mesoscale connectivity via cloud-volume#438
fix: replace dead streamlines URL with Allen mesoscale connectivity via cloud-volume#438AdityaGupta716 wants to merge 5 commits intobrainglobe:mainfrom
Conversation
|
Hey @alessandrofelder @adamltyson, please review! |
|
Thanks for raising this @AdityaGupta716. This seems like a fairly big change, could you add some tests? Also could you make sure this works locally for you before asking reviewers to check it? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
==========================================
+ Coverage 86.60% 87.90% +1.29%
==========================================
Files 27 27
Lines 1239 1281 +42
==========================================
+ Hits 1073 1126 +53
+ Misses 166 155 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @adamltyson, I've added unit tests with mocked I/O covering the main functions and also verified it works locally — attached a screenshot of the render for experiment , you can see the brain mesh, injection site, and streamlines all coming through correctly. Let me know if there's anything else you'd like me to change!
|

What does this PR do?
Fixes the broken streamlines functionality by replacing the defunct
neuroinformatics.nl cache with the official Allen mesoscale connectivity
dataset hosted on Google Cloud Storage.
Why is this needed?
Closes #266
The URL
https://neuroinformatics.nl/HBP/allen-connectivity-viewer/json/streamlines_*.json.gzreturns 403 Forbidden. This was a third-party cache that is no longer maintained.
Changes
precomputed://gs://allen_neuroglancer_ccf/allen_mesoscaleaccessed via
cloud-volume— the official source recommended by AIBS (@fcollman)get_streamlines_data()to fetch skeleton data usingcloudvolume.CloudVolume_skeleton_to_dataframe()to convert the new precomputed skeleton format(vertices in nm + edges) back to the
{"x", "y", "z"}dict format expected byStreamlines._make_mesh()y = 8000 - y) to convert from Allen CCF PIR space tobrainrender's ASR orientation
_get_injection_site_um()to fetch real injection coordinates from the AllenBrain Atlas API (
ProjectionStructureUnionize) instead of using an approximationcloud-volumetopyproject.tomldependenciesforce_downloadflagHow was this tested?
StreamlinesactorIs this a breaking change?
No — the public API (
get_streamlines_data,get_streamlines_for_region) is unchanged.The output DataFrame format is identical to the old format.
Does this require a documentation update?
Yes — users will need
cloud-volumeinstalled. This is now listed as a dependencyin
pyproject.tomlso it will be installed automatically.