Skip to main content

Diametrize cells.

Project description

Version Build status Codecov.io License Documentation status DOI

Diameter synthesis

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

Installation

Use pip:

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, 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diameter-synthesis-0.5.4.tar.gz (427.2 kB view details)

Uploaded Source

Built Distribution

diameter_synthesis-0.5.4-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file diameter-synthesis-0.5.4.tar.gz.

File metadata

  • Download URL: diameter-synthesis-0.5.4.tar.gz
  • Upload date:
  • Size: 427.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for diameter-synthesis-0.5.4.tar.gz
Algorithm Hash digest
SHA256 9e42330e6e992f532f87a00c65f71b102ee7123e8aa184a821eeebe6ccb4f2c6
MD5 7ee820815e40be58baed36e3f0324fb5
BLAKE2b-256 9383ac503231ba5ca1285fb2dc7cdee6211d8c0b35d2d1d26ef2c49be3a23d05

See more details on using hashes here.

Provenance

File details

Details for the file diameter_synthesis-0.5.4-py3-none-any.whl.

File metadata

File hashes

Hashes for diameter_synthesis-0.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 123cf17b0ee6cdce5b006da8ace0e4ca174f1b7f780e399dde93a180380fbe6e
MD5 7d923b9d6a26461a33e5bf1e7650cd7d
BLAKE2b-256 a255eb4ad698aa62de60908beeb5563f1a333241688a695780da361ba850325b

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page