basic kg API service setup w participant and biosample#1
basic kg API service setup w participant and biosample#1
Conversation
sooyounga
commented
Dec 14, 2022
- basic CRUD operations API using participant and biosample data models
- basic file/folder structure for the service
- dummy admin.py file for future use (TODO: address commented out block in main.py)
|
this is adding a bunch of non-python files. should include a |
241e07c to
516b3f1
Compare
eaeb9cf to
24dfcd2
Compare
satra
left a comment
There was a problem hiding this comment.
added some comments. i think it would be helpful if the PR for the yaml files was to a separate repo, where we can build out models and you can add github actions there to populate a different library repo with the python code/schemas.
| method_information: | ||
| required: true | ||
| processing_information: | ||
| required: true |
There was a problem hiding this comment.
how are these related to a subject ?
| Image: | ||
| attributes: |
There was a problem hiding this comment.
this could benefit from the considerations in bids. see the bids microscopy paper, but also consider the bids standard for references to coordinate systems.
| attributes: | ||
| defined_in: | ||
| required: true | ||
| voxel_or_pixel_size: |
| ReferenceData: | ||
| description: >- | ||
| Graphical representations of one or several brains, or parts of brains, chosen as the biological reference for that atlas | ||
| tree_root: true | ||
| attributes: | ||
| subjects: | ||
| multivalued: true | ||
| inlined_as_list: true | ||
| range: Subject | ||
| required: true | ||
| image: | ||
| multivalued: false | ||
| range: Image | ||
| required: true |
There was a problem hiding this comment.
this is where we would want to leverage the relationships in the W3C-PROV model. where the reference data may itself be an Entity (like the gene x cell matrix), with information linked to other entities through the prov relations.
| default_range: string | ||
|
|
||
| classes: | ||
| Participant: |
There was a problem hiding this comment.
i had a chance to discus this with a few folks and there are couple of considerations that should be added to this.
- age concepts vary by species
- there are some components that should not change (datetime of birth) and some that could change (sex, weight, family, etc.,.)
- we need to add concepts like littermates not just lineage, which is what relatedparticiant was focusing on. this could be a role added to relatedparticipant.
There was a problem hiding this comment.
Also, some ages are measured from conception, some from birth -- some measured in days, some in weeks, some in years, etc.
There was a problem hiding this comment.
@patrick-lloyd-ray - we think date of birth should capture most scenarios but is a sensitive field for humans. in dandi we use gestational reference and birth reference as two reference frames, and we are using the duration format for ISO8601 to allow for any age representation.
however age as a duration is also limited across species which have stages. also, we had to invent a format for age range (based on ISO8601), when precise age is not available. age is a complicated concept ;)
| default_image: | ||
| ontology_identifier: | ||
|
|
||
| CoordinateSystem: |
There was a problem hiding this comment.
|
|
||
| identifier: Identifier = Field(nskey="schema") | ||
| sampleType: SampleType = Field( | ||
| description="Identifier for the sample characteristics (e.g., from OBI, Encode).", |
There was a problem hiding this comment.
I think 'characteristics' is too broad here -- better to have 'Identifier for the type of sample (e.g., from OBI, Encode).'
| ) | ||
| anatomy: Optional[List[Anatomy]] = Field( | ||
| None, | ||
| description="Identifier for what organ the sample belongs " |
There was a problem hiding this comment.
'Identifier for the organ from which the sample derives.' maybe?