tasks.synthesis¶
Luigi tasks for morphology synthesis.
Classes¶
Generate the list of morphologies with their mtypes and paths. |
|
Apply substitution rules to the morphology dataframe. |
|
Build the tmd_parameter.json for synthesis. |
|
Build the tmd_parameters.json for synthesis. |
|
Build the tmd_distribution.json for synthesis. |
|
Generate the list of axon morphologies with their mtypes and paths. |
|
Task to compact annotations into a single JSON file. |
|
Run choose-morphologies to synthesize axon morphologies. |
|
Run placement-algorithm to synthesize morphologies. |
|
Add scaling rules to tmd_parameter.json. |
|
Add fits to trunk angles to tmd_parameter.json. |
|
Overwrite parameters with custom parameters. |
|
Rescale morphologies. |
Module Contents¶
- class BuildMorphsDF(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskGenerate the list of morphologies with their mtypes and paths.
- class ApplySubstitutionRules(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskApply substitution rules to the morphology dataframe.
- class GetDefaultParameters(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskBuild the tmd_parameter.json for synthesis.
- class BuildSynthesisParameters(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskBuild the tmd_parameters.json for synthesis.
- class BuildSynthesisDistributions(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskBuild the tmd_distribution.json for synthesis.
- class BuildAxonMorphsDF(*args, **kwargs)¶
Bases:
BuildMorphsDFGenerate the list of axon morphologies with their mtypes and paths.
- class CreateAnnotationsFile(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskTask to compact annotations into a single JSON file.
- class BuildAxonMorphologies(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskRun choose-morphologies to synthesize axon morphologies.
If no annotation file is given, axons will be randomly chosen from input cells.
- axon_morphs_path¶
Path to save .tsv file with list of morphologies for axon grafting.
- Type:
- Default value:
axon_morphs.tsv
- annotations_path¶
(Optional) Path to annotations file used by
placementAlgorithm.app.choose_morphologies. If None, random axons will be chosen.- Type:
- neurondb_basename¶
Base name of the neurondb file (without file extension).
- Type:
- Default value:
neuronDB
- filter_axons¶
Read the neuronDB.xml file, filter cell with use_axon=True and generate a new neurondb.dat that is then read by
placementAlgorithm.app.choose_morphologies.- Type:
- Default value:
False
- bias_kind¶
Kind of bias used to penalize scores of rescaled morphologies.
- Type:
- Choices:
{linear, gaussian, uniform}
- Default value:
linear
- with_optional_scores¶
Use or ignore optional rules for morphology choice.
- Type:
- Default value:
True
- get_neuron_db_path(ext)¶
Helper function to fix neuronDB vs neurondb in file names.
- class Synthesize(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskRun placement-algorithm to synthesize morphologies.
- morphology_path¶
Column name to use in the DF to compute axon_morphs_base_dir if it is not provided
- Type:
- apical_points_path¶
Path to the apical points file (YAML).
- Type:
- Default value:
apical_points.yaml
- debug_region_grower_scales¶
Trigger the recording of scaling factors computed by region-grower.
- Type:
- Default value:
False
- max_drop_ratio¶
The maximum drop ratio.
- Type:
- Permitted values:
float in [0, 1]
- Default value:
0.1
- scaling_jitter_std¶
The std value of the scaling jitter to apply.
- Type:
- Permitted values:
float in (0, inf)
- Default value:
0.2
- rotational_jitter_std¶
The std value of the scaling jitter to apply (in degrees).
- Type:
- Permitted values:
float in (0, 180]
- Default value:
10
- class AddScalingRulesToParameters(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskAdd scaling rules to tmd_parameter.json.
- morphology_path¶
Column name to use in the DF to compute axon_morphs_base_dir if it is not provided.
- Type:
- scaling_tmd_parameters_path¶
Path to tmd_parameters.json with scaling rules added.
- Type:
- Default value:
neurots_input/tmd_parameters_scaling.json
- class AddTrunkFitToParameters(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskAdd fits to trunk angles to tmd_parameter.json.
- morphology_path¶
Column name to use in the DF to compute axon_morphs_base_dir if it is not provided.
- Type:
- trunk_tmd_parameters_path¶
Path to tmd_parameters.json with trunk fit added.
- Type:
- Default value:
neurots_input/tmd_parameters_trunk.json
- class OverwriteCustomParameters(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskOverwrite parameters with custom parameters.
- custom_tmd_parameters_path¶
Path to tmd_parameters.json with custom parameters overwritten.
- Type:
- Default value:
neurots_input/tmd_parameters_overwriten.json
- class RescaleMorphologies(*args, **kwargs)¶
Bases:
luigi_tools.task.WorkflowTaskRescale morphologies.
- morphology_path¶
Column name to use in the DF to compute axon_morphs_base_dir if it is not provided.
- Type:
- rescaled_morphology_path¶
Column name with rescaled morphology paths in the morphology DataFrame.
- Type:
- Default value:
rescaled_morphology_path
- rescaled_morphology_base_path¶
Base path to rescaled morphologies.
- Type:
- Default value:
rescaled_morphologies
- scaling_rules_path¶
Path to the file containing the scaling rules.
- Type:
- Default value:
scaling_rules.yaml
- rescaled_morphs_df_path¶
Path to the CSV morphology file.
- Type:
- Default value:
rescaled_morphs_df.csv
- scaling_mode¶
Scaling mode used: cells are either rescaled only according the Y axis or all axes.
- Type:
- Choices:
{radial, y}
- Default value:
y