# NeuroCollage
A tool to create 2D morphology collage plots based on matplotlib.
## Installation
It is recommended to install ``NeuroCollage`` using [pip](https://pip.pypa.io/en/stable/):
```bash
pip install neurocollage
```
## Usage
This package provides only one command that aims at building figures of morphologies in atlas
planes (i.e. collage plots).
### Inputs
The collage requires the following inputs:
* the path to a standard `CircuitConfig`, or the path to a sonata `circuit_config.json` file of
a [SONATA circuit](https://sonata-extension.readthedocs.io/en/latest/sonata_overview.html)
and the path to an Atlas directory that can be read by
[Voxcell](https://voxcell.readthedocs.io/en/latest/index.html).
* [optional] a configuration file containing the default values used for the CLI arguments (all
these values are overridden by the ones passed to the CLI). The config file is a `INI` file
divided in sections. These sections correspond to the first part of the CLI parameter names. For
example, the `atlas-path` parameter of the CLI corresponds to the `path` parameter of the `atlas`
section in the configuration file.
### Outputs
This package contains three main functions:
* `get_layer_annotation`: can generate annotation of layers for plotting or other uses
* `create_planes`: defines a set of planes to create collage plots, with various algorithms.
Planes are sampled along a centerline, which can be straight aligned or not with world
coordinates or curved using an algorithm from former `atlas_analysis` package. The first and last point
of the centerline can be defined manually, or estimated internally to span the given region best.
* `plot_collage`: make the collage plot, see API for possible arguments.
### Command
This package provides a CLI whose parameters are described in the Command Line Interface page of
this documentation. It is also possible to get help from the command:
```bash
neuro-collage --help
```
If all the arguments are provided in the configuration file, the command is just:
```bash
neuro-collage -c <config-file>
```
Any argument from the configuration file can be overridden through the CLI:
```bash
neuro-collage -c <config-file> --cells-sample 20 --collage-pdf-filename custom_collage_name.pdf
```
Note that the parameter names of the CLI use the section in the configuration file as prefix. In the
previous example, the `--cells-sample` overrides the `sample` parameter of the `cells` section of
the configuration file.
## Examples
The `examples` folder contains a simple example on `S1` region of `SSCx` with `L5_TPC:A` morphologies. It
also provides examples of programmatic use of the `NeuroCollage` API with both types of circuit formats.
![](doc/source/images/collage.png)
## Funding & Acknowledgment
The development of this software was supported by funding to the Blue Brain Project,
a research center of the École polytechnique fédérale de Lausanne (EPFL),
from the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.
Copyright (c) 2022-2024 Blue Brain Project/EPFL
Raw data
{
"_id": null,
"home_page": "https://neurocollage.readthedocs.io",
"name": "neurocollage",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Blue Brain Project, EPFL",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/47/6a/49c0a38cf1c922fb522d2e91e8a389db2821e01db44bb99bb68fde9a4192/neurocollage-0.3.7.tar.gz",
"platform": null,
"description": "# NeuroCollage\n\nA tool to create 2D morphology collage plots based on matplotlib.\n\n\n## Installation\n\nIt is recommended to install ``NeuroCollage`` using [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npip install neurocollage\n```\n\n## Usage\n\nThis package provides only one command that aims at building figures of morphologies in atlas\nplanes (i.e. collage plots).\n\n### Inputs\n\nThe collage requires the following inputs:\n\n* the path to a standard `CircuitConfig`, or the path to a sonata `circuit_config.json` file of\n a [SONATA circuit](https://sonata-extension.readthedocs.io/en/latest/sonata_overview.html)\n and the path to an Atlas directory that can be read by\n [Voxcell](https://voxcell.readthedocs.io/en/latest/index.html).\n* [optional] a configuration file containing the default values used for the CLI arguments (all\n these values are overridden by the ones passed to the CLI). The config file is a `INI` file\n divided in sections. These sections correspond to the first part of the CLI parameter names. For\n example, the `atlas-path` parameter of the CLI corresponds to the `path` parameter of the `atlas`\n section in the configuration file.\n\n### Outputs\n\nThis package contains three main functions:\n* `get_layer_annotation`: can generate annotation of layers for plotting or other uses\n* `create_planes`: defines a set of planes to create collage plots, with various algorithms.\n Planes are sampled along a centerline, which can be straight aligned or not with world\n coordinates or curved using an algorithm from former `atlas_analysis` package. The first and last point\n of the centerline can be defined manually, or estimated internally to span the given region best.\n* `plot_collage`: make the collage plot, see API for possible arguments.\n\n### Command\n\nThis package provides a CLI whose parameters are described in the Command Line Interface page of\nthis documentation. It is also possible to get help from the command:\n\n```bash\nneuro-collage --help\n```\n\nIf all the arguments are provided in the configuration file, the command is just:\n\n```bash\nneuro-collage -c <config-file>\n```\n\nAny argument from the configuration file can be overridden through the CLI:\n\n```bash\nneuro-collage -c <config-file> --cells-sample 20 --collage-pdf-filename custom_collage_name.pdf\n```\n\nNote that the parameter names of the CLI use the section in the configuration file as prefix. In the\nprevious example, the `--cells-sample` overrides the `sample` parameter of the `cells` section of\nthe configuration file.\n\n\n## Examples\n\nThe `examples` folder contains a simple example on `S1` region of `SSCx` with `L5_TPC:A` morphologies. It\nalso provides examples of programmatic use of the `NeuroCollage` API with both types of circuit formats.\n\n![](doc/source/images/collage.png)\n\n\n## Funding & Acknowledgment\n\nThe development of this software was supported by funding to the Blue Brain Project,\na research center of the \u00c9cole polytechnique f\u00e9d\u00e9rale de Lausanne (EPFL),\nfrom the Swiss government's ETH Board of the Swiss Federal Institutes of Technology.\n\nCopyright (c) 2022-2024 Blue Brain Project/EPFL\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "A tool to create 2D morphology collage plots based on matplotlib.",
"version": "0.3.7",
"project_urls": {
"Homepage": "https://neurocollage.readthedocs.io",
"Source": "https://github.com/BlueBrain/neurocollage",
"Tracker": "https://github.com/BlueBrain/neurocollage/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ecc2c6ec8a95b6df3033591bf547717dfcef0623808588f7bfe23df00a574e81",
"md5": "d2627d9557eea4aba3f1848040c06949",
"sha256": "046b984743d87418abbf3f26cdd91df2008fe224ffd7eb120d8c2dac9605bb74"
},
"downloads": -1,
"filename": "neurocollage-0.3.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d2627d9557eea4aba3f1848040c06949",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 38206,
"upload_time": "2024-11-11T17:30:28",
"upload_time_iso_8601": "2024-11-11T17:30:28.737438Z",
"url": "https://files.pythonhosted.org/packages/ec/c2/c6ec8a95b6df3033591bf547717dfcef0623808588f7bfe23df00a574e81/neurocollage-0.3.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "476a49c0a38cf1c922fb522d2e91e8a389db2821e01db44bb99bb68fde9a4192",
"md5": "0f63a9218c03cd0051dbcf054b6d5102",
"sha256": "29f033fc595ed5fc17d412b6fb4022d4a8523a203ea40630b5b0dfe8f5196004"
},
"downloads": -1,
"filename": "neurocollage-0.3.7.tar.gz",
"has_sig": false,
"md5_digest": "0f63a9218c03cd0051dbcf054b6d5102",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 649217,
"upload_time": "2024-11-11T17:30:31",
"upload_time_iso_8601": "2024-11-11T17:30:31.879579Z",
"url": "https://files.pythonhosted.org/packages/47/6a/49c0a38cf1c922fb522d2e91e8a389db2821e01db44bb99bb68fde9a4192/neurocollage-0.3.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-11 17:30:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BlueBrain",
"github_project": "neurocollage",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "neurocollage"
}