Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename feature names with ambiguity #98

Merged
merged 3 commits into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

sphinx:
configuration: doc/source/conf.py
fail_on_warning: true
Expand Down
28 changes: 14 additions & 14 deletions emodelrunner/factsheets/morphology_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"average diameter of {neurite_name}"
self.name = f"average diameter, {neurite_name}"
self.unit = "\u00b5m"

neurites = list(iter_neurites(morphology, filt=is_type(neurite_type)))
Expand Down Expand Up @@ -117,7 +117,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} length"
self.name = f"total length, {neurite_name}"
self.unit = "\u00b5m"
feature_value = nm.get("total_length", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -141,7 +141,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} height"
self.name = f"total height, {neurite_name}"
self.unit = "\u00b5m"
feature_value = nm.get("total_height", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -165,7 +165,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} width"
self.name = f"total width, {neurite_name}"
self.unit = "\u00b5m"
feature_value = nm.get("total_width", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -189,7 +189,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} depth"
self.name = f"total depth, {neurite_name}"
self.unit = "\u00b5m"
feature_value = nm.get("total_depth", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -213,7 +213,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} area"
self.name = f"total area, {neurite_name}"
self.unit = "\u00b5m\u00b2"
feature_value = nm.get("total_area", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -237,7 +237,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"total {neurite_name} volume"
self.name = f"total volume, {neurite_name}"
self.unit = "\u00b5m\u00b3"
feature_value = nm.get("total_volume", morphology, neurite_type=neurite_type)
self.value = self.replace_empty_value(feature_value)
Expand All @@ -261,7 +261,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"number of {neurite_name} sections"
self.name = f"number of sections, {neurite_name}"
self.unit = ""
feature_value = nm.get(
"number_of_sections", morphology, neurite_type=neurite_type
Expand All @@ -287,7 +287,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"number of {neurite_name} segments"
self.name = f"number of segments, {neurite_name}"
self.unit = ""
feature_values = nm.get(
"number_of_segments", morphology, neurite_type=neurite_type
Expand All @@ -313,7 +313,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"mean {neurite_name} volume"
self.name = f"mean volume, {neurite_name}"
self.unit = "\u00b5m\u00b3"
feature_values = nm.get(
"total_volume_per_neurite", morphology, neurite_type=neurite_type
Expand All @@ -340,7 +340,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"average {neurite_name} section length"
self.name = f"average section length, {neurite_name}"
self.unit = "\u00b5m"
feature_values = nm.get(
"section_lengths", morphology, neurite_type=neurite_type
Expand All @@ -367,7 +367,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"average {neurite_name} segment length"
self.name = f"average segment length, {neurite_name}"
self.unit = "\u00b5m"
feature_values = nm.get(
"segment_lengths", morphology, neurite_type=neurite_type
Expand All @@ -394,7 +394,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"{neurite_name} maximum branch order"
self.name = f"maximum branch order, {neurite_name}"
self.unit = ""
feature_values = nm.get(
"section_branch_orders", morphology, neurite_type=neurite_type
Expand All @@ -421,7 +421,7 @@ def __init__(self, morphology, neurite_name, neurite_type):
neurite_type (NeuriteType): enum for neurite type encoding
"""
super().__init__()
self.name = f"{neurite_name} maximum section length"
self.name = f"maximum section length, {neurite_name}"
self.unit = "\u00b5m"
feature_values = nm.get(
"section_lengths", morphology, neurite_type=neurite_type
Expand Down
40 changes: 20 additions & 20 deletions tests/sscx_tests/test_factsheets_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,29 +182,29 @@ def test_anatomy_features():
ana_dict = morph_factsheet_builder.get_feature_values()
ana_dict = {"values": ana_dict, "name": "Anatomy"}
left_to_check_1 = [
"total axon length",
"mean axon volume",
"axon maximum branch order",
"axon maximum section length",
"total apical length",
"mean apical volume",
"apical maximum branch order",
"apical maximum section length",
"total basal length",
"mean basal volume",
"basal maximum branch order",
"basal maximum section length",
"total length, axon",
"mean volume, axon",
"maximum branch order, axon",
"maximum section length, axon",
"total length, apical",
"mean volume, apical",
"maximum branch order, apical",
"maximum section length, apical",
"total length, basal",
"mean volume, basal",
"maximum branch order, basal",
"maximum section length, basal",
"soma diameter",
]
left_to_check_2 = [
"total axon length",
"mean axon volume",
"axon maximum branch order",
"axon maximum section length",
"total dendrite length",
"mean dendrite volume",
"dendrite maximum branch order",
"dendrite maximum section length",
"total length, axon",
"mean volume, axon",
"maximum branch order, axon",
"maximum section length, axon",
"total length, dendrite",
"mean volume, dendrite",
"maximum branch order, dendrite",
"maximum section length, dendrite",
"soma diameter",
]
lists_to_check = [left_to_check_1, left_to_check_2]
Expand Down
Loading
Loading