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

Adds new proofreading schema #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
21 changes: 19 additions & 2 deletions emannotationschemas/schemas/proofreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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}",
)