biography
Data models for experimental subject biographies
Classes:
Where does the subject live? |
|
Information about the breeding conditions of the subject |
|
An individual (trans)gene that an animal may have. |
|
Genotyping information, information about a subject's background and (potentially multiple) |
|
Baseline health measurements for animal care regulation. |
|
The combined biographical, health, genetic, and other details that define an experimental subject. |
- SEX(*args, **kwargs)
(F)emale
(M)ale,
(U)nknown,
(O)ther.
We are following the Neurodata Without Borders suggestions here, but note that these are not prescriptive and will be happily expanded whenever needed.
alias of
Literal
[‘F’, ‘M’, ‘U’, ‘O’]
- pydantic model Enclosure[source]
Bases:
autopilot.data.modeling.base.Data
Where does the subject live?
Show JSON schema
{ "title": "Enclosure", "description": "Where does the subject live?", "type": "object", "properties": { "box": { "title": "Box", "description": "The number or name of the box this subject lives in, if any", "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "building": { "title": "Building", "description": "The name of the building that the subject is housed in", "type": "string" }, "room": { "title": "Room", "description": "The room number that the animal is housed in", "anyOf": [ { "type": "string" }, { "type": "integer" } ] } } }
- pydantic model Breeding[source]
Bases:
autopilot.data.modeling.base.Data
Information about the breeding conditions of the subject
Show JSON schema
{ "title": "Breeding", "description": "Information about the breeding conditions of the subject", "type": "object", "properties": { "parents": { "title": "Parents", "description": "The IDs of the parents of this subject, if any", "type": "array", "items": { "type": "string" } }, "litter": { "title": "Litter", "description": "The identifying number or tag of the litter this subject was born in", "anyOf": [ { "type": "string" }, { "type": "integer" } ] } }, "required": [ "parents", "litter" ] }
- pydantic model Gene[source]
Bases:
autopilot.data.modeling.base.Data
An individual (trans)gene that an animal may have.
I am not a geneticist, lmk what this should look like
Show JSON schema
{ "title": "Gene", "description": "An individual (trans)gene that an animal may have.\n\nI am not a geneticist, lmk what this should look like", "type": "object", "properties": { "name": { "title": "Name", "description": "The name of this gene", "type": "string" }, "zygosity": { "title": "Zygosity", "description": "One of typing.Literal['heterozygous', 'homozygous']", "enum": [ "heterozygous", "homozygous" ], "type": "string" } }, "required": [ "name" ] }
- field zygosity: Literal['heterozygous', 'homozygous'] = None
One of typing.Literal[‘heterozygous’, ‘homozygous’]
- pydantic model Genotype[source]
Bases:
autopilot.data.modeling.base.Data
Genotyping information, information about a subject’s background and (potentially multiple)
Gene
s of interestTodo
Call Jax’s API to get a list of available strain names
Show JSON schema
{ "title": "Genotype", "description": "Genotyping information, information about a subject's background and (potentially multiple) :class:`.Gene` s of interest\n\n.. todo::\n\n Call Jax's API to get a list of available strain names", "type": "object", "properties": { "strain": { "title": "Strain", "description": "The strain or background line of this subject, if any", "type": "string" }, "genes": { "title": "Genes", "description": "A list of any transgenes that this animal has", "type": "array", "items": { "$ref": "#/definitions/Gene" } } }, "definitions": { "Gene": { "title": "Gene", "description": "An individual (trans)gene that an animal may have.\n\nI am not a geneticist, lmk what this should look like", "type": "object", "properties": { "name": { "title": "Name", "description": "The name of this gene", "type": "string" }, "zygosity": { "title": "Zygosity", "description": "One of typing.Literal['heterozygous', 'homozygous']", "enum": [ "heterozygous", "homozygous" ], "type": "string" } }, "required": [ "name" ] } } }
- field genes: Optional[List[autopilot.data.models.biography.Gene]] = None
A list of any transgenes that this animal has
- pydantic model Baselines[source]
Bases:
autopilot.data.modeling.base.Data
Baseline health measurements for animal care regulation. In the future this will be integrated with a TrialManager class to titrate trials to ensure experimental subjects remain healthy.
Show JSON schema
{ "title": "Baselines", "description": "Baseline health measurements for animal care regulation. In the future this\nwill be integrated with a TrialManager class to titrate trials to ensure experimental\nsubjects remain healthy.", "type": "object", "properties": { "mass": { "title": "Mass", "description": "Mass (grams) of the animal before any experimental manipulation", "type": "number" }, "minimum_pct": { "title": "Minimum Pct", "description": "The proportion (0-1) of the baseline mass that the animal is not allowed to fall under", "type": "number" } } }
- field mass: Optional[autopilot.data.units.base.Mass] = None
Mass (grams) of the animal before any experimental manipulation
- pydantic model Biography[source]
Bases:
autopilot.data.modeling.base.Attributes
The combined biographical, health, genetic, and other details that define an experimental subject.
This is stored within the
/info
node in a typicalSubject
file as metadata attributes, and accessible fromSubject.info
Development Goals
Interface with the NWB biographical information schema.
Show JSON schema
{ "title": "Biography", "description": "The combined biographical, health, genetic, and other details that define an experimental subject.\n\nThis is stored within the ``/info`` node in a typical :class:`.Subject` file as\nmetadata attributes, and accessible from :attr:`.Subject.info`\n\n**Development Goals**\n\n- Interface with the NWB biographical information schema.", "type": "object", "properties": { "id": { "title": "Id", "description": "The indentifying string, name, subject_id, etc. for this subject. This value is also used to name the related Subject file, like {id}.h5, so these are typically expected to be unique. If None is provided, a uuid.uuid4() will be generated (which will be ugly so you probably want to give an id).", "type": "string" }, "start_date": { "title": "Start Date", "description": "The date that this subject file was created. Not that this is not necessarily the date that the subject began training, which is more reliably determined from the timestamps within the data. If none is provided, generated from current time.", "type": "string", "format": "date-time" }, "dob": { "title": "Dob", "description": "The subject's date of birth. A datetime is allowed, but hours and minutes are typically not reliable. A time of midnight formally indicates that the hour and minute is not precise.", "type": "string", "format": "date-time" }, "sex": { "title": "Sex", "description": "Sex of the subject, one of typing.Literal['F', 'M', 'U', 'O']. See :data:`.SEX`", "default": "U", "enum": [ "F", "M", "U", "O" ], "type": "string" }, "description": { "title": "Description", "description": "Some lengthier description of the subject, idk go hogwild.", "type": "string" }, "tags": { "title": "Tags", "description": "Any additional key/value tags that apply to this subject. Idiosyncratic metadata can be stored here, but caution should be taken to not overload this field and instead extend the Biography class because these values will not be included in any resulting schema.", "type": "object" }, "species": { "title": "Species", "description": "Species of subject, no recommendation common vs. latin names, but will be integrated with linked data schemas in the future", "type": "string" }, "breeding": { "$ref": "#/definitions/Breeding" }, "enclosure": { "$ref": "#/definitions/Enclosure" }, "baselines": { "$ref": "#/definitions/Baselines" }, "genotype": { "$ref": "#/definitions/Genotype" } }, "definitions": { "Breeding": { "title": "Breeding", "description": "Information about the breeding conditions of the subject", "type": "object", "properties": { "parents": { "title": "Parents", "description": "The IDs of the parents of this subject, if any", "type": "array", "items": { "type": "string" } }, "litter": { "title": "Litter", "description": "The identifying number or tag of the litter this subject was born in", "anyOf": [ { "type": "string" }, { "type": "integer" } ] } }, "required": [ "parents", "litter" ] }, "Enclosure": { "title": "Enclosure", "description": "Where does the subject live?", "type": "object", "properties": { "box": { "title": "Box", "description": "The number or name of the box this subject lives in, if any", "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "building": { "title": "Building", "description": "The name of the building that the subject is housed in", "type": "string" }, "room": { "title": "Room", "description": "The room number that the animal is housed in", "anyOf": [ { "type": "string" }, { "type": "integer" } ] } } }, "Baselines": { "title": "Baselines", "description": "Baseline health measurements for animal care regulation. In the future this\nwill be integrated with a TrialManager class to titrate trials to ensure experimental\nsubjects remain healthy.", "type": "object", "properties": { "mass": { "title": "Mass", "description": "Mass (grams) of the animal before any experimental manipulation", "type": "number" }, "minimum_pct": { "title": "Minimum Pct", "description": "The proportion (0-1) of the baseline mass that the animal is not allowed to fall under", "type": "number" } } }, "Gene": { "title": "Gene", "description": "An individual (trans)gene that an animal may have.\n\nI am not a geneticist, lmk what this should look like", "type": "object", "properties": { "name": { "title": "Name", "description": "The name of this gene", "type": "string" }, "zygosity": { "title": "Zygosity", "description": "One of typing.Literal['heterozygous', 'homozygous']", "enum": [ "heterozygous", "homozygous" ], "type": "string" } }, "required": [ "name" ] }, "Genotype": { "title": "Genotype", "description": "Genotyping information, information about a subject's background and (potentially multiple) :class:`.Gene` s of interest\n\n.. todo::\n\n Call Jax's API to get a list of available strain names", "type": "object", "properties": { "strain": { "title": "Strain", "description": "The strain or background line of this subject, if any", "type": "string" }, "genes": { "title": "Genes", "description": "A list of any transgenes that this animal has", "type": "array", "items": { "$ref": "#/definitions/Gene" } } } } } }
- Fields
- field id: str [Optional]
The indentifying string, name, subject_id, etc. for this subject. This value is also used to name the related Subject file, like {id}.h5, so these are typically expected to be unique. If None is provided, a uuid.uuid4() will be generated (which will be ugly so you probably want to give an id).
- field start_date: Optional[datetime.datetime] [Optional]
The date that this subject file was created. Not that this is not necessarily the date that the subject began training, which is more reliably determined from the timestamps within the data. If none is provided, generated from current time.
- field dob: Optional[datetime.datetime] = None
The subject’s date of birth. A datetime is allowed, but hours and minutes are typically not reliable. A time of midnight formally indicates that the hour and minute is not precise.
- field sex: Literal['F', 'M', 'U', 'O'] = 'U'
Sex of the subject, one of typing.Literal[‘F’, ‘M’, ‘U’, ‘O’]. See
SEX
- field tags: Optional[dict] = None
Any additional key/value tags that apply to this subject. Idiosyncratic metadata can be stored here, but caution should be taken to not overload this field and instead extend the Biography class because these values will not be included in any resulting schema.
- field species: Optional[str] = None
Species of subject, no recommendation common vs. latin names, but will be integrated with linked data schemas in the future
- field breeding: Optional[autopilot.data.models.biography.Breeding] = None
- field enclosure: Optional[autopilot.data.models.biography.Enclosure] = None
- field baselines: Optional[autopilot.data.models.biography.Baselines] = None
- field genotype: Optional[autopilot.data.models.biography.Genotype] = None
- property age: datetime.timedelta
Difference between now and
dob