https://github.com/brainglobe/brainglobe-ccf-translator
A tool for translating between common coordinate frameworks using deformation matrices.
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: biorxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Repository
A tool for translating between common coordinate frameworks using deformation matrices.
Basic Info
- Host: GitHub
- Owner: brainglobe
- License: mit
- Language: Python
- Default Branch: main
- Size: 13.2 MB
Statistics
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 11
- Releases: 0
Metadata Files
README.md
brainglobe-ccf-translator
CCF translator (brainglobe-ccf-translator) is a tool for translating between common coordinate frameworks using deformation matrices. A longstanding problem in NeuroInformatics has been the inability to easily translate data between common coordinate frameworks. CCF translator aims to solve this. By connecting each new space to an existing one, we can construct a graph of deformations. This means that data can be translated as long as there is a route from one space to another, even if that route passes through multiple other spaces. Now, when new templates for new modalities, strains, or ages are released, users will not be subdivided into unrelated spaces. As long as they are connected to a space which exists in our network, they will be fully connected to all other spaces.
CCF translator can also interpolate between spaces and create a new intermediate space. This is primarily useful for development, where, for instance, the midpoint between day 5 and day 7 can be taken and used as a postnatal day 6 reference. It could also be useful for making references of disease progression.

Use Cases
One way you can use CCF translator is to view data from one space, in another space. For instance the allen connectivity dataset shows projections from viral tracing studies in the adult brain. We can take any of these projection datasets and view them in the developing brain, for instance post natal day 9.

Installation
CCF translator can be installed by running
pip install brainglobe-ccf-translator
Currently supported spaces
the name in CCF translator aims to copy the name of atlases in the brainglobeatlasapi when possible. | Framework Name | name in api | supported age range | -------------- | ----------- | ----------- | Allen mouse CCFv3 | allenmouse | 56 | Demba developmental mouse | dembadevmouse| 4-56 | Gubra lightsheet mouse | perenslsfmmouse| 56 | Gubra MRI mouse | perensmrimouse| 56 | Gubra STPT mouse | perensstptmouse| 56 | Princeton lighsheet mouse | princeton_mouse| 56
Usage
Transforming points To take a coordinate in one volume and find the equivalent coordinate in a second volume is quite simple in CCF translator. ```python import numpy as np import brainglobeccftranslator
points = np.array([(286,250,267), (414,247,452)]) pset = brainglobeccftranslator.PointSet(points, 'dembadevmouse', voxelsizemicron=20, agePND=56) pset.transform(targetage=56, targetspace='allenmouse') print(f"new points are {pset.values}")
new points are [[267 250 286] [452 247 414]]
```
Transforming volumes
To run the volume examples you will want to install brainglobe-atlasapi using the following
pip install brainglobe-atlasapi
Transforming a volume is equally simple, here we get the volume from the brainglobe api, but you can load it however you like. In the Demba space the valid ages are from 4 to 56, and all of these are valid targets for transformation. ```python from brainglobeatlasapi.bgatlas import BrainGlobeAtlas import brainglobeccftranslator
voxelsizemicron = 10 spacename = r"allenmouse" atlas = BrainGlobeAtlas("{spacename}{voxelsizemicron}um") sourceage = 56 targetage= 32
ccftvol = brainglobeccftranslator.Volume( values = atlas.reference, space = 'allenmouse', voxelsizemicron=voxelsizemicron, segmentationfile=False, agePND = source_age )
ccftvol.transform(targetage, 'dembadevmouse') ccftvol.save(rf"demodata/P{targetage}template{voxelsize_micron}um.nii.gz") ```
Contributing
If you would like to add a new space or connect an existing one, please create a deformation matrix and/or describe the required reorientation, flipping, cropping, and padding of the axis between this space and one that already exists in the network, and then open an issue in this repository. Ideally, choose a space which covers all the areas which are covered in your space. While the Allen CCFv3 is very popular, it is missing the anterior olfactory bulb and the caudal portion of the cerebellum and brain stem, so it is not the optimal choice.
Citation
CCF translator was first described in DeMBA: a developmental atlas for navigating the mouse brain in space and time. If you use CCF translator, please cite that paper.
Owner
- Name: BrainGlobe
- Login: brainglobe
- Kind: organization
- Location: London/Munich
- Website: https://brainglobe.info/
- Twitter: brain_globe
- Repositories: 28
- Profile: https://github.com/brainglobe
Open python tools for morphological analyses in systems neuroscience
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"type": "SoftwareSourceCode",
"author": [
{
"id": "https://orcid.org/0000-0002-4111-6259",
"type": "Person",
"affiliation": {
"type": "Organization",
"name": "Division of Anatomy, University of Oslo"
},
"email": "harry.carey@medisin.uio.no",
"familyName": "Carey",
"givenName": "Harry"
},
{
"type": "schema:Role",
"schema:author": "https://orcid.org/0000-0002-4111-6259"
},
{
"id": "https://orcid.org/0000-0002-2926-6836",
"type": "Person",
"affiliation": {
"type": "Organization",
"name": "Pennsylvania State University"
},
"email": "i.e.bjerke@medisin.uio.no",
"familyName": "Bjerke",
"givenName": "Ingvild "
},
{
"id": "https://orcid.org/0000-0002-4458-6870",
"type": "Person",
"affiliation": {
"type": "Organization",
"name": "Sainsbury Wellcome Centre"
},
"email": "adam@adamltyson.com",
"familyName": "Tyson",
"givenName": "Adam"
}
],
"codeRepository": "https://github.com/brainglobe/brainglobe-ccf-translator",
"dateCreated": "2024-05-24",
"dateModified": "2024-11-18",
"description": "CCF translator (brainglobe-ccf-translator) is a tool for translating between common coordinate frameworks using deformation matrices. A longstanding problem in NeuroInformatics has been the inability to easily translate data between common coordinate frameworks. CCF translator aims to solve this. By connecting each new space to an existing one, we can construct a graph of deformations. This means that data can be translated as long as there is a route from one space to another, even if that route passes through multiple other spaces. Now, when new templates for new modalities, strains, or ages are released, users will not be subdivided into unrelated spaces. As long as they are connected to a space which exists in our network, they will be fully connected to all other spaces.\n\nCCF translator can also interpolate between spaces and create a new intermediate space. This is primarily useful for development, where, for instance, the midpoint between day 5 and day 7 can be taken and used as a postnatal day 6 reference. It could also be useful for making references of disease progression.",
"downloadUrl": "https://files.pythonhosted.org/packages/c2/24/677f016dbc9041e450329cc16c582cffd39ac4f79685de994596ea9da62f/brainglobe_ccf_translator-0.21.tar.gz",
"funder": {
"type": "Organization",
"name": "European Union "
},
"keywords": [
"Neuroscience",
"Neuroinformatics",
"atlasing",
"CCF"
],
"license": "https://spdx.org/licenses/MIT",
"name": "brainglobe-ccf-translator",
"programmingLanguage": "Python 3",
"relatedLink": "https://pypi.org/project/brainglobe-ccf-translator/",
"version": "0.21.0",
"developmentStatus": "wip",
"funding": "European Unions Horizon 2020 Framework Program for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3) ",
"issueTracker": "https://github.com/brainglobe/brainglobe-ccf-translator/issues",
"referencePublication": "https://doi.org/10.1101/2024.06.14.598876"
}
GitHub Events
Total
- Issues event: 1
- Watch event: 1
- Issue comment event: 8
- Push event: 9
- Pull request review event: 3
- Pull request review comment event: 2
- Pull request event: 4
- Create event: 2
Last Year
- Issues event: 1
- Watch event: 1
- Issue comment event: 8
- Push event: 9
- Pull request review event: 3
- Pull request review comment event: 2
- Pull request event: 4
- Create event: 2
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| polarbean | h****5@g****m | 95 |
| Harry Carey | 3****n@u****m | 4 |
| polarbean | h****c@U****9 | 1 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 3
- Total pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.4
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 5
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.4
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- PolarBean (2)
- adamltyson (1)
Pull Request Authors
- PolarBean (5)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 18 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: brainglobe-ccf-translator
a package to translate data between common coordinate frameworks
- Homepage: https://github.com/brainglobe/brainglobe-ccf-translator
- Documentation: https://brainglobe-ccf-translator.readthedocs.io/
- License: MIT
-
Latest release: 0.21
published over 1 year ago