morphology_workflows.transform

Transformation functions (mousification, etc…).

adapted from: /gpfs/bbp.cscs.ch/project/proj66/morphologies

Functions

learn_soma_transform(df, data_dir[, method, ...])

Estimate the scaling of soma size.

learn_morphology_transform(df, data_dir[, method, ...])

Estimate the global scaling of neurites.

learn_diameter_transform(df, data_dir[, method, ...])

Fit diameter scaling with branch order.

apply_transformation(row, data_dir)

Apply the full transformation on a morphology.

compare_transformed(df, data_dir[, shift, target_dataset])

Plot target, source and transformed morphos.

Module Contents

morphology_workflows.transform.learn_soma_transform(df, data_dir, method='ratio_of_means', per_mtype=False, target_dataset='target_dataset.csv', plot=True)

Estimate the scaling of soma size.

based on https://bbpteam.epfl.ch/project/issues/browse/MOUSSCX-12

morphology_workflows.transform.learn_morphology_transform(df, data_dir, method='cortical', per_mtype=False, target_dataset='target_dataset.csv', extra_data=None, plot=True)

Estimate the global scaling of neurites.

Either using predefined scaling with method=’cortical’, or estimate from dendrite extent with method=’extents_no_axon’.

based on https://bbpteam.epfl.ch/project/issues/browse/MOUSSCX-31

morphology_workflows.transform.learn_diameter_transform(df, data_dir, method='branch_order', target_dataset='target_dataset.csv', plot=True, max_x=30)

Fit diameter scaling with branch order.

adapted from: /gpfs/bbp.cscs.ch/project/proj66/morphologies/fitting

morphology_workflows.transform.apply_transformation(row, data_dir)

Apply the full transformation on a morphology.

adapted from: /gpfs/bbp.cscs.ch/project/proj66/morphologies/scale_morphs.py

TODO: pass the various method options to be in sync with Learn Tasks.

morphology_workflows.transform.compare_transformed(df, data_dir, shift=300, target_dataset='target_dataset.csv')

Plot target, source and transformed morphos.