Subject¶
The subject.json file describes the subject from which data was obtained.
Example¶
1""" example subject """
2
3from datetime import datetime, timezone
4
5from aind_data_schema_models.organizations import Organization
6from aind_data_schema_models.species import Species, Strain
7
8from aind_data_schema.core.subject import Subject
9from aind_data_schema.components.subjects import BreedingInfo, Housing, Sex, MouseSubject
10
11# If a timezone isn't specified, the timezone of the computer running this
12# script will be used as default
13t = datetime(2022, 11, 22, 8, 43, 00, tzinfo=timezone.utc)
14
15s = Subject(
16 subject_id="123456",
17 subject_details=MouseSubject(
18 species=Species.HOUSE_MOUSE,
19 strain=Strain.C57BL_6J,
20 sex=Sex.MALE,
21 date_of_birth=t.date(),
22 source=Organization.AI,
23 breeding_info=BreedingInfo(
24 breeding_group="Emx1-IRES-Cre(ND)",
25 maternal_id="546543",
26 maternal_genotype="Emx1-IRES-Cre/wt; Camk2a-tTa/Camk2a-tTA",
27 paternal_id="232323",
28 paternal_genotype="Ai93(TITL-GCaMP6f)/wt",
29 ),
30 genotype="Emx1-IRES-Cre/wt;Camk2a-tTA/wt;Ai93(TITL-GCaMP6f)/wt",
31 housing=Housing(home_cage_enrichment=["Running wheel"], cage_id="123"),
32 ),
33)
34
35if __name__ == "__main__":
36 serialized = s.model_dump_json()
37 deserialized = Subject.model_validate_json(serialized)
38 deserialized.write_standard_file()
Core file¶
Subject¶
Description of a subject of data collection
Field |
Type |
Description |
|---|---|---|
|
|
Unique identifier for the subject of data acquisition |
|
||
|
|