From ef6010c21018d246179e6eeeaa3f48aac9f24d02 Mon Sep 17 00:00:00 2001 From: Saskia de Vries Date: Mon, 22 Jun 2026 14:07:53 -0700 Subject: [PATCH 1/7] add FluorescentReagent --- src/aind_data_schema/components/reagent.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/aind_data_schema/components/reagent.py b/src/aind_data_schema/components/reagent.py index cdd8f5603..7c9d12567 100644 --- a/src/aind_data_schema/components/reagent.py +++ b/src/aind_data_schema/components/reagent.py @@ -83,9 +83,19 @@ class ProbeReagent(Reagent): class FluorescentStain(Reagent): - """Description of a fluorescent stain""" + """Description of a fluorescent stain consisting of a probe associated with a fluorophore. + Note this class will change names in v3.0""" probe: Discriminated[GeneProbe | ProteinProbe | SmallMoleculeProbe] = Field(..., title="Target of the stain") stain_type: StainType = Field(..., title="Stain type") fluorophore: Fluorophore = Field(..., title="Fluorophore used in the stain") initiator_name: Optional[str] = Field(default=None, title="Initiator for HCR probes") + + +class FluorescentReagent(Reagent): + """Description of an inherently fluorescent marker""" + + stain_type: StainType = Field(..., type="Stain type") + excitation_wavelength: int = Field(..., title="Excitation wavelength (nm)") + emission_wavelength: int = Field(..., title="Emission wavelength (nm)") + wavelength_unit: SizeUnit = Field(default=SizeUnit.NM, title="Excitation wavelength unit") From 069fed81ec31073a4d8ba15517bb38941a54fbff Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 21:10:16 +0000 Subject: [PATCH 2/7] update docs --- docs/source/components/reagent.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/source/components/reagent.md b/docs/source/components/reagent.md index 72f92ff56..4864db93b 100644 --- a/docs/source/components/reagent.md +++ b/docs/source/components/reagent.md @@ -2,9 +2,27 @@ ## Model definitions +### FluorescentReagent + +Description of an inherently fluorescent marker + +| Field | Type | Title (Description) | +|-------|------|-------------| +| `stain_type` | [StainType](../aind_data_schema_models/reagent.md#staintype) | | +| `excitation_wavelength` | `int` | Excitation wavelength (nm) | +| `emission_wavelength` | `int` | Emission wavelength (nm) | +| `wavelength_unit` | [SizeUnit](../aind_data_schema_models/units.md#sizeunit) | Excitation wavelength unit | +| `name` | `str` | Name | +| `source` | [Organization](../aind_data_schema_models/organizations.md#organization) | Source | +| `rrid` | Optional[[PIDName](../aind_data_schema_models/pid_names.md#pidname)] | Research Resource ID | +| `lot_number` | `Optional[str]` | Lot number | +| `expiration_date` | `Optional[datetime.date]` | Lot expiration date | + + ### FluorescentStain -Description of a fluorescent stain +Description of a fluorescent stain consisting of a probe associated with a fluorophore. +Note this class will change names in v3.0 | Field | Type | Title (Description) | |-------|------|-------------| From 224b49efcc2d6734358851adfbd4f1bd77093147 Mon Sep 17 00:00:00 2001 From: Saskia de Vries Date: Mon, 22 Jun 2026 14:13:08 -0700 Subject: [PATCH 3/7] whitespace --- src/aind_data_schema/components/reagent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aind_data_schema/components/reagent.py b/src/aind_data_schema/components/reagent.py index 7c9d12567..e4a291073 100644 --- a/src/aind_data_schema/components/reagent.py +++ b/src/aind_data_schema/components/reagent.py @@ -83,7 +83,7 @@ class ProbeReagent(Reagent): class FluorescentStain(Reagent): - """Description of a fluorescent stain consisting of a probe associated with a fluorophore. + """Description of a fluorescent stain consisting of a probe associated with a fluorophore. Note this class will change names in v3.0""" probe: Discriminated[GeneProbe | ProteinProbe | SmallMoleculeProbe] = Field(..., title="Target of the stain") From 31b77a26f3ae6e9f25d0da0be87796d9a4b8cadf Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 21:14:02 +0000 Subject: [PATCH 4/7] update docs --- docs/source/components/reagent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/components/reagent.md b/docs/source/components/reagent.md index 4864db93b..d8de37ea8 100644 --- a/docs/source/components/reagent.md +++ b/docs/source/components/reagent.md @@ -21,7 +21,7 @@ Description of an inherently fluorescent marker ### FluorescentStain -Description of a fluorescent stain consisting of a probe associated with a fluorophore. +Description of a fluorescent stain consisting of a probe associated with a fluorophore. Note this class will change names in v3.0 | Field | Type | Title (Description) | From 66c4c40197d6c4a9fdd0eff91dc34935e0aa3ad9 Mon Sep 17 00:00:00 2001 From: Saskia de Vries Date: Mon, 22 Jun 2026 15:35:53 -0700 Subject: [PATCH 5/7] specimen procedures --- src/aind_data_schema/components/reagent.py | 2 +- .../components/specimen_procedures.py | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/aind_data_schema/components/reagent.py b/src/aind_data_schema/components/reagent.py index e4a291073..34e04ecaa 100644 --- a/src/aind_data_schema/components/reagent.py +++ b/src/aind_data_schema/components/reagent.py @@ -93,7 +93,7 @@ class FluorescentStain(Reagent): class FluorescentReagent(Reagent): - """Description of an inherently fluorescent marker""" + """Description of an inherently fluorescent marker. Note this class will change name in v3.0""" stain_type: StainType = Field(..., type="Stain type") excitation_wavelength: int = Field(..., title="Excitation wavelength (nm)") diff --git a/src/aind_data_schema/components/specimen_procedures.py b/src/aind_data_schema/components/specimen_procedures.py index 6510b8e8b..f3787ffaf 100644 --- a/src/aind_data_schema/components/specimen_procedures.py +++ b/src/aind_data_schema/components/specimen_procedures.py @@ -14,7 +14,14 @@ from aind_data_schema.base import AwareDatetimeWithDefault, DataModel, DiscriminatedList from aind_data_schema.components.coordinates import Atlas, CoordinateSystem, Translation from aind_data_schema.components.identifiers import ProtocolListMixin -from aind_data_schema.components.reagent import FluorescentStain, GeneProbeSet, ProbeReagent, Reagent, Solution +from aind_data_schema.components.reagent import ( + FluorescentReagent, + FluorescentStain, + GeneProbeSet, + ProbeReagent, + Reagent, + Solution, +) from aind_data_schema.utils.exceptions import OneOfError @@ -178,7 +185,7 @@ class SpecimenProcedure(ProtocolListMixin, DataModel): ) procedure_details: DiscriminatedList[ - HCRSeries | FluorescentStain | Sectioning | PlanarSectioning | ProbeReagent | Reagent | GeneProbeSet | Solution + HCRSeries | FluorescentReagent | FluorescentStain | Sectioning | PlanarSectioning | ProbeReagent | Reagent | GeneProbeSet | Solution ] = Field( default=[], title="Procedure details", @@ -193,6 +200,7 @@ def validate_procedure_type(self): has_hcr_series = any(isinstance(detail, HCRSeries) for detail in self.procedure_details) has_fluorescent_stain = any(isinstance(detail, FluorescentStain) for detail in self.procedure_details) + has_fluorescent_reagent = any(isinstance(detail, FluorescentReagent) for detail in self.procedure_details) has_protein_probe = any(isinstance(detail, ProbeReagent) for detail in self.procedure_details) has_sectioning = any( (isinstance(detail, PlanarSectioning) or isinstance(detail, Sectioning)) @@ -210,7 +218,7 @@ def validate_procedure_type(self): elif self.procedure_type == SpecimenProcedureType.HYBRIDIZATION_CHAIN_REACTION and not has_hcr_series: raise AssertionError("HCRSeries required if procedure_type is HCR.") elif self.procedure_type == SpecimenProcedureType.IMMUNOLABELING and not ( - has_fluorescent_stain or has_protein_probe + has_fluorescent_stain or has_protein_probe or has_fluorescent_reagent ): raise AssertionError("FluorescentStain or ProbeReagent required if procedure_type is Immunolabeling.") elif self.procedure_type == SpecimenProcedureType.SECTIONING and not has_sectioning: From ccaec319282c473b5f05f4de0577a634291a016e Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 22:38:36 +0000 Subject: [PATCH 6/7] update docs --- docs/source/components/reagent.md | 2 +- docs/source/components/specimen_procedures.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/components/reagent.md b/docs/source/components/reagent.md index d8de37ea8..f6f8a5846 100644 --- a/docs/source/components/reagent.md +++ b/docs/source/components/reagent.md @@ -4,7 +4,7 @@ ### FluorescentReagent -Description of an inherently fluorescent marker +Description of an inherently fluorescent marker. Note this class will change name in v3.0 | Field | Type | Title (Description) | |-------|------|-------------| diff --git a/docs/source/components/specimen_procedures.md b/docs/source/components/specimen_procedures.md index 61a23e7e1..3304932cb 100644 --- a/docs/source/components/specimen_procedures.md +++ b/docs/source/components/specimen_procedures.md @@ -107,7 +107,7 @@ Description of surgical or other procedure performed on a specimen | `end_date` | `datetime.date` | End date | | `experimenters` | `List[str]` | experimenter(s) | | `protocol_parameters` | `Optional[Dict[str, str]]` | Protocol parameters (Parameters defined in the protocol and their value during this procedure) | -| `procedure_details` | List[[HCRSeries](#hcrseries) or [FluorescentStain](reagent.md#fluorescentstain) or [Sectioning](#sectioning) or [PlanarSectioning](#planarsectioning) or [ProbeReagent](reagent.md#probereagent) or [Reagent](reagent.md#reagent) or [GeneProbeSet](reagent.md#geneprobeset) or [Solution](reagent.md#solution)] | Procedure details (Details of the procedures, including reagents and sectioning information.) | +| `procedure_details` | List[[HCRSeries](#hcrseries) or [FluorescentReagent](reagent.md#fluorescentreagent) or [FluorescentStain](reagent.md#fluorescentstain) or [Sectioning](#sectioning) or [PlanarSectioning](#planarsectioning) or [ProbeReagent](reagent.md#probereagent) or [Reagent](reagent.md#reagent) or [GeneProbeSet](reagent.md#geneprobeset) or [Solution](reagent.md#solution)] | Procedure details (Details of the procedures, including reagents and sectioning information.) | | `notes` | `Optional[str]` | Notes | | `protocol_id` | `Optional[List[str]]` | Protocol ID (DOI for protocols.io) | From cf10231f0e64e232477392ffe2d4e3add1631c55 Mon Sep 17 00:00:00 2001 From: Saskia de Vries Date: Mon, 22 Jun 2026 15:39:18 -0700 Subject: [PATCH 7/7] lint --- src/aind_data_schema/components/specimen_procedures.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/aind_data_schema/components/specimen_procedures.py b/src/aind_data_schema/components/specimen_procedures.py index f3787ffaf..7024d5f4b 100644 --- a/src/aind_data_schema/components/specimen_procedures.py +++ b/src/aind_data_schema/components/specimen_procedures.py @@ -185,7 +185,15 @@ class SpecimenProcedure(ProtocolListMixin, DataModel): ) procedure_details: DiscriminatedList[ - HCRSeries | FluorescentReagent | FluorescentStain | Sectioning | PlanarSectioning | ProbeReagent | Reagent | GeneProbeSet | Solution + HCRSeries + | FluorescentReagent + | FluorescentStain + | Sectioning + | PlanarSectioning + | ProbeReagent + | Reagent + | GeneProbeSet + | Solution ] = Field( default=[], title="Procedure details",