From f3103ccc2f17117a4d17926dfec116c83dd1f6a1 Mon Sep 17 00:00:00 2001 From: "bethanny.danskin" Date: Fri, 31 May 2024 12:33:46 -0700 Subject: [PATCH 1/2] added spatial pt schema for myelination table --- emannotationschemas/__init__.py | 2 ++ emannotationschemas/schemas/bound_bool_tag.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/emannotationschemas/__init__.py b/emannotationschemas/__init__.py index b876f33..8afb2dc 100644 --- a/emannotationschemas/__init__.py +++ b/emannotationschemas/__init__.py @@ -58,6 +58,7 @@ BoundBoolAnnotation, BoundBoolWithValid, BoundTagWithValid, + SpatialPointBoolWithValid, ) from emannotationschemas.schemas.reference_text_float import ( ReferenceTagFloat, @@ -113,6 +114,7 @@ "bound_tag_bool": BoundBoolAnnotation, "bound_tag_bool_valid": BoundBoolWithValid, "bound_tag_valid": BoundTagWithValid, + "pt_bool_valid": SpatialPointBoolWithValid, "reference_integer": ReferenceInteger, "reference_tag_float": ReferenceTagFloat, } diff --git a/emannotationschemas/schemas/bound_bool_tag.py b/emannotationschemas/schemas/bound_bool_tag.py index c94b8b7..a27751d 100644 --- a/emannotationschemas/schemas/bound_bool_tag.py +++ b/emannotationschemas/schemas/bound_bool_tag.py @@ -1,5 +1,5 @@ import marshmallow as mm -from emannotationschemas.schemas.base import AnnotationSchema, BoundSpatialPoint, NumericField +from emannotationschemas.schemas.base import AnnotationSchema, BoundSpatialPoint, NumericField, SpatialPoint from emannotationschemas.schemas.bound_text_tag import BoundTagAnnotation class BoundBoolAnnotation(AnnotationSchema): @@ -20,4 +20,17 @@ class BoundTagWithValid(BoundTagAnnotation): valid_id = NumericField( required=True, description="Root id of the object when location was assessed. If the pt_root_id has changed, the associated segment has undergone proofreading.", + ) + +class SpatialPointBoolWithValid(AnnotationSchema): + pt = mm.fields.Nested( + SpatialPoint, + required=True, + description="Location associated with the tag" + ) + tag = mm.fields.Bool(required=True, description="Boolean at location") + + valid_id = NumericField( + required=True, + description="Root id of the object when location was assessed.", ) \ No newline at end of file From fa35cbc9d77aad15d51e7fc7723053f3feeb095b Mon Sep 17 00:00:00 2001 From: "bethanny.danskin" Date: Fri, 31 May 2024 12:42:56 -0700 Subject: [PATCH 2/2] new proofreading schema added proofreading status with strategy --- emannotationschemas/__init__.py | 2 ++ emannotationschemas/schemas/proofreading.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/emannotationschemas/__init__.py b/emannotationschemas/__init__.py index 8afb2dc..53b737f 100644 --- a/emannotationschemas/__init__.py +++ b/emannotationschemas/__init__.py @@ -47,6 +47,7 @@ CompartmentProofreadStatus, ProofreadStatus, ProofreadingBoolStatusUser, + CompartmentProofreadStatusStrategy, ) from emannotationschemas.schemas.neuropil import FlyNeuropil from emannotationschemas.schemas.groups import SimpleGroup @@ -117,6 +118,7 @@ "pt_bool_valid": SpatialPointBoolWithValid, "reference_integer": ReferenceInteger, "reference_tag_float": ReferenceTagFloat, + "compartment_proofread_status_strategy": CompartmentProofreadStatusStrategy, } diff --git a/emannotationschemas/schemas/proofreading.py b/emannotationschemas/schemas/proofreading.py index 9e85f3c..b60c920 100644 --- a/emannotationschemas/schemas/proofreading.py +++ b/emannotationschemas/schemas/proofreading.py @@ -54,3 +54,21 @@ class ProofreadingBoolStatusUser(ProofreadingBoolStatus): required=True, description="User who assessed the proofreading status.", ) + +class CompartmentProofreadStatusStrategy(PointWithValid): + status_dendrite = fields.Bool( + required=True, + description=f"Proofread status of the dendrite only. True indicates dendrite is at least clean.", + ) + status_axon = fields.Bool( + required=True, + description=f"Proofread status of the axon only. True indicates axon is at least clean.", + ) + strategy_dendrite = fields.String( + required=True, + description=f"Strategy used when proofreading dendrite. See table description for more details.", + ) + strategy_axon = fields.String( + required=True, + description=f"Strategy used when proofreading axon. See table description for more details.", + ) \ No newline at end of file