Metadata-Version: 2.1
Name: neuroc
Version: 0.3.0
Summary: NeuroC: a collection of tools for morphology cloning applications
Author: Blue Brain Project, EPFL
License: Apache-2.0
Project-URL: Homepage, https://github.com/BlueBrain/neuroc
Project-URL: Repository, https://github.com/BlueBrain/neuroc.git
Project-URL: Documentation, https://github.com/BlueBrain/neuroc
Project-URL: Tracker, https://github.com/BlueBrain/neuroc/issues
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: attrs>=19.1.0
Requires-Dist: numpy>=1.15.1
Requires-Dist: tqdm>=4.23.4
Requires-Dist: click>=6.7
Requires-Dist: pandas>=1.0.3
Requires-Dist: morphio<4.0,>=3.0
Requires-Dist: morph-tool<3.0,>=2.9.0
Requires-Dist: neurom<4.0,>=3.0
Requires-Dist: scikit-learn<1.5,>=0.21.3
Provides-Extra: plotly
Requires-Dist: neurom[plotly]<4.0,>=3.0; extra == "plotly"
Requires-Dist: dash>=1.1.1; extra == "plotly"
Requires-Dist: dash-html-components>=1.0.0; extra == "plotly"
Requires-Dist: dash-core-components>=1.1.1; extra == "plotly"
Requires-Dist: dash-table>=4.1.0; extra == "plotly"

# NeuroC

A collections of programs morphology cloning
The following packages can be found
- axon shrinker:

For each morphology of the FILES\_FOLDER, remove the axon splice described by the corresponding annotation (ie. located between the end of the dendritic annotation and the start of the axonal annotation) and replace it by an intermediate vertical segment. For each input morphology,
    NSAMPLES output morphologies are generated, each with a different length of the replaced segment. Lengths spans from 0 to the length of initially spliced segment

- jitter:
Create clones of a given morphology with some jitter to make them all different. There are two kinds of jitter: rotation and scaling.
Rotational jitter rotates each section around its parent axis or around the PCA ([Principal Component Analysis](https://en.wikipedia.org/wiki/Principal_component_analysis)) of all descendant points.




# Installation

In a fresh virtualenv:
```bash
pip install  --index-url  https://bbpteam.epfl.ch/repository/devpi/bbprelman/dev/+simple/ neuroc[plotly]
```

# Usage
In a shell, do:

```bash
neuroc --help
```
to list all functionalities.


## Axon shrinker


```bash
neuroc axon_shrinker files_dir annotations_dir output_dir
```
to shrink axons.


## Rat to human scaling
```bash
neuroc scale rat-to-human HUMAN_DIR RAT_DIR MTYPE_MAPPING OUTPUT_DIR
```

Will scale the rat cells in RAT\_DIR to human cells dimensions.
HUMAN\_DIR should be a dir with the following structure:
- Must be **only** composed of sub-folders whose filename is a layer name
- Each sub folder should be composed of morphology files whose first part of the filename before the '_' is considered as the **mtype**

RAT\_DIR should be a directory containing rat morphology files **and a neuronDB.xml file.

MTYPE\_MAPPING\_FILE is a YAML file containing a dictionary where:
- a key is a human mtype or **all**
- the value is a list of rat mtypes to associate with the key. Or a list of one 'all' element
```
ls
$ RAT_DIR

$ RAT_DIR\L1
$ RAT_DIR\L2
$ ...
$ RAT_DIR\L6

$ RAT_DIR\L1\AC_cell_name.swc
$ RAT_DIR\L1\BTC_cell_name.swc
$ ...
```

## Acknowledgements

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.

This project/research received funding from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Framework Partnership Agreement No. 650003 (HBP FPA).

For license and authors, see LICENSE.txt. 

Copyright (c) 2013-2024 Blue Brain Project/EPFL
