Brain Street View 
Load and plot Allen Connectivity Data (Oh et al., Nature, 2014)
Available in both MATLAB and Python.
🏁 Quick start
Python (recommended):
pip install brain-street-view
Then open example.ipynb or run example.py. The first run downloads images from the Allen API and caches them locally. Subsequent runs load from cache.
MATLAB:
See the script gettingStarted.mlx. Requires MATLAB>=2019a.
⚒️ Installation
Python
pip install brain-street-view
Or from source:
git clone https://github.com/Julie-Fabre/brain_street_view.git
cd brain_street_view
pip install -e .
You also need the Allen CCF atlas files (not included):
- allenCCF — annotation volumes and structure trees
MATLAB
- Clone the repository and the dependencies below.
- Add BrainStreetView's and the dependencies' folders to MATLAB's path.
MATLAB dependencies:
- allenCCF, to get Allen Atlas files
- npy-matlab, to read in .npy files
- brewermap, to generate colormaps
- prettify-matlab, to make plots pretty.
📖 Usage
Python
import bsv
# 1. Find experiments
experiment_ids = bsv.find_connectivity_experiments(['VISp', 'VISl'])
# 2. Fetch data
imgs, inj_summary, _, _ = bsv.fetch_connectivity_data(
experiment_ids, '/path/to/cache', '',
'injectionIntensity', False,
allen_atlas_path='/path/to/allenCCF')
# 3. Plot projections to striatum
bsv.plot_connectivity(imgs, '/path/to/allenCCF', 'CP',
10, 15, 'coronal', True, 2, 'global', None,
'injectionIntensity')
# 4. 3D visualization
bsv.plot_connectivity_3d(inj_summary, '/path/to/allenCCF', 'CP',
plot_patch=True)
See example.ipynb for the full workflow including region grouping, thresholding, and CP subregion analysis.
MATLAB
% 1. Find experiments
experimentIDs = bsv.findConnectivityExperiments({'VISp', 'VISl'});
% 2. Fetch data
[experimentImgs, injectionSummary] = bsv.fetchConnectivityData(experimentIDs, ...
saveLocation, fileName, 'injectionIntensity', false, '', allenAtlasPath);
% 3. Plot
bsv.plotConnectivity(experimentImgs, allenAtlasPath, 'CP', 10, 15, ...
'coronal', true, 2, 'global', [], 'injectionIntensity')
See +bsv/example.m for the full MATLAB workflow.
🖼️ Gallery
- projections from visual cortices to striatum: injection sites and striatum plotted in 3D
- example injections in primary visual cortex (VISp)
- example injections in antero-lateral visual cortex (VISal)
- projections from visual cortices (VIS) to striatum (CP)
📬 Contact me
If you run into any issues or if you have any suggestions, please raise a github issue, create a pull request or email me: juliemfabre[at]gmail[dot]com.
Metadata
Release files for brain-street-view 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brain_street_view-0.1.1.tar.gz | 8.9 MB | Without provenance | Details for brain_street_view-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brain_street_view-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for brain_street_view-0.1.1-py3-none-any.whl |
Total release size: 9.0 MB
Release files / brain_street_view-0.1.1.tar.gz
| Download URL | brain_street_view-0.1.1.tar.gz |
|---|---|
| Size | 8.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
903ef385022f3d5b1ca3df06bedc7becbfbac15ea6bb3b2f7c2ea5966c201765
|
|
BLAKE2b-256 checksum How to use checksums |
71eebc4c595cdf30cf8e63a9df76d89ab16d86e2108fdd3d12aec54afc426cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Release files / brain_street_view-0.1.1-py3-none-any.whl
| Download URL | brain_street_view-0.1.1-py3-none-any.whl |
|---|---|
| Size | 74.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f61f99751e07d959b24f51f60c8621b2daa593d697d693ec4caf0e7cb568ba1
|
|
BLAKE2b-256 checksum How to use checksums |
27ee655c53d52d5e5e39f30394cdccb5cedaee92b9f4096f203063c6e67609bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.7
|
Security for brain-street-view 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.