AllenNeuralDynamics / aind-subject-nwb

MIT License
0 stars 0 forks source link

Why does this capsule only contains a subset of subject metadata #12

Open alexpiet opened 1 month ago

alexpiet commented 1 month ago

This capsule loads the subject.json metadata file, then copies some to the NWB file

subject = Subject(
                subject_id=subject_read.subject_id,
                species=subject_read.species,
                sex=subject_read.sex,
                date_of_birth=subject_read.date_of_birth,
                age=subject_read.age,
                genotype=subject_read.genotype,
                description=subject_read.description,
                strain=subject_read.strain,
            )

For one example data asset, the subject.json looks like:

{
   "describedBy": "https://raw.githubusercontent.com/AllenNeuralDynamics/aind-data-schema/main/src/aind_data_schema/core/subject.py",
   "schema_version": "0.5.5",
   "subject_id": "708031",
   "sex": "Female",
   "date_of_birth": "2023-10-18",
   "genotype": "Slc6a3-IRES-Cre_Bkmn/wt",
   "species": {
      "name": "Mus musculus",
      "abbreviation": null,
      "registry": {
         "name": "National Center for Biotechnology Information",
         "abbreviation": "NCBI"
      },
      "registry_identifier": "10090"
   },
   "alleles": [],
   "background_strain": null,
   "breeding_info": {
      "breeding_group": "Slc6a3-IRES-Cre_Bkmn(ND)",
      "maternal_id": "688248",
      "maternal_genotype": "wt/wt",
      "paternal_id": "686321",
      "paternal_genotype": "Slc6a3-IRES-Cre_Bkmn/wt"
   },
   "source": {
      "name": "Allen Institute",
      "abbreviation": "AI",
      "registry": {
         "name": "Research Organization Registry",
         "abbreviation": "ROR"
      },
      "registry_identifier": "03cpe7c52"
   },
   "rrid": null,
   "restrictions": null,
   "wellness_reports": [],
   "housing": {
      "cage_id": "8251646",
      "room_id": "221",
      "light_cycle": null,
      "home_cage_enrichment": [],
      "cohoused_subjects": []
   },
   "notes": null
}

Why not include all information in the metadata file in the NWB file? Why not just append the metadata file into the NWB?

alexpiet commented 1 month ago

This capsule should adopt this package: https://github.com/AllenNeuralDynamics/ndx-aind-metadata