From d8c2dcf167180dfec78f30802889bea8ff9b6fc5 Mon Sep 17 00:00:00 2001 From: Daniel Xenes Date: Fri, 20 Jan 2023 10:50:46 -0500 Subject: [PATCH 1/4] adds new proofreading schema --- emannotationschemas/schemas/proofreading.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/emannotationschemas/schemas/proofreading.py b/emannotationschemas/schemas/proofreading.py index 9e85f3c..7d749bd 100644 --- a/emannotationschemas/schemas/proofreading.py +++ b/emannotationschemas/schemas/proofreading.py @@ -2,11 +2,12 @@ AnnotationSchema, BoundSpatialPoint, NumericField, + ReferenceAnnotation ) from marshmallow import fields, validate -proofread_choices = ["non", "clean", "extended"] -options_text = "Options are: 'non' to indicate no comprehensive proofreading, 'clean' to indicate comprehensive removal of false merges, and 'extended' to mean comprehensive extension of neurite tips" +proofread_choices = ["non", "clean", "extended", "roughly clean", "roughly extended"] +options_text = "Options are: 'non' to indicate no comprehensive proofreading, 'clean' to indicate comprehensive removal of false merges, 'roughly clean' to indicate partial removal of false merges, 'extended' to indicate comprehensive extension of neurite tips, and 'roughly extended' to indicate partial extension of neurite tips." class PointWithValid(AnnotationSchema): @@ -54,3 +55,19 @@ class ProofreadingBoolStatusUser(ProofreadingBoolStatus): required=True, description="User who assessed the proofreading status.", ) + +class CompartmentProofreadStatusReference(ReferenceAnnotation): + user_id = fields.Int( + required=False, + description="User who assessed the proofreading status.", + ) + status_dendrite = fields.String( + required=True, + validate=validate.OneOf(proofread_choices), + description=f"Proofread status of the dendrite only. {options_text}", + ) + status_axon = fields.String( + required=True, + validate=validate.OneOf(proofread_choices), + description=f"Proofread status of the axon only. {options_text}", + ) \ No newline at end of file From f6e4eeeef8636f4163257e5df24b85f74f83a670 Mon Sep 17 00:00:00 2001 From: Daniel Xenes Date: Mon, 23 Jan 2023 17:35:43 -0500 Subject: [PATCH 2/4] adds apl schema for non-standard status --- emannotationschemas/schemas/proofreading.py | 36 +++++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/emannotationschemas/schemas/proofreading.py b/emannotationschemas/schemas/proofreading.py index 7d749bd..66e5d62 100644 --- a/emannotationschemas/schemas/proofreading.py +++ b/emannotationschemas/schemas/proofreading.py @@ -6,8 +6,8 @@ ) from marshmallow import fields, validate -proofread_choices = ["non", "clean", "extended", "roughly clean", "roughly extended"] -options_text = "Options are: 'non' to indicate no comprehensive proofreading, 'clean' to indicate comprehensive removal of false merges, 'roughly clean' to indicate partial removal of false merges, 'extended' to indicate comprehensive extension of neurite tips, and 'roughly extended' to indicate partial extension of neurite tips." +proofread_choices = ["non", "clean", "extended"] +options_text = "Options are: 'non' to indicate no comprehensive proofreading, 'clean' to indicate comprehensive removal of false merges, and 'extended' to mean comprehensive extension of neurite tips" class PointWithValid(AnnotationSchema): @@ -70,4 +70,34 @@ class CompartmentProofreadStatusReference(ReferenceAnnotation): required=True, validate=validate.OneOf(proofread_choices), description=f"Proofread status of the axon only. {options_text}", - ) \ No newline at end of file + ) + +class CompartmentProofreadStatusReference(ReferenceAnnotation): + user_id = fields.Int( + required=False, + description="User who assessed the proofreading status.", + ) + status_dendrite = fields.String( + required=True, + validate=validate.OneOf(proofread_choices), + description=f"Proofread status of the dendrite only. {options_text}", + ) + status_axon = fields.String( + required=True, + validate=validate.OneOf(proofread_choices), + description=f"Proofread status of the axon only. {options_text}", + ) + +class APLProofreadStatusReference(ReferenceAnnotation): + user_id = fields.Int( + required=False, + description="User who assessed the proofreading status.", + ) + status_dendrite = fields.String( + required=True, + description=f"Proofread status of the dendrite only.", + ) + status_axon = fields.String( + required=True, + description=f"Proofread status of the axon only.", + ) From a9155901579635fab428c13079146292c0488506 Mon Sep 17 00:00:00 2001 From: Daniel Xenes Date: Mon, 23 Jan 2023 17:36:36 -0500 Subject: [PATCH 3/4] removes redundant schema --- emannotationschemas/schemas/proofreading.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/emannotationschemas/schemas/proofreading.py b/emannotationschemas/schemas/proofreading.py index 66e5d62..e2161ab 100644 --- a/emannotationschemas/schemas/proofreading.py +++ b/emannotationschemas/schemas/proofreading.py @@ -72,22 +72,6 @@ class CompartmentProofreadStatusReference(ReferenceAnnotation): description=f"Proofread status of the axon only. {options_text}", ) -class CompartmentProofreadStatusReference(ReferenceAnnotation): - user_id = fields.Int( - required=False, - description="User who assessed the proofreading status.", - ) - status_dendrite = fields.String( - required=True, - validate=validate.OneOf(proofread_choices), - description=f"Proofread status of the dendrite only. {options_text}", - ) - status_axon = fields.String( - required=True, - validate=validate.OneOf(proofread_choices), - description=f"Proofread status of the axon only. {options_text}", - ) - class APLProofreadStatusReference(ReferenceAnnotation): user_id = fields.Int( required=False, From 18423959e561041fd36e00d8c663bf9168389ba9 Mon Sep 17 00:00:00 2001 From: Daniel Xenes Date: Thu, 26 Jan 2023 13:18:08 -0500 Subject: [PATCH 4/4] renames to general proofreading --- emannotationschemas/__init__.py | 4 ++++ emannotationschemas/schemas/proofreading.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/emannotationschemas/__init__.py b/emannotationschemas/__init__.py index 922c3bf..ee248d8 100644 --- a/emannotationschemas/__init__.py +++ b/emannotationschemas/__init__.py @@ -41,6 +41,8 @@ CompartmentProofreadStatus, ProofreadStatus, ProofreadingBoolStatusUser, + CompartmentProofreadStatusReference, + GeneralProofreadStatusReference ) from emannotationschemas.schemas.neuropil import FlyNeuropil from emannotationschemas.schemas.groups import SimpleGroup @@ -84,6 +86,8 @@ "derived_numeric_value": DerivedNumeric, "proofread_status": ProofreadStatus, "compartment_proofread_status": CompartmentProofreadStatus, + "compartment_proofread_status_reference": CompartmentProofreadStatusReference, + "general_proofread_status_reference": GeneralProofreadStatusReference, "proofreading_boolstatus_user": ProofreadingBoolStatusUser, "fly_neuropil": FlyNeuropil, "reference_point": FlatSegmentationReferenceSinglePoint, diff --git a/emannotationschemas/schemas/proofreading.py b/emannotationschemas/schemas/proofreading.py index e2161ab..4287481 100644 --- a/emannotationschemas/schemas/proofreading.py +++ b/emannotationschemas/schemas/proofreading.py @@ -72,16 +72,16 @@ class CompartmentProofreadStatusReference(ReferenceAnnotation): description=f"Proofread status of the axon only. {options_text}", ) -class APLProofreadStatusReference(ReferenceAnnotation): +class GeneralProofreadStatusReference(ReferenceAnnotation): user_id = fields.Int( required=False, description="User who assessed the proofreading status.", ) status_dendrite = fields.String( required=True, - description=f"Proofread status of the dendrite only.", + description=f"Proofread status of the dendrite only. Can be any string.", ) status_axon = fields.String( required=True, - description=f"Proofread status of the axon only.", - ) + description=f"Proofread status of the axon only. Can be any string.", + ) \ No newline at end of file