Skip to content

Commit

Permalink
rearrange enumerations
Browse files Browse the repository at this point in the history
  • Loading branch information
rsc3 committed May 14, 2024
1 parent cf04785 commit 118e17c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 196 deletions.
163 changes: 0 additions & 163 deletions content/json_schema/AnVILBioCoreMinimal.schema.json

This file was deleted.

49 changes: 27 additions & 22 deletions content/linkml/AnVILBioCoreMinimal.linkml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ classes:
- reference_assembly
- biosample_id_fk # this is the foregin key to the biosample table

slots:
# ids are unique identifiers for each entity or explicitly defined foreign key
slots: ## ids are unique identifiers for each entity or explicitly defined foreign key

# foreign keys
donor_id_fk:
aliases: hasDonor
description: This property references the Donor organism from which the BioSample was acquired.
Expand All @@ -61,6 +62,8 @@ slots:
domain: AnVILFile
multivalued: false # assume that a biosample is only from one donor (1-1 relationship)
inlined: true

# primary keys
biosample_id:
identifier: true # this is the type of primary key
range: string
Expand Down Expand Up @@ -103,12 +106,6 @@ slots:
comments:
- 'For example: Homo sapiens from NCBITaxon or http://purl.obolibrary.org/obo/NCBITaxon_9606 '
multivalued: false
phenotypic_sex:
aliases: hasPhenotypicSex
description: A reference to the BiologicalSex of the Donor organism. \"An organismal quality inhering in a bearer by virtue of the bearer's physical expression of sexual characteristics. [PATO_0001894]\
multivalued: false
inlined: true
range: PhenotypicSex
reported_ethnicity:
aliases: hasReportedEthnicity
description: A property that relects a Human Donor's reported ethnic origins. Note this may contain both Race and Ethnicity information as define by the US Department of Interior (DOI) https://www.doi.gov/pmb/eeo/directives/race-data
Expand Down Expand Up @@ -147,21 +144,29 @@ slots:
aliases: usesReferenceAssembly
description: A reference to the collection of sequences taken as the standard for a given organism. May be defined by https://www.ncbi.nlm.nih.gov/grc.
multivalued: true

# fields for enumerations
human_phenotype:
description: phenotype code from the human phenotype ontology (HPO)
# range: HumanPhenotypeOntology
phenotypic_sex:
aliases: hasPhenotypicSex
description: A reference to the BiologicalSex of the Donor organism. \"An organismal quality inhering in a bearer by virtue of the bearer's physical expression of sexual characteristics. [PATO_0001894]\
multivalued: false
inlined: true
# range: PhenotypicSex

enums:
# HumanPhenotypeOntology:
# permissible_values:
# All:
PhenotypicSex:
permissible_values:
female:
meaning: PATO:0000383
male:
meaning: PATO:0000384
intersex:
description: between male and female sex
prefer not to say:
description: the individual prefers not to disclose
# enums:
# # HumanPhenotypeOntology:
# # permissible_values:
# # All:
# PhenotypicSex:
# permissible_values:
# female:
# meaning: PATO:0000383
# male:
# meaning: PATO:0000384
# intersex:
# description: between male and female sex
# prefer not to say:
# description: the individual prefers not to disclose
16 changes: 6 additions & 10 deletions content/tools/python/input/AnVILBioCoreMinimal.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"type": "array"
},
"human_phenotype": {
"$ref": "#/$defs/HumanPhenotypeOntology",
"description": "phenotype code from the human phenotype ontology (HPO)"
"description": "phenotype code from the human phenotype ontology (HPO)",
"type": "string"
},
"organism_type": {
"description": "A reference to the organism type.",
Expand Down Expand Up @@ -93,6 +93,10 @@
"additionalProperties": false,
"description": "Information for files associated with the study.",
"properties": {
"biosample_id_fk": {
"$ref": "#/$defs/AnVILBioSample",
"description": "This property references the BioSample from which information in a file was acquired."
},
"data_modality": {
"description": "Data modality describes the biological nature of the information gathered as the result of an Activity, independent of the technology or methods used to produce the information.",
"items": {
Expand Down Expand Up @@ -136,14 +140,6 @@
],
"title": "AnVILFile",
"type": "object"
},
"HumanPhenotypeOntology": {
"description": "",
"enum": [
"All"
],
"title": "HumanPhenotypeOntology",
"type": "string"
}
},
"$id": "https://github.com/DataBiosphere/biocore-data-model/tree/main/content",
Expand Down
2 changes: 1 addition & 1 deletion content/tools/python/output/biocore_tdr_schema.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"tables": [{"name": "AnVILBioSample", "columns": [{"name": "anatomical_site", "datatype": "string", "array_of": false, "required": false}, {"name": "apriori_cell_type", "datatype": "string", "array_of": true, "required": false}, {"name": "biosample_id", "datatype": "string", "array_of": false, "required": true}, {"name": "biosample_type", "datatype": "string", "array_of": false, "required": false}, {"name": "disease", "datatype": "string", "array_of": false, "required": false}, {"name": "donor_age_at_collection_lower_bound", "datatype": "numeric", "array_of": false, "required": false}, {"name": "donor_age_at_collection_unit", "datatype": "string", "array_of": false, "required": false}, {"name": "donor_age_at_collection_upper_bound", "datatype": "numeric", "array_of": false, "required": false}, {"name": "donor_id", "datatype": "string", "array_of": false, "required": false}], "primaryKey": ["biosample_id"]}, {"name": "AnVILDonor", "columns": [{"name": "donor_id", "datatype": "string", "array_of": false, "required": true}, {"name": "genetic_ancestry", "datatype": "string", "array_of": true, "required": false}, {"name": "human_phenotype", "datatype": "string", "array_of": false, "required": false}, {"name": "organism_type", "datatype": "string", "array_of": false, "required": false}, {"name": "phenotypic_sex", "datatype": "string", "array_of": false, "required": false}, {"name": "reported_ethnicity", "datatype": "string", "array_of": true, "required": false}], "primaryKey": ["donor_id"]}, {"name": "AnVILFile", "columns": [{"name": "data_modality", "datatype": "string", "array_of": true, "required": false}, {"name": "file_format", "datatype": "string", "array_of": false, "required": false}, {"name": "file_id", "datatype": "string", "array_of": false, "required": true}, {"name": "file_md5sum", "datatype": "string", "array_of": false, "required": false}, {"name": "file_name", "datatype": "string", "array_of": false, "required": false}, {"name": "file_ref", "datatype": "string", "array_of": false, "required": false}, {"name": "file_size", "datatype": "integer", "array_of": false, "required": false}, {"name": "reference_assembly", "datatype": "string", "array_of": true, "required": false}], "primaryKey": ["file_id"]}], "relationships": [{"name": "AnVILBioSample.donor_id_to_AnVILDonor.donor_id", "from": {"table": "AnVILBioSample", "column": "donor_id"}, "to": {"table": "AnVILDonor", "column": "donor_id"}}]}
{"tables": [{"name": "AnVILBioSample", "columns": [{"name": "anatomical_site", "datatype": "string", "array_of": false, "required": false}, {"name": "apriori_cell_type", "datatype": "string", "array_of": true, "required": false}, {"name": "biosample_id", "datatype": "string", "array_of": false, "required": true}, {"name": "biosample_type", "datatype": "string", "array_of": false, "required": false}, {"name": "disease", "datatype": "string", "array_of": false, "required": false}, {"name": "donor_age_at_collection_lower_bound", "datatype": "numeric", "array_of": false, "required": false}, {"name": "donor_age_at_collection_unit", "datatype": "string", "array_of": false, "required": false}, {"name": "donor_age_at_collection_upper_bound", "datatype": "numeric", "array_of": false, "required": false}, {"name": "donor_id", "datatype": "string", "array_of": false, "required": false}], "primaryKey": ["biosample_id"]}, {"name": "AnVILDonor", "columns": [{"name": "donor_id", "datatype": "string", "array_of": false, "required": true}, {"name": "genetic_ancestry", "datatype": "string", "array_of": true, "required": false}, {"name": "human_phenotype", "datatype": "string", "array_of": false, "required": false}, {"name": "organism_type", "datatype": "string", "array_of": false, "required": false}, {"name": "phenotypic_sex", "datatype": "string", "array_of": false, "required": false}, {"name": "reported_ethnicity", "datatype": "string", "array_of": true, "required": false}], "primaryKey": ["donor_id"]}, {"name": "AnVILFile", "columns": [{"name": "biosample_id", "datatype": "string", "array_of": false, "required": false}, {"name": "data_modality", "datatype": "string", "array_of": true, "required": false}, {"name": "file_format", "datatype": "string", "array_of": false, "required": false}, {"name": "file_id", "datatype": "string", "array_of": false, "required": true}, {"name": "file_md5sum", "datatype": "string", "array_of": false, "required": false}, {"name": "file_name", "datatype": "string", "array_of": false, "required": false}, {"name": "file_ref", "datatype": "string", "array_of": false, "required": false}, {"name": "file_size", "datatype": "integer", "array_of": false, "required": false}, {"name": "reference_assembly", "datatype": "string", "array_of": true, "required": false}], "primaryKey": ["file_id"]}], "relationships": [{"name": "AnVILBioSample.donor_id_to_AnVILDonor.donor_id", "from": {"table": "AnVILBioSample", "column": "donor_id"}, "to": {"table": "AnVILDonor", "column": "donor_id"}}, {"name": "AnVILFile.biosample_id_to_AnVILBioSample.biosample_id", "from": {"table": "AnVILFile", "column": "biosample_id"}, "to": {"table": "AnVILBioSample", "column": "biosample_id"}}]}

0 comments on commit 118e17c

Please sign in to comment.