scene_pipelines.ingestion.mouse.strain
Add a Strain to the shared mouse vocabulary (everyday pipeline write).
Any lab adds the strains it uses; no admin role is needed. Names follow the official mouse strain nomenclature, so every lab spells a strain the same way.
Not exported from scene_pipelines.ingestion: importing this module registers
the mouse schema, which labs without mice do not need.
strain_meta_payload
Non-key Strain fields.
ensure_strain
ensure_strain(strain: DjRow[Strain], *, deployment: DjRow[Deployment] | None = None, if_exists: DuplicatePolicy = VERIFY) -> DjKey[Strain]
Insert a strain row and stamp the deployment that registered it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strain
|
DjRow[Strain]
|
Full strain insert dict: |
required |
deployment
|
DjRow[Deployment] | None
|
Optional deployment row. If omitted, built from
|
None
|
if_exists
|
DuplicatePolicy
|
Policy when |
VERIFY
|
Returns:
| Type | Description |
|---|---|
DjKey[Strain]
|
Strain primary key |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |