nwb
Sketch of the problem:
Functions:
|
Make an NWB subject object from a biography |
Classes:
- make_biography(bio: autopilot.data.models.biography.Biography) pynwb.file.Subject [source]
Make an NWB subject object from a biography
Todo
make this more flexible based on a mapping
- pydantic model NWB_Interface[source]
Bases:
autopilot.root.Autopilot_Type
Show JSON schema
{ "title": "NWB_Interface", "description": "Root autopilot model for types", "type": "object", "properties": { "biography": { "$ref": "#/definitions/Biography" } }, "required": [ "biography" ], "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" } } } }, "Biography": { "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" } } } } }
- field biography: autopilot.data.models.biography.Biography [Required]
- make(sub: Subject, out_dir: pathlib.Path) pynwb.file.NWBFile [source]