diameter-synthesis


Namediameter-synthesis JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://diameter-synthesis.readthedocs.io
SummaryDiametrize cells.
upload_time2024-11-06 13:27:32
maintainerNone
docs_urlNone
authorBlue Brain Project, EPFL
requires_python>=3.9
licenseApache License 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Version](https://img.shields.io/pypi/v/diameter-synthesis)](https://github.com/BlueBrain/diameter-synthesis/releases)
[![Build status](https://github.com/BlueBrain/diameter-synthesis/actions/workflows/run-tox.yml/badge.svg?branch=main)](https://github.com/BlueBrain/diameter-synthesis/actions)
[![Codecov.io](https://codecov.io/github/BlueBrain/diameter-synthesis/coverage.svg?branch=main)](https://codecov.io/github/BlueBrain/diameter-synthesis?branch=main)
[![License](https://img.shields.io/badge/License-GPLv3-blue)](https://github.com/BlueBrain/diameter-synthesis/blob/main/LICENSE.txt)
[![Documentation status](https://readthedocs.org/projects/diameter-synthesis/badge/?version=latest)](https://diameter-synthesis.readthedocs.io/)
[![DOI](https://img.shields.io/badge/DOI-10.1016/j.celrep.2022.110586-blue)](https://doi.org/10.1016/j.celrep.2022.110586)


# Diameter synthesis

This code aims at generating synthetic diameters for neurons, with parameters learned from a set of biological neurons.


## Installation

Use pip:

```bash
pip install diameter-synthesis
```

## Main usage

### Step 1: Building models

In folder `example`, you first have to modify `create_jsons.py` to suit your needs.

You have the following important parameters for the dict `extract_models_params`:

- `morph_path`: path to morphology files
- `mtypes_sort`: how to learn distributions: `all` to use all together, `mtypes` to use by mtypes , `super_mtypes` to use home made cells types (see `diameter_types` below)
- `models`: to create several models (for now they are all the same, just different realisation of random numbers)
- `neurite_types`: types of neurite to learn parameters for
- `extra_params`: dict of additional model parameters

### Step 2: Building diameters

Then simply run `./run_models.sh` to create the models (saved in a json file).

In `create_jsons.py`, the dict `generate_diameters_params` needs to be updated, too, with entries matching the previous dict.
The path in `new_morph_path` will be where the new morphologies will be saved.

Then run `./run_diamters.sh` to generate diameters.


## Additional scripts

Several additional scripts in folder `scripts`:

- `diameter-checks`: run the diameter-check code (bluepymm) on the biological and sampled cells
- `diameter_types`: cluster mtypes using distributions of surface areas (uses two privates repositories a the moment)
- `extract_morphometrics`: from bio and sample cells, extracts and plot distribution of surface area and diameter as a function of branch order and path lengths
- `extract_morphologies`: from a cell release, find the ones that can be run through diameter-check
- `plot_morphologies`: plot all morphologies in mtype folders


## Examples

The `examples` folder contains a simple example that will fetch morphologies from [neuromorpho.org](http://neuromorpho.org), learn a diameter model, rediametrize these morphologies, and perform some analysis of the results to compare original and diametrized morphologies.
This example can simply be run using the following command:
```bash
./run.sh
```


## 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.

For license and authors, see `LICENSE.txt` and `AUTHORS.md` respectively.

Copyright © 2021-2022 Blue Brain Project/EPFL

            

Raw data

            {
    "_id": null,
    "home_page": "https://diameter-synthesis.readthedocs.io",
    "name": "diameter-synthesis",
    "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/46/32/89c1d2f83c6f108b27237c84f6e84a6b04b983530b7bb208ffbcf30304da/diameter_synthesis-0.7.0.tar.gz",
    "platform": null,
    "description": "[![Version](https://img.shields.io/pypi/v/diameter-synthesis)](https://github.com/BlueBrain/diameter-synthesis/releases)\n[![Build status](https://github.com/BlueBrain/diameter-synthesis/actions/workflows/run-tox.yml/badge.svg?branch=main)](https://github.com/BlueBrain/diameter-synthesis/actions)\n[![Codecov.io](https://codecov.io/github/BlueBrain/diameter-synthesis/coverage.svg?branch=main)](https://codecov.io/github/BlueBrain/diameter-synthesis?branch=main)\n[![License](https://img.shields.io/badge/License-GPLv3-blue)](https://github.com/BlueBrain/diameter-synthesis/blob/main/LICENSE.txt)\n[![Documentation status](https://readthedocs.org/projects/diameter-synthesis/badge/?version=latest)](https://diameter-synthesis.readthedocs.io/)\n[![DOI](https://img.shields.io/badge/DOI-10.1016/j.celrep.2022.110586-blue)](https://doi.org/10.1016/j.celrep.2022.110586)\n\n\n# Diameter synthesis\n\nThis code aims at generating synthetic diameters for neurons, with parameters learned from a set of biological neurons.\n\n\n## Installation\n\nUse pip:\n\n```bash\npip install diameter-synthesis\n```\n\n## Main usage\n\n### Step 1: Building models\n\nIn folder `example`, you first have to modify `create_jsons.py` to suit your needs.\n\nYou have the following important parameters for the dict `extract_models_params`:\n\n- `morph_path`: path to morphology files\n- `mtypes_sort`: how to learn distributions: `all` to use all together, `mtypes` to use by mtypes , `super_mtypes` to use home made cells types (see `diameter_types` below)\n- `models`: to create several models (for now they are all the same, just different realisation of random numbers)\n- `neurite_types`: types of neurite to learn parameters for\n- `extra_params`: dict of additional model parameters\n\n### Step 2: Building diameters\n\nThen simply run `./run_models.sh` to create the models (saved in a json file).\n\nIn `create_jsons.py`, the dict `generate_diameters_params` needs to be updated, too, with entries matching the previous dict.\nThe path in `new_morph_path` will be where the new morphologies will be saved.\n\nThen run `./run_diamters.sh` to generate diameters.\n\n\n## Additional scripts\n\nSeveral additional scripts in folder `scripts`:\n\n- `diameter-checks`: run the diameter-check code (bluepymm) on the biological and sampled cells\n- `diameter_types`: cluster mtypes using distributions of surface areas (uses two privates repositories a the moment)\n- `extract_morphometrics`: from bio and sample cells, extracts and plot distribution of surface area and diameter as a function of branch order and path lengths\n- `extract_morphologies`: from a cell release, find the ones that can be run through diameter-check\n- `plot_morphologies`: plot all morphologies in mtype folders\n\n\n## Examples\n\nThe `examples` folder contains a simple example that will fetch morphologies from [neuromorpho.org](http://neuromorpho.org), learn a diameter model, rediametrize these morphologies, and perform some analysis of the results to compare original and diametrized morphologies.\nThis example can simply be run using the following command:\n```bash\n./run.sh\n```\n\n\n## Funding & Acknowledgment\n\nThe development of this software was supported by funding to the Blue Brain Project, a research center of the \u00c9cole polytechnique f\u00e9d\u00e9rale de Lausanne (EPFL), from the Swiss government\u2019s ETH Board of the Swiss Federal Institutes of Technology.\n\nFor license and authors, see `LICENSE.txt` and `AUTHORS.md` respectively.\n\nCopyright \u00a9 2021-2022 Blue Brain Project/EPFL\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "Diametrize cells.",
    "version": "0.7.0",
    "project_urls": {
        "Homepage": "https://diameter-synthesis.readthedocs.io",
        "Source": "https://github.com/BlueBrain/diameter-synthesis",
        "Tracker": "https://github.com/BlueBrain/diameter-synthesis/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8869de1d2d2c360744bd8a52cd6841ccb489f9091b5f1e8a363c1f5ca562efb1",
                "md5": "bad1b7ee034e9387427cfa0256b3e293",
                "sha256": "d33fdbe2f76d009daa670d401dc406a812e12702e8686db2b7af165c23422985"
            },
            "downloads": -1,
            "filename": "diameter_synthesis-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bad1b7ee034e9387427cfa0256b3e293",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 34904,
            "upload_time": "2024-11-06T13:27:31",
            "upload_time_iso_8601": "2024-11-06T13:27:31.149884Z",
            "url": "https://files.pythonhosted.org/packages/88/69/de1d2d2c360744bd8a52cd6841ccb489f9091b5f1e8a363c1f5ca562efb1/diameter_synthesis-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "463289c1d2f83c6f108b27237c84f6e84a6b04b983530b7bb208ffbcf30304da",
                "md5": "14cf2d2b71746791e04e9f50e84b0539",
                "sha256": "082780241d559bc65176c0f720325f8ed8b3b559c33350f06734261ec3f913d0"
            },
            "downloads": -1,
            "filename": "diameter_synthesis-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "14cf2d2b71746791e04e9f50e84b0539",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 418681,
            "upload_time": "2024-11-06T13:27:32",
            "upload_time_iso_8601": "2024-11-06T13:27:32.335624Z",
            "url": "https://files.pythonhosted.org/packages/46/32/89c1d2f83c6f108b27237c84f6e84a6b04b983530b7bb208ffbcf30304da/diameter_synthesis-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-06 13:27:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BlueBrain",
    "github_project": "diameter-synthesis",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "diameter-synthesis"
}
        
Elapsed time: 0.45848s