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

Guittari #1

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
6 changes: 6 additions & 0 deletions emannotationschemas/schemas/braincircuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ class BrainCircuitsBoundTagAnnotationUser(AnnotationSchema):
required=True,
description=f"User who created the tag.",
)

class RegionsOfInterest(AnnotationSchema):
layer = fields.Boolean(description="Layer regions")
brain_regions = fields.Boolean(description="Brain regions")
cylinder = fields.Boolean(description="Cylinder regions")
other = fields.String(description="Other regions of interest")
5 changes: 5 additions & 0 deletions emannotationschemas/schemas/extended_classical_cell_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@
schema_type_name,
class_name,
)

# Adding classes from https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/CAVE-implemented-annotation-metadata-version-1.2.plantuml
# With explanations from here: https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/required-field-names.md


11 changes: 11 additions & 0 deletions emannotationschemas/schemas/functional_coregistration.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ class FunctionalUnitCoregistrationExtended(ReferenceAnnotation):
required=False, description="confidence score associated with match"
)

# Adding classes from https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/CAVE-implemented-annotation-metadata-version-1.2.plantuml
# With explanations from here: https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/required-field-names.md

class CoRegistration(ReferenceAnnotation):
valid = fields.Boolean(description="Indicates if the co-registration is valid")
pt = fields.Nested('PointSchema', description="Point schema for location data")
valid_id = fields.Float(description="Validation ID")
status_dendrite = fields.String(description="Status of the dendrite")
object_id = fields.String(description="Object ID for co-registration")
other = fields.String(description="Other co-registration-related information")

# Moving this to the bottom/after BENCHMARK additions:
class FunctionalUnitCoregistrationQC(ReferenceAnnotation):
pass
4 changes: 4 additions & 0 deletions emannotationschemas/schemas/nucleus_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ class NucleusDetection(AnnotationSchema):
required=False,
description="high corner of the bounding box",
)

class NucleusProperties(AnnotationSchema):
nucleolus = fields.Boolean(description="Presence of nucleolus")
other = fields.String(description="Other nucleus properties")
41 changes: 40 additions & 1 deletion emannotationschemas/schemas/proofreading.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,43 @@ class CompartmentProofreadStatusStrategy(PointWithValid):
strategy_axon = fields.String(
required=True,
description=f"Strategy used when proofreading axon. See table description for more details.",
)
)

# Adding classes from https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/CAVE-implemented-annotation-metadata-version-1.2.plantuml
# With explanations from here: https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/required-field-names.md

class AnnotationProvenance(PointWithValid):
valid = fields.Boolean(description="Indicates if the annotation is valid")
pt = fields.Nested('PointSchema', description="Point schema for location data")
valid_id = fields.Float(description="Validation ID")
status = fields.String(description="Status of the annotation")


class Annotator(PointWithValid):
valid = fields.Boolean(description="Indicates if the annotator data is valid")
pt = fields.Nested('PointSchema', description="Point schema for location data")
valid_id = fields.Float(description="Validation ID")
contributor_method = fields.String(description="Method used by the contributor")
novice_annotator = fields.Boolean(description="Indicates if the annotator is a novice")
expert_annotator = fields.Boolean(description="Indicates if the annotator is an expert")
novice_proofreader = fields.Boolean(description="Indicates if the proofreader is a novice")
expert_proofreader = fields.Boolean(description="Indicates if the proofreader is an expert")
contributor = fields.String(description="Name of the contributor")
other = fields.String(description="Other annotator-related information")

class Score(PointWithValid):
valid = fields.Boolean(description="Indicates if the score is valid")
pt = fields.Nested('PointSchema', description="Point schema for location data")
valid_id = fields.Float(description="Validation ID")
annotation_reviewed = fields.Integer(description="Number of annotations reviewed")
review_time_hours = fields.Integer(description="Time spent reviewing annotations (in hours)")
confidence_value = fields.Integer(description="Confidence value of the annotation")
other = fields.Integer(description="Other score-related information")

class Versioning(PointWithValid):
valid = fields.Boolean(description="Indicates if the versioning is valid")
pt = fields.Nested('PointSchema', description="Point schema for location data")
valid_id = fields.Float(description="Validation ID")
version_checkpoint_value = fields.Integer(description="Version checkpoint value")
version_checkpoint_updates = fields.String(description="Updates made in this version")
other = fields.String(description="Other versioning-related information")
27 changes: 24 additions & 3 deletions emannotationschemas/schemas/synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
ReferenceAnnotation,
)


class BaseSynapseSchema(AnnotationSchema):
pre_pt = mm.fields.Nested(
BoundSpatialPoint,
Expand Down Expand Up @@ -36,13 +35,11 @@ def check_root_id(self, data, **kwargs):
data.pop("valid", None)
return data


class NoCleftSynapse(BaseSynapseSchema):
score = mm.fields.Float(
description="synapse score (see table metadata for description of score)"
)


class SynapseSchema(BaseSynapseSchema):
ctr_pt = mm.fields.Nested(
SpatialPoint, required=True, description="central point", order=1
Expand Down Expand Up @@ -92,3 +89,27 @@ class ValidSynapse(ReferenceAnnotation):
required=True,
description="Valid annotation for synapses",
)

# Adding classes from https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/CAVE-implemented-annotation-metadata-version-1.2.plantuml
# With explanations from here: https://github.com/aplbrain/BENCHMARK-Metadata/blob/1.1-and-1.2-annotation-metadata-for-review/annotation-metadata/required-field-names.md
class Chemical(BaseSynapseSchema):
presynaptic = mm.fields.Float(
description="Specialized sites that transmit signals between presynaptic neurons and their respective postsynaptic targets"
)
postsynaptic = mm.fields.Float(
description="Specialized sites that transmit signals between presynaptic neurons and their respective postsynaptic targets"
)

class Electrical(BaseSynapseSchema):
gap_junction_location = mm.fields.Float(
description="The location where channels that allow for cell to cell transfers between ions and small molecules"
)
gap_junction_id = mm.fields.Float(
description="The identification tag for gap junctions"
)

class SynapseSite(BaseSynapseSchema):
type = fields.String(description="Synapse site type")
class_label = fields.String(description="Class label")
neuron_id = fields.String(description="Neuron ID")
other = fields.String(description="Other synapse site information")