diff --git a/examples/output/Container-Component-001.json b/examples/output/Container-Component-001.json index 2aceeb9..c15f642 100644 --- a/examples/output/Container-Component-001.json +++ b/examples/output/Container-Component-001.json @@ -1,7 +1,7 @@ { "components": [ { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1003", "component_recorded_value": 5.88, "component_measurement_unit": "g/(100.g)", @@ -9,7 +9,7 @@ "component_derivation_type": "Analytical" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1007", "component_recorded_value": 3.5, "component_measurement_unit": "kcal/(100.g)", @@ -17,7 +17,7 @@ "component_derivation_type": "Analytical" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1062", "component_recorded_value": 1286.0, "component_measurement_unit": "kJ/(100.g)", @@ -25,7 +25,7 @@ "component_derivation_type": "Analytical" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1079", "component_recorded_value": 1.2, "component_measurement_unit": "mg/(100.g)", @@ -33,7 +33,7 @@ "component_derivation_type": "Calculated" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1089", "component_recorded_value": 2.12, "component_measurement_unit": "ug/(100.g)", @@ -41,7 +41,7 @@ "component_derivation_type": "Estimated" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1003", "component_recorded_value": 4.34, "component_measurement_unit": "g/(100.g)", @@ -49,7 +49,7 @@ "component_derivation_type": "Analytical" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1007", "component_recorded_value": 3.08, "component_measurement_unit": "g/(100.g)", @@ -57,7 +57,7 @@ "component_derivation_type": "Analytical" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1062", "component_recorded_value": 1381.0, "component_measurement_unit": "g/(100.g)", @@ -65,7 +65,7 @@ "component_derivation_type": "Sourced from literature" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1079", "component_recorded_value": 1.4, "component_measurement_unit": "g/(100.g)", @@ -77,7 +77,7 @@ "laboratory_sample_aggregation_median_measured_compound_value": 1.5 }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1089", "component_recorded_value": 1.93, "component_measurement_unit": "g/(100.g)", diff --git a/examples/output/Container-Component-001.yaml b/examples/output/Container-Component-001.yaml index a67a1fb..826f8f1 100644 --- a/examples/output/Container-Component-001.yaml +++ b/examples/output/Container-Component-001.yaml @@ -1,53 +1,53 @@ components: -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1003 component_recorded_value: 5.88 component_measurement_unit: g/(100.g) component_data_points_number: 1 component_derivation_type: Analytical -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1007 component_recorded_value: 3.5 component_measurement_unit: kcal/(100.g) component_data_points_number: 1 component_derivation_type: Analytical -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1062 component_recorded_value: 1286.0 component_measurement_unit: kJ/(100.g) component_data_points_number: 2 component_derivation_type: Analytical -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1079 component_recorded_value: 1.2 component_measurement_unit: mg/(100.g) component_data_points_number: 0 component_derivation_type: Calculated -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1089 component_recorded_value: 2.12 component_measurement_unit: ug/(100.g) component_data_points_number: 1 component_derivation_type: Estimated -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1003 component_recorded_value: 4.34 component_measurement_unit: g/(100.g) component_data_points_number: 2 component_derivation_type: Analytical -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1007 component_recorded_value: 3.08 component_measurement_unit: g/(100.g) component_data_points_number: 1 component_derivation_type: Analytical -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1062 component_recorded_value: 1381.0 component_measurement_unit: g/(100.g) component_data_points_number: 0 component_derivation_type: Sourced from literature -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1079 component_recorded_value: 1.4 component_measurement_unit: g/(100.g) @@ -59,7 +59,7 @@ components: laboratory_sample_aggregation_minimum_measured_compound_value: 0.8 laboratory_sample_aggregation_maximum_measured_compound_value: 2.2 laboratory_sample_aggregation_median_measured_compound_value: 1.5 -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1089 component_recorded_value: 1.93 component_measurement_unit: g/(100.g) diff --git a/examples/output/Container-Component-002.json b/examples/output/Container-Component-002.json index ec6b66e..ec18e0f 100644 --- a/examples/output/Container-Component-002.json +++ b/examples/output/Container-Component-002.json @@ -1,7 +1,7 @@ { "components": [ { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1003", "component_recorded_value": 5.88, "component_measurement_unit": "g/(100.g)", @@ -9,7 +9,7 @@ "compound_analytical_measurement_method": "HPLC" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1007", "component_recorded_value": 3.5, "component_measurement_unit": "kcal/(100.g)", @@ -17,7 +17,7 @@ "compound_analytical_measurement_method": "GC" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1062", "component_recorded_value": 1286.0, "component_measurement_unit": "kJ/(100.g)", @@ -25,7 +25,7 @@ "compound_analytical_measurement_method": "GLC" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1079", "component_recorded_value": 1.2, "component_measurement_unit": "mg/(100.g)", @@ -33,7 +33,7 @@ "compound_analytical_measurement_method": "Nephelometry" }, { - "component_id": "FDC:167512", + "component_sample_id": "FDC:167512", "component_type": "COMPONENT:1089", "component_recorded_value": 2.12, "component_measurement_unit": "ug/(100.g)", @@ -42,7 +42,7 @@ "compound_analytical_measurement_method": "Gravimetric" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1003", "component_recorded_value": 4.34, "component_measurement_unit": "g/(100.g)", @@ -51,7 +51,7 @@ "compound_analytical_measurement_method": "Fluorometric" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1007", "component_recorded_value": 3.08, "component_measurement_unit": "g/(100.g)", @@ -59,7 +59,7 @@ "compound_analytical_measurement_method": "Kjeldahl" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1062", "component_recorded_value": 1381.0, "component_measurement_unit": "g/(100.g)", @@ -68,7 +68,7 @@ "compound_analytical_measurement_method": "HPLC" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1079", "component_recorded_value": 1.4, "component_measurement_unit": "g/(100.g)", @@ -76,7 +76,7 @@ "compound_analytical_measurement_method": "HPLC" }, { - "component_id": "FDC:167513", + "component_sample_id": "FDC:167513", "component_type": "COMPONENT:1089", "component_recorded_value": 1.93, "component_measurement_unit": "g/(100.g)", diff --git a/examples/output/Container-Component-002.yaml b/examples/output/Container-Component-002.yaml index 8bb0f51..4cf0fdf 100644 --- a/examples/output/Container-Component-002.yaml +++ b/examples/output/Container-Component-002.yaml @@ -1,62 +1,62 @@ components: -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1003 component_recorded_value: 5.88 component_measurement_unit: g/(100.g) component_data_points_number: 1 compound_analytical_measurement_method: HPLC -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1007 component_recorded_value: 3.5 component_measurement_unit: kcal/(100.g) component_data_points_number: 1 compound_analytical_measurement_method: GC -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1062 component_recorded_value: 1286.0 component_measurement_unit: kJ/(100.g) component_data_points_number: 2 compound_analytical_measurement_method: GLC -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1079 component_recorded_value: 1.2 component_measurement_unit: mg/(100.g) component_data_points_number: 0 compound_analytical_measurement_method: Nephelometry -- component_id: FDC:167512 +- component_sample_id: FDC:167512 component_type: COMPONENT:1089 component_recorded_value: 2.12 component_measurement_unit: ug/(100.g) component_data_points_number: 1 compound_analytical_measurement_protocol_doi: ' AOAC 934.06 mod' compound_analytical_measurement_method: Gravimetric -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1003 component_recorded_value: 4.34 component_measurement_unit: g/(100.g) component_data_points_number: 2 compound_analytical_measurement_protocol_doi: AOAC 985.01 + 984.27 compound_analytical_measurement_method: Fluorometric -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1007 component_recorded_value: 3.08 component_measurement_unit: g/(100.g) component_data_points_number: 1 compound_analytical_measurement_method: Kjeldahl -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1062 component_recorded_value: 1381.0 component_measurement_unit: g/(100.g) component_data_points_number: 0 compound_analytical_measurement_protocol_doi: AOAC 996.06 compound_analytical_measurement_method: HPLC -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1079 component_recorded_value: 1.4 component_measurement_unit: g/(100.g) component_data_points_number: 6 compound_analytical_measurement_method: HPLC -- component_id: FDC:167513 +- component_sample_id: FDC:167513 component_type: COMPONENT:1089 component_recorded_value: 1.93 component_measurement_unit: g/(100.g) diff --git a/examples/output/Container-Component-003.json b/examples/output/Container-Component-003.json index 62b279b..50020f4 100644 --- a/examples/output/Container-Component-003.json +++ b/examples/output/Container-Component-003.json @@ -1,10 +1,7 @@ { "components": [ { - "laboratory_sample_id": "CY124QU", - "laboratory_sample_aliquot_id": "NFY122JPN", - "laboratory_sample_batch_id": "o", - "component_id": "167512", + "component_sample_id": "CY124QU", "component_type": "COMPONENT:1075", "component_type_label": "galactose", "component_recorded_value": 0.52, @@ -12,14 +9,13 @@ "component_data_points_number": 1, "component_analysis_date": "March 8, 2023", "compound_analytical_measurement_protocol_doi": "SUGR-GALAC-CHG", - "laboratory_conducting_analytical_analysis": "Silliker", - "component_quality_control_remeasurement": false + "compound_analytical_laboratory_name": "Silliker", + "component_quality_control_remeasurement": false, + "food_laboratory_sample_aliquot_id": "NFY122JPN", + "food_laboratory_sample_batch_id": "o" }, { - "laboratory_sample_id": "CY124QX", - "laboratory_sample_aliquot_id": "NFY122JRQ", - "laboratory_sample_batch_id": "o", - "component_id": "167513", + "component_sample_id": "CY124QX", "component_type": "COMPONENT:1014", "component_type_label": "maltose", "component_recorded_value": 0.0, @@ -28,13 +24,12 @@ "component_analysis_date": "March 9, 2023", "component_limit_of_quantitation": "<0.25", "compound_analytical_measurement_protocol_doi": "SUGR-DP1-2-CHG", - "laboratory_conducting_analytical_analysis": "Silliker" + "compound_analytical_laboratory_name": "Silliker", + "food_laboratory_sample_aliquot_id": "NFY122JRQ", + "food_laboratory_sample_batch_id": "o" }, { - "laboratory_sample_id": "CY124R2", - "laboratory_sample_aliquot_id": "NFY122JV9", - "laboratory_sample_batch_id": "q", - "component_id": "167514", + "component_sample_id": "CY124R2", "component_type": "COMPONENT:1011", "component_type_label": "glucose", "component_recorded_value": 0.0, @@ -43,8 +38,10 @@ "component_analysis_date": "March 17, 2023", "component_limit_of_quantitation": "<0.25", "compound_analytical_measurement_protocol_doi": "SUGR-DP1-2-CHG", - "laboratory_conducting_analytical_analysis": "Silliker", - "component_quality_control_remeasurement": true + "compound_analytical_laboratory_name": "Silliker", + "component_quality_control_remeasurement": true, + "food_laboratory_sample_aliquot_id": "NFY122JV9", + "food_laboratory_sample_batch_id": "q" } ], "@type": "Container" diff --git a/examples/output/Container-Component-003.yaml b/examples/output/Container-Component-003.yaml index 4c2ae5e..d8f2bc9 100644 --- a/examples/output/Container-Component-003.yaml +++ b/examples/output/Container-Component-003.yaml @@ -1,8 +1,5 @@ components: -- laboratory_sample_id: CY124QU - laboratory_sample_aliquot_id: NFY122JPN - laboratory_sample_batch_id: o - component_id: '167512' +- component_sample_id: CY124QU component_type: COMPONENT:1075 component_type_label: galactose component_recorded_value: 0.52 @@ -10,12 +7,11 @@ components: component_data_points_number: 1 component_analysis_date: March 8, 2023 compound_analytical_measurement_protocol_doi: SUGR-GALAC-CHG - laboratory_conducting_analytical_analysis: Silliker + compound_analytical_laboratory_name: Silliker component_quality_control_remeasurement: false -- laboratory_sample_id: CY124QX - laboratory_sample_aliquot_id: NFY122JRQ - laboratory_sample_batch_id: o - component_id: '167513' + food_laboratory_sample_aliquot_id: NFY122JPN + food_laboratory_sample_batch_id: o +- component_sample_id: CY124QX component_type: COMPONENT:1014 component_type_label: maltose component_recorded_value: 0.0 @@ -24,11 +20,10 @@ components: component_analysis_date: March 9, 2023 component_limit_of_quantitation: <0.25 compound_analytical_measurement_protocol_doi: SUGR-DP1-2-CHG - laboratory_conducting_analytical_analysis: Silliker -- laboratory_sample_id: CY124R2 - laboratory_sample_aliquot_id: NFY122JV9 - laboratory_sample_batch_id: q - component_id: '167514' + compound_analytical_laboratory_name: Silliker + food_laboratory_sample_aliquot_id: NFY122JRQ + food_laboratory_sample_batch_id: o +- component_sample_id: CY124R2 component_type: COMPONENT:1011 component_type_label: glucose component_recorded_value: 0.0 @@ -37,5 +32,7 @@ components: component_analysis_date: March 17, 2023 component_limit_of_quantitation: <0.25 compound_analytical_measurement_protocol_doi: SUGR-DP1-2-CHG - laboratory_conducting_analytical_analysis: Silliker + compound_analytical_laboratory_name: Silliker component_quality_control_remeasurement: true + food_laboratory_sample_aliquot_id: NFY122JV9 + food_laboratory_sample_batch_id: q diff --git a/examples/output/Container-Food-001.json b/examples/output/Container-Food-001.json index dfd69dd..a587b19 100644 --- a/examples/output/Container-Food-001.json +++ b/examples/output/Container-Food-001.json @@ -1,13 +1,13 @@ { "foods": [ { - "food_id": "FDC:167512", + "food_sample_id": "FDC:167512", "food_primary_type": "FOOD:11954", "food_primary_type_label": "Tomatillos, raw", "food_preservation_state": "raw" }, { - "food_id": "FDC:167513", + "food_sample_id": "FDC:167513", "food_primary_type": "FOOD:10100", "food_primary_type_label": "Pork, fresh, variety meats and by-products, ears, frozen, raw", "food_preservation_state": "raw", diff --git a/examples/output/Container-Food-001.yaml b/examples/output/Container-Food-001.yaml index f9de723..3514b7c 100644 --- a/examples/output/Container-Food-001.yaml +++ b/examples/output/Container-Food-001.yaml @@ -1,9 +1,9 @@ foods: -- food_id: FDC:167512 +- food_sample_id: FDC:167512 food_primary_type: FOOD:11954 food_primary_type_label: Tomatillos, raw food_preservation_state: raw -- food_id: FDC:167513 +- food_sample_id: FDC:167513 food_primary_type: FOOD:10100 food_primary_type_label: Pork, fresh, variety meats and by-products, ears, frozen, raw diff --git a/examples/output/Container-Food-002.json b/examples/output/Container-Food-002.json index 81619a4..48dbb23 100644 --- a/examples/output/Container-Food-002.json +++ b/examples/output/Container-Food-002.json @@ -1,7 +1,7 @@ { "foods": [ { - "food_id": "FDC:392739", + "food_sample_id": "FDC:392739", "food_primary_type": "FOOD:4601", "food_primary_type_label": "Butter, light, stick, with salt", "food_upc_code": 40822011143, @@ -16,7 +16,7 @@ "food_expiration_date": "2015-12-07" }, { - "food_id": "FDC:392740", + "food_sample_id": "FDC:392740", "food_primary_type": "FOOD:11601", "food_primary_type_label": "Yam, raw", "food_upc_code": 79893110196, diff --git a/examples/output/Container-Food-002.yaml b/examples/output/Container-Food-002.yaml index 1af52ec..0c6731b 100644 --- a/examples/output/Container-Food-002.yaml +++ b/examples/output/Container-Food-002.yaml @@ -1,5 +1,5 @@ foods: -- food_id: FDC:392739 +- food_sample_id: FDC:392739 food_primary_type: FOOD:4601 food_primary_type_label: Butter, light, stick, with salt food_upc_code: 40822011143 @@ -12,7 +12,7 @@ foods: food_distributor_country: United States of America food_distributor_country_subdivision: Ohio food_expiration_date: '2015-12-07' -- food_id: FDC:392740 +- food_sample_id: FDC:392740 food_primary_type: FOOD:11601 food_primary_type_label: Yam, raw food_upc_code: 79893110196 diff --git a/examples/output/README.md b/examples/output/README.md index 05918a6..0a9905f 100644 --- a/examples/output/README.md +++ b/examples/output/README.md @@ -2,15 +2,15 @@ ### Input ```yaml foods: -- food_id: FDC:167512 - food_preservation_state: raw +- food_preservation_state: raw food_primary_type: FOOD:11954 food_primary_type_label: Tomatillos, raw -- food_id: FDC:167513 - food_preservation_state: raw + food_sample_id: FDC:167512 +- food_preservation_state: raw food_primary_type: FOOD:10100 food_primary_type_label: Pork, fresh, variety meats and by-products, ears, frozen, raw + food_sample_id: FDC:167513 food_storage_temperature_state: frozen ``` @@ -20,69 +20,69 @@ foods: components: - component_data_points_number: 1 component_derivation_type: Analytical - component_id: FDC:167512 component_measurement_unit: g/(100.g) component_recorded_value: 5.88 + component_sample_id: FDC:167512 component_type: COMPONENT:1003 - component_data_points_number: 1 component_derivation_type: Analytical - component_id: FDC:167512 component_measurement_unit: kcal/(100.g) component_recorded_value: 3.5 + component_sample_id: FDC:167512 component_type: COMPONENT:1007 - component_data_points_number: 2 component_derivation_type: Analytical - component_id: FDC:167512 component_measurement_unit: kJ/(100.g) component_recorded_value: 1286.0 + component_sample_id: FDC:167512 component_type: COMPONENT:1062 - component_data_points_number: 0 component_derivation_type: Calculated - component_id: FDC:167512 component_measurement_unit: mg/(100.g) component_recorded_value: 1.2 + component_sample_id: FDC:167512 component_type: COMPONENT:1079 - component_data_points_number: 1 component_derivation_type: Estimated - component_id: FDC:167512 component_measurement_unit: ug/(100.g) component_recorded_value: 2.12 + component_sample_id: FDC:167512 component_type: COMPONENT:1089 - component_data_points_number: 2 component_derivation_type: Analytical - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 4.34 + component_sample_id: FDC:167513 component_type: COMPONENT:1003 - component_data_points_number: 1 component_derivation_type: Analytical - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 3.08 + component_sample_id: FDC:167513 component_type: COMPONENT:1007 - component_data_points_number: 0 component_derivation_type: Sourced from literature - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1381.0 + component_sample_id: FDC:167513 component_type: COMPONENT:1062 - component_comment: Samples were obtained from 12 retail stores using a probability-based sampling plan. Some fish had been treated during processing to retain moisture on thawing. Untreated fish = 265 mg sodium/100g. component_data_points_number: 6 component_derivation_type: Analytical - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1.4 + component_sample_id: FDC:167513 component_type: COMPONENT:1079 laboratory_sample_aggregation_maximum_measured_compound_value: 2.2 laboratory_sample_aggregation_median_measured_compound_value: 1.5 laboratory_sample_aggregation_minimum_measured_compound_value: 0.8 - component_data_points_number: 3 component_derivation_type: Analytical - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1.93 + component_sample_id: FDC:167513 component_type: COMPONENT:1089 ``` @@ -102,44 +102,41 @@ provenances: components: - component_analysis_date: March 8, 2023 component_data_points_number: 1 - component_id: '167512' component_measurement_unit: g/(100.g) component_quality_control_remeasurement: false component_recorded_value: 0.52 + component_sample_id: CY124QU component_type: COMPONENT:1075 component_type_label: galactose + compound_analytical_laboratory_name: Silliker compound_analytical_measurement_protocol_doi: SUGR-GALAC-CHG - laboratory_conducting_analytical_analysis: Silliker - laboratory_sample_aliquot_id: NFY122JPN - laboratory_sample_batch_id: o - laboratory_sample_id: CY124QU + food_laboratory_sample_aliquot_id: NFY122JPN + food_laboratory_sample_batch_id: o - component_analysis_date: March 9, 2023 component_data_points_number: 1 - component_id: '167513' component_limit_of_quantitation: <0.25 component_measurement_unit: g/(100.g) component_recorded_value: 0.0 + component_sample_id: CY124QX component_type: COMPONENT:1014 component_type_label: maltose + compound_analytical_laboratory_name: Silliker compound_analytical_measurement_protocol_doi: SUGR-DP1-2-CHG - laboratory_conducting_analytical_analysis: Silliker - laboratory_sample_aliquot_id: NFY122JRQ - laboratory_sample_batch_id: o - laboratory_sample_id: CY124QX + food_laboratory_sample_aliquot_id: NFY122JRQ + food_laboratory_sample_batch_id: o - component_analysis_date: March 17, 2023 component_data_points_number: 1 - component_id: '167514' component_limit_of_quantitation: <0.25 component_measurement_unit: g/(100.g) component_quality_control_remeasurement: true component_recorded_value: 0.0 + component_sample_id: CY124R2 component_type: COMPONENT:1011 component_type_label: glucose + compound_analytical_laboratory_name: Silliker compound_analytical_measurement_protocol_doi: SUGR-DP1-2-CHG - laboratory_conducting_analytical_analysis: Silliker - laboratory_sample_aliquot_id: NFY122JV9 - laboratory_sample_batch_id: q - laboratory_sample_id: CY124R2 + food_laboratory_sample_aliquot_id: NFY122JV9 + food_laboratory_sample_batch_id: q ``` ## Container-Component-002 @@ -147,66 +144,66 @@ components: ```yaml components: - component_data_points_number: 1 - component_id: FDC:167512 component_measurement_unit: g/(100.g) component_recorded_value: 5.88 + component_sample_id: FDC:167512 component_type: COMPONENT:1003 compound_analytical_measurement_method: HPLC - component_data_points_number: 1 - component_id: FDC:167512 component_measurement_unit: kcal/(100.g) component_recorded_value: 3.5 + component_sample_id: FDC:167512 component_type: COMPONENT:1007 compound_analytical_measurement_method: GC - component_data_points_number: 2 - component_id: FDC:167512 component_measurement_unit: kJ/(100.g) component_recorded_value: 1286.0 + component_sample_id: FDC:167512 component_type: COMPONENT:1062 compound_analytical_measurement_method: GLC - component_data_points_number: 0 - component_id: FDC:167512 component_measurement_unit: mg/(100.g) component_recorded_value: 1.2 + component_sample_id: FDC:167512 component_type: COMPONENT:1079 compound_analytical_measurement_method: Nephelometry - component_data_points_number: 1 - component_id: FDC:167512 component_measurement_unit: ug/(100.g) component_recorded_value: 2.12 + component_sample_id: FDC:167512 component_type: COMPONENT:1089 compound_analytical_measurement_method: Gravimetric compound_analytical_measurement_protocol_doi: ' AOAC 934.06 mod' - component_data_points_number: 2 - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 4.34 + component_sample_id: FDC:167513 component_type: COMPONENT:1003 compound_analytical_measurement_method: Fluorometric compound_analytical_measurement_protocol_doi: AOAC 985.01 + 984.27 - component_data_points_number: 1 - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 3.08 + component_sample_id: FDC:167513 component_type: COMPONENT:1007 compound_analytical_measurement_method: Kjeldahl - component_data_points_number: 0 - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1381.0 + component_sample_id: FDC:167513 component_type: COMPONENT:1062 compound_analytical_measurement_method: HPLC compound_analytical_measurement_protocol_doi: AOAC 996.06 - component_data_points_number: 6 - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1.4 + component_sample_id: FDC:167513 component_type: COMPONENT:1079 compound_analytical_measurement_method: HPLC - component_data_points_number: 3 - component_id: FDC:167513 component_measurement_unit: g/(100.g) component_recorded_value: 1.93 + component_sample_id: FDC:167513 component_type: COMPONENT:1089 compound_analytical_measurement_method: HPLC @@ -223,10 +220,10 @@ foods: food_distributor_country: United States of America food_distributor_country_subdivision: Ohio food_expiration_date: '2015-12-07' - food_id: FDC:392739 food_preservation_state: fresh food_primary_type: FOOD:4601 food_primary_type_label: Butter, light, stick, with salt + food_sample_id: FDC:392739 food_upc_code: 40822011143 - food_acquisition_city: TUCSON food_acquisition_country: USA @@ -236,10 +233,10 @@ foods: food_distributor_country: Mexico food_distributor_country_subdivision: Veracruz food_expiration_date: '2018-04-25' - food_id: FDC:392740 food_preservation_state: raw food_primary_type: FOOD:11601 food_primary_type_label: Yam, raw + food_sample_id: FDC:392740 food_upc_code: 79893110196 ``` diff --git a/project/excel/mifc.xlsx b/project/excel/mifc.xlsx index b33da88..d2e3714 100644 Binary files a/project/excel/mifc.xlsx and b/project/excel/mifc.xlsx differ diff --git a/project/graphql/mifc.graphql b/project/graphql/mifc.graphql index d4d82d6..43a35d0 100644 --- a/project/graphql/mifc.graphql +++ b/project/graphql/mifc.graphql @@ -1,10 +1,7 @@ # metamodel_version: 1.7.0 type Component { - laboratorySampleId: String - laboratorySampleAliquotId: String - laboratorySampleBatchId: String - componentId: String! + componentSampleId: String! componentType: String componentTypeLabel: String componentRecordedValue: Float @@ -21,8 +18,11 @@ type Component laboratorySampleAggregationMeasuredCompoundStandardDeviation: Float compoundAnalyticalMeasurementProtocolDoi: String compoundAnalyticalMeasurementMethod: AnalyticalMeasurementMethod - laboratoryConductingAnalyticalAnalysis: String + compoundAnalyticalLaboratoryName: String componentQualityControlRemeasurement: Boolean + foodLaboratorySampleId: String + foodLaboratorySampleAliquotId: String + foodLaboratorySampleBatchId: String } type Container @@ -34,10 +34,7 @@ type Container type Food { - laboratorySampleId: String - laboratorySampleAliquotId: String - laboratorySampleBatchId: String - foodId: String! + foodSampleId: String! foodPrimaryType: String foodPrimaryTypeLabel: String foodUpcCode: Integer @@ -60,20 +57,17 @@ type Food foodExpirationDate: String foodCategoryLabel: String foodAdditionalTypes: String + foodLaboratorySampleId: String + foodLaboratorySampleAliquotId: String + foodLaboratorySampleBatchId: String } interface NamedThing { - laboratorySampleId: String - laboratorySampleAliquotId: String - laboratorySampleBatchId: String } type Provenance { - laboratorySampleId: String - laboratorySampleAliquotId: String - laboratorySampleBatchId: String datasetLabel: String mifcVersionTag: String contributorOrcid: String diff --git a/project/jsonld/mifc.context.jsonld b/project/jsonld/mifc.context.jsonld index 7c64b07..7d6ba4b 100644 --- a/project/jsonld/mifc.context.jsonld +++ b/project/jsonld/mifc.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-06-20T16:33:59", + "generation_date": "2024-06-20T17:37:48", "source": "mifc.yaml" }, "@context": { @@ -35,9 +35,6 @@ "component_derivation_type": { "@id": "component_derivation_type" }, - "component_id": { - "@id": "component_id" - }, "component_limit_of_quantitation": { "@id": "component_limit_of_quantitation" }, @@ -55,12 +52,18 @@ "@type": "xsd:float", "@id": "component_recorded_value" }, + "component_sample_id": { + "@id": "component_sample_id" + }, "component_type": { "@id": "component_type" }, "component_type_label": { "@id": "component_type_label" }, + "compound_analytical_laboratory_name": { + "@id": "compound_analytical_laboratory_name" + }, "compound_analytical_measurement_method": { "@context": { "@vocab": "@null", @@ -153,7 +156,15 @@ "food_expiration_date": { "@id": "food_expiration_date" }, - "food_id": "@id", + "food_laboratory_sample_aliquot_id": { + "@id": "food_laboratory_sample_aliquot_id" + }, + "food_laboratory_sample_batch_id": { + "@id": "food_laboratory_sample_batch_id" + }, + "food_laboratory_sample_id": { + "@id": "food_laboratory_sample_id" + }, "food_preservation_state": { "@context": { "@vocab": "@null", @@ -178,6 +189,7 @@ }, "@id": "food_ripeness_state" }, + "food_sample_id": "@id", "food_storage_temperature_state": { "@context": { "@vocab": "@null", @@ -191,9 +203,6 @@ "@type": "xsd:integer", "@id": "food_upc_code" }, - "laboratory_conducting_analytical_analysis": { - "@id": "laboratory_conducting_analytical_analysis" - }, "laboratory_sample_aggregation_maximum_measured_compound_value": { "@type": "xsd:float", "@id": "laboratory_sample_aggregation_maximum_measured_compound_value" @@ -210,15 +219,6 @@ "@type": "xsd:float", "@id": "laboratory_sample_aggregation_minimum_measured_compound_value" }, - "laboratory_sample_aliquot_id": { - "@id": "laboratory_sample_aliquot_id" - }, - "laboratory_sample_batch_id": { - "@id": "laboratory_sample_batch_id" - }, - "laboratory_sample_id": { - "@id": "laboratory_sample_id" - }, "mifc_version_tag": { "@id": "mifc_version_tag" }, diff --git a/project/jsonld/mifc.jsonld b/project/jsonld/mifc.jsonld index 23432cd..19a659f 100644 --- a/project/jsonld/mifc.jsonld +++ b/project/jsonld/mifc.jsonld @@ -640,50 +640,11 @@ ], "slots": [ { - "name": "laboratory_sample_id", - "definition_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_id", - "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", - "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_id", - "owner": "NamedThing", - "domain_of": [ - "NamedThing" - ], - "range": "string", - "@type": "SlotDefinition" - }, - { - "name": "laboratory_sample_aliquot_id", - "definition_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_aliquot_id", - "description": "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample.", + "name": "food_sample_id", + "definition_uri": "https://w3id.org/kaiiam/mifc/food_sample_id", + "description": "A string denoting the primary identifier for a sample of the class Food. Note that food_sample_id should be unique in a given dataset and should be used to relate Food and Component records via component_sample_id from the Component class.", "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_aliquot_id", - "owner": "NamedThing", - "domain_of": [ - "NamedThing" - ], - "range": "string", - "@type": "SlotDefinition" - }, - { - "name": "laboratory_sample_batch_id", - "definition_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_batch_id", - "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", - "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/laboratory_sample_batch_id", - "owner": "NamedThing", - "domain_of": [ - "NamedThing" - ], - "range": "string", - "@type": "SlotDefinition" - }, - { - "name": "food_id", - "definition_uri": "https://w3id.org/kaiiam/mifc/food_id", - "description": "A string denoting the primary identifier for a sample of the class Food. Note that food_id should be unique in a given dataset and should be used to relate Food and Component records via component_id from the Component class.", - "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/food_id", + "slot_uri": "https://w3id.org/kaiiam/mifc/food_sample_id", "identifier": true, "owner": "Food", "domain_of": [ @@ -1013,11 +974,11 @@ "@type": "SlotDefinition" }, { - "name": "component_id", - "definition_uri": "https://w3id.org/kaiiam/mifc/component_id", - "description": "A string denoting the primary identifier for a sample of the class Component. Note that component_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_id from the Food class.", + "name": "component_sample_id", + "definition_uri": "https://w3id.org/kaiiam/mifc/component_sample_id", + "description": "A string denoting the primary identifier for a sample of the class Component. Note that component_sample_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_sample_id from the Food class.", "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/component_id", + "slot_uri": "https://w3id.org/kaiiam/mifc/component_sample_id", "owner": "Component", "domain_of": [ "Component" @@ -1244,11 +1205,11 @@ "@type": "SlotDefinition" }, { - "name": "laboratory_conducting_analytical_analysis", - "definition_uri": "https://w3id.org/kaiiam/mifc/laboratory_conducting_analytical_analysis", - "description": "A string denoting the name of a laboratory that conducted the analytical analysis of a measured_compound.", + "name": "compound_analytical_laboratory_name", + "definition_uri": "https://w3id.org/kaiiam/mifc/compound_analytical_laboratory_name", + "description": "A string denoting the name of a laboratory that conducted the analytical analysis of a component of nutritional interest.", "from_schema": "https://w3id.org/kaiiam/mifc", - "slot_uri": "https://w3id.org/kaiiam/mifc/laboratory_conducting_analytical_analysis", + "slot_uri": "https://w3id.org/kaiiam/mifc/compound_analytical_laboratory_name", "owner": "Component", "domain_of": [ "Component" @@ -1324,6 +1285,54 @@ "range": "string", "@type": "SlotDefinition" }, + { + "name": "food_laboratory_sample_id", + "definition_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_id", + "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", + "comments": [ + "Only use this attribute if a separate ID is assigned to laboratory samples derived from food samples. Otherwise just use the food_sample_id." + ], + "from_schema": "https://w3id.org/kaiiam/mifc", + "slot_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_id", + "owner": "Component", + "domain_of": [ + "Food", + "Component" + ], + "range": "string", + "@type": "SlotDefinition" + }, + { + "name": "food_laboratory_sample_aliquot_id", + "definition_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_aliquot_id", + "description": "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample.", + "comments": [ + "Only use this attribute if identifiers are assigned to aliquots/sub-samples of food laboratory samples denoted by their food_laboratory_sample_id." + ], + "from_schema": "https://w3id.org/kaiiam/mifc", + "slot_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_aliquot_id", + "owner": "Component", + "domain_of": [ + "Food", + "Component" + ], + "range": "string", + "@type": "SlotDefinition" + }, + { + "name": "food_laboratory_sample_batch_id", + "definition_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_batch_id", + "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", + "from_schema": "https://w3id.org/kaiiam/mifc", + "slot_uri": "https://w3id.org/kaiiam/mifc/food_laboratory_sample_batch_id", + "owner": "Component", + "domain_of": [ + "Food", + "Component" + ], + "range": "string", + "@type": "SlotDefinition" + }, { "name": "container__foods", "from_schema": "https://w3id.org/kaiiam/mifc", @@ -1379,11 +1388,6 @@ "schema:Thing" ], "abstract": true, - "slots": [ - "laboratory_sample_id", - "laboratory_sample_aliquot_id", - "laboratory_sample_batch_id" - ], "slot_usage": {}, "class_uri": "https://w3id.org/kaiiam/mifc/NamedThing", "@type": "ClassDefinition" @@ -1401,10 +1405,7 @@ ], "is_a": "NamedThing", "slots": [ - "laboratory_sample_id", - "laboratory_sample_aliquot_id", - "laboratory_sample_batch_id", - "food_id", + "food_sample_id", "food_primary_type", "food_primary_type_label", "food_upc_code", @@ -1426,7 +1427,10 @@ "food_distributor_country_subdivision", "food_expiration_date", "food_category_label", - "food_additional_types" + "food_additional_types", + "food_laboratory_sample_id", + "food_laboratory_sample_aliquot_id", + "food_laboratory_sample_batch_id" ], "slot_usage": {}, "class_uri": "http://schema.org/Food", @@ -1442,10 +1446,7 @@ ], "is_a": "NamedThing", "slots": [ - "laboratory_sample_id", - "laboratory_sample_aliquot_id", - "laboratory_sample_batch_id", - "component_id", + "component_sample_id", "component_type", "component_type_label", "component_recorded_value", @@ -1462,8 +1463,11 @@ "laboratory_sample_aggregation_measured_compound_standard_deviation", "compound_analytical_measurement_protocol_doi", "compound_analytical_measurement_method", - "laboratory_conducting_analytical_analysis", - "component_quality_control_remeasurement" + "compound_analytical_laboratory_name", + "component_quality_control_remeasurement", + "food_laboratory_sample_id", + "food_laboratory_sample_aliquot_id", + "food_laboratory_sample_batch_id" ], "slot_usage": {}, "class_uri": "http://schema.org/Component", @@ -1479,9 +1483,6 @@ ], "is_a": "NamedThing", "slots": [ - "laboratory_sample_id", - "laboratory_sample_aliquot_id", - "laboratory_sample_batch_id", "dataset_label", "mifc_version_tag", "contributor_orcid", @@ -1531,9 +1532,9 @@ ], "metamodel_version": "1.7.0", "source_file": "mifc.yaml", - "source_file_date": "2024-06-20T16:29:33", - "source_file_size": 17156, - "generation_date": "2024-06-20T16:33:59", + "source_file_date": "2024-06-20T17:34:49", + "source_file_size": 17711, + "generation_date": "2024-06-20T17:37:48", "@type": "SchemaDefinition", "@context": [ "project/jsonld/mifc.context.jsonld", diff --git a/project/jsonschema/mifc.schema.json b/project/jsonschema/mifc.schema.json index bd265dd..a15d562 100644 --- a/project/jsonschema/mifc.schema.json +++ b/project/jsonschema/mifc.schema.json @@ -34,10 +34,6 @@ "description": "A controlled vocabulary term denoting how a component of nutritional interest was generated, (e.g., Analytical or Calculated).", "type": "string" }, - "component_id": { - "description": "A string denoting the primary identifier for a sample of the class Component. Note that component_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_id from the Food class.", - "type": "string" - }, "component_limit_of_quantitation": { "description": "A string representing the lowest analyte concentration likely to be reliably distinguished from the Limit of Blank (LoB) and at which detection is feasible during the analysis of a component of nutritional interest.", "type": "string" @@ -58,6 +54,10 @@ "description": "A float representing a recorded value of a component of nutritional interest measured from a laboratory sample derived from a food sample.", "type": "number" }, + "component_sample_id": { + "description": "A string denoting the primary identifier for a sample of the class Component. Note that component_sample_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_sample_id from the Food class.", + "type": "string" + }, "component_type": { "description": "A controlled vocabulary term representing the type of component of nutritional interest analyzed from a food sample.", "type": "string" @@ -66,6 +66,10 @@ "description": "A string denoting the label of a controlled vocabulary term representing an analyzed component_type from a food sample.", "type": "string" }, + "compound_analytical_laboratory_name": { + "description": "A string denoting the name of a laboratory that conducted the analytical analysis of a component of nutritional interest.", + "type": "string" + }, "compound_analytical_measurement_method": { "$ref": "#/$defs/AnalyticalMeasurementMethod", "description": "A controlled vocabulary term denoting the method used to conduct an analytical analysis on a sample, (e.g., HPLC)." @@ -74,8 +78,16 @@ "description": "A string denoting a digital object identifier link to a measurement protocol used to conduct an analytical analysis on a sample.", "type": "string" }, - "laboratory_conducting_analytical_analysis": { - "description": "A string denoting the name of a laboratory that conducted the analytical analysis of a measured_compound.", + "food_laboratory_sample_aliquot_id": { + "description": "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample.", + "type": "string" + }, + "food_laboratory_sample_batch_id": { + "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", + "type": "string" + }, + "food_laboratory_sample_id": { + "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", "type": "string" }, "laboratory_sample_aggregation_maximum_measured_compound_value": { @@ -93,22 +105,10 @@ "laboratory_sample_aggregation_minimum_measured_compound_value": { "description": "A float representing the minimum measured compound value of an aggregation of samples.", "type": "number" - }, - "laboratory_sample_aliquot_id": { - "description": "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample.", - "type": "string" - }, - "laboratory_sample_batch_id": { - "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", - "type": "string" - }, - "laboratory_sample_id": { - "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", - "type": "string" } }, "required": [ - "component_id" + "component_sample_id" ], "title": "Component", "type": "object" @@ -207,8 +207,16 @@ "description": "A datetime value representing the food expiration data as shown on the labeling information of the food sample.", "type": "string" }, - "food_id": { - "description": "A string denoting the primary identifier for a sample of the class Food. Note that food_id should be unique in a given dataset and should be used to relate Food and Component records via component_id from the Component class.", + "food_laboratory_sample_aliquot_id": { + "description": "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample.", + "type": "string" + }, + "food_laboratory_sample_batch_id": { + "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", + "type": "string" + }, + "food_laboratory_sample_id": { + "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", "type": "string" }, "food_preservation_state": { @@ -227,6 +235,10 @@ "$ref": "#/$defs/FoodRipenessState", "description": "An enumerated set of controlled vocabulary terms representing the qualitative freshness state of a food sample when prepared for analysis." }, + "food_sample_id": { + "description": "A string denoting the primary identifier for a sample of the class Food. Note that food_sample_id should be unique in a given dataset and should be used to relate Food and Component records via component_sample_id from the Component class.", + "type": "string" + }, "food_storage_temperature_state": { "$ref": "#/$defs/FoodStorageTemperatureState", "description": "An enumerated set of controlled vocabulary terms representing the qualitative temperature state at which a food sample was stored prior to acquisition (e.g., \"Refrigerated\")." @@ -234,22 +246,10 @@ "food_upc_code": { "description": "An integer denoting a Universal Product Code (UPC) barcode of a food sample.", "type": "integer" - }, - "laboratory_sample_aliquot_id": { - "description": "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample.", - "type": "string" - }, - "laboratory_sample_batch_id": { - "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", - "type": "string" - }, - "laboratory_sample_id": { - "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", - "type": "string" } }, "required": [ - "food_id" + "food_sample_id" ], "title": "Food", "type": "object" @@ -371,18 +371,6 @@ "description": "A string corresponding to the labeled name of dataset (e.g., \"Standard Reference (SR) Legacy\").", "type": "string" }, - "laboratory_sample_aliquot_id": { - "description": "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample.", - "type": "string" - }, - "laboratory_sample_batch_id": { - "description": "A string denoting an identifier of a batch of laboratory samples analysed together.", - "type": "string" - }, - "laboratory_sample_id": { - "description": "A string denoting an identifier of a laboratory sample which was prepared from a food sample.", - "type": "string" - }, "mifc_version_tag": { "description": "A string corresponding to a named MIFC release number (e.g., \"v1.0.1\").", "type": "string" diff --git a/project/owl/mifc.owl.ttl b/project/owl/mifc.owl.ttl index db39277..d4e13bd 100644 --- a/project/owl/mifc.owl.ttl +++ b/project/owl/mifc.owl.ttl @@ -15,22 +15,22 @@ mifc:Container a owl:Class, linkml:ClassDefinition ; rdfs:label "Container" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom mifc:Food ; - owl:onProperty mifc:foods ], - [ a owl:Restriction ; owl:allValuesFrom mifc:Provenance ; owl:onProperty mifc:provenances ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:provenances ], - [ a owl:Restriction ; - owl:allValuesFrom mifc:Component ; owl:onProperty mifc:components ], + [ a owl:Restriction ; + owl:allValuesFrom mifc:Food ; + owl:onProperty mifc:foods ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty mifc:foods ], [ a owl:Restriction ; owl:minCardinality 0 ; + owl:onProperty mifc:provenances ], + [ a owl:Restriction ; + owl:allValuesFrom mifc:Component ; owl:onProperty mifc:components ] ; skos:inScheme . @@ -38,143 +38,182 @@ mifc:Component a owl:Class, linkml:ClassDefinition ; rdfs:label "Component" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:component_analysis_date ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:component_comment ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:compound_analytical_laboratory_name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_data_points_number ], + owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_type_label ], + owl:onProperty mifc:food_laboratory_sample_batch_id ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:component_sample_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_record_date ], + owl:onProperty mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Float ; - owl:onProperty mifc:component_recorded_value ], + owl:allValuesFrom mifc:AnalyticalMeasurementMethod ; + owl:onProperty mifc:compound_analytical_measurement_method ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_type_label ], + owl:onProperty mifc:component_quality_control_remeasurement ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_derivation_type ], + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_conducting_analytical_analysis ], + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:component_type_label ], + [ a owl:Restriction ; + owl:minCardinality 1 ; + owl:onProperty mifc:component_sample_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:laboratory_conducting_analytical_analysis ], + owl:onProperty mifc:component_comment ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_type ], + owl:onProperty mifc:component_analysis_date ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty mifc:component_quality_control_remeasurement ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:component_limit_of_quantitation ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:component_data_points_number ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Integer ; + owl:onProperty mifc:component_data_points_number ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:compound_analytical_measurement_method ], [ a owl:Restriction ; owl:allValuesFrom linkml:Float ; owl:onProperty mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty mifc:component_measurement_unit ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty mifc:component_derivation_type ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Float ; + owl:onProperty mifc:laboratory_sample_aggregation_median_measured_compound_value ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:component_measurement_unit ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_derivation_type ], + owl:onProperty mifc:component_recorded_value ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:compound_analytical_measurement_protocol_doi ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:component_derivation_type ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; + owl:allValuesFrom linkml:Float ; + owl:onProperty mifc:component_recorded_value ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:component_comment ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty mifc:component_quality_control_remeasurement ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_aggregation_median_measured_compound_value ], + owl:onProperty mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], [ a owl:Restriction ; - owl:allValuesFrom mifc:AnalyticalMeasurementMethod ; - owl:onProperty mifc:compound_analytical_measurement_method ], + owl:maxCardinality 1 ; + owl:onProperty mifc:component_sample_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_type_label ], + owl:onProperty mifc:component_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:component_comment ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:food_laboratory_sample_batch_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_type ], + owl:onProperty mifc:compound_analytical_laboratory_name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_id ], + owl:onProperty mifc:food_laboratory_sample_batch_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_limit_of_quantitation ], + owl:onProperty mifc:component_analysis_date ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:minCardinality 0 ; + owl:onProperty mifc:component_derivation_type ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:component_record_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_comment ], + owl:onProperty mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_analysis_date ], + owl:onProperty mifc:laboratory_sample_aggregation_median_measured_compound_value ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:compound_analytical_measurement_protocol_doi ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; - owl:onProperty mifc:component_data_points_number ], + owl:allValuesFrom linkml:Float ; + owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty mifc:component_analysis_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_recorded_value ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_limit_of_quantitation ], + owl:onProperty mifc:compound_analytical_measurement_protocol_doi ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_limit_of_quantitation ], + owl:onProperty mifc:component_type ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Float ; - owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], + owl:onProperty mifc:component_data_points_number ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Float ; + owl:minCardinality 0 ; owl:onProperty mifc:laboratory_sample_aggregation_median_measured_compound_value ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:component_limit_of_quantitation ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_aggregation_median_measured_compound_value ], + owl:onProperty mifc:component_type_label ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_comment ], + owl:maxCardinality 1 ; + owl:onProperty mifc:component_limit_of_quantitation ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty mifc:component_id ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:component_type_label ], [ a owl:Restriction ; owl:allValuesFrom linkml:Float ; owl:onProperty mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:component_id ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_quality_control_remeasurement ], + owl:onProperty mifc:compound_analytical_laboratory_name ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty mifc:component_record_date ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:compound_analytical_measurement_protocol_doi ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:component_quality_control_remeasurement ], + owl:onProperty mifc:component_type ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty mifc:compound_analytical_measurement_method ], @@ -183,31 +222,19 @@ mifc:Component a owl:Class, owl:onProperty mifc:compound_analytical_measurement_protocol_doi ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:compound_analytical_measurement_method ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:component_measurement_unit ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], + owl:onProperty mifc:component_record_date ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:component_data_points_number ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], + owl:onProperty mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty mifc:component_measurement_unit ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:component_recorded_value ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:component_type ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_conducting_analytical_analysis ], + owl:onProperty mifc:component_recorded_value ], mifc:NamedThing ; skos:definition "Metadata about components of nutritional interest measured from foods." ; skos:exactMatch schema1:Component ; @@ -217,163 +244,175 @@ mifc:Food a owl:Class, linkml:ClassDefinition ; rdfs:label "Food" ; rdfs:subClassOf [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:food_storage_temperature_state ], + [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_date ], + owl:onProperty mifc:food_acquisition_location_type ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_primary_type_label ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:food_primary_type ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_category_label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_expiration_date ], + owl:onProperty mifc:food_distributor_city ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_city ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_additional_types ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_location_type ], + owl:onProperty mifc:food_distributor_city ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_cooking_method ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_additional_types ], + owl:onProperty mifc:food_primary_type ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_expiration_date ], + owl:onProperty mifc:food_primary_type_label ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_distributor_country ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_id ], + owl:onProperty mifc:food_distributor_city ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_acquisition_date ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_expiration_date ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_acquisition_agent_name ], + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_date ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; owl:onProperty mifc:food_acquisition_agent_name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_primary_type_label ], + owl:onProperty mifc:food_category_label ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_latitude ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_acquisition_city ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_acquisition_organization ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_ripeness_state ], + owl:onProperty mifc:food_category_label ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_distributor_country_subdivision ], + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_country ], + owl:onProperty mifc:food_acquisition_country_subdivision ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_agent_name ], + owl:onProperty mifc:food_acquisition_date ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_acquisition_organization ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty mifc:food_acquisition_location_type ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty mifc:food_acquisition_country ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_primary_type_label ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_distributor_country_subdivision ], + owl:onProperty mifc:food_acquisition_longitude ], [ a owl:Restriction ; - owl:allValuesFrom mifc:FoodStorageTemperatureState ; - owl:onProperty mifc:food_storage_temperature_state ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_sample_id ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_preservation_state ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_acquisition_agent_name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_latitude ], + owl:onProperty mifc:food_distributor_country ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_longitude ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_acquisition_city ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_category_label ], + owl:onProperty mifc:food_additional_types ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_distributor_city ], + owl:onProperty mifc:food_preservation_state ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_distributor_city ], + owl:onProperty mifc:food_distributor_country_subdivision ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_storage_temperature_state ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_acquisition_date ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_organization ], + owl:allValuesFrom linkml:Float ; + owl:onProperty mifc:food_acquisition_latitude ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_country_subdivision ], + owl:allValuesFrom linkml:Integer ; + owl:onProperty mifc:food_upc_code ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_city ], + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; + owl:minCardinality 1 ; + owl:onProperty mifc:food_sample_id ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:food_upc_code ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:food_acquisition_country ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_distributor_country ], + owl:onProperty mifc:food_laboratory_sample_batch_id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_distributor_country_subdivision ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_ripeness_state ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:food_upc_code ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_laboratory_sample_aliquot_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_distributor_country ], + owl:onProperty mifc:food_primary_type ], [ a owl:Restriction ; owl:allValuesFrom linkml:Float ; - owl:onProperty mifc:food_acquisition_latitude ], + owl:onProperty mifc:food_acquisition_longitude ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty mifc:food_id ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_distributor_country ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_preservation_state ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_acquisition_city ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_acquisition_country ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_acquisition_latitude ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_primary_type ], + owl:onProperty mifc:food_acquisition_longitude ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty mifc:food_acquisition_organization ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_additional_types ], + owl:onProperty mifc:food_acquisition_agent_name ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_storage_temperature_state ], + owl:allValuesFrom mifc:FoodRipenessState ; + owl:onProperty mifc:food_ripeness_state ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_acquisition_country_subdivision ], + owl:onProperty mifc:food_cooking_method ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_distributor_city ], + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_laboratory_sample_batch_id ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_expiration_date ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_ripeness_state ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_acquisition_country ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_additional_types ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty mifc:food_cooking_method ], [ a owl:Restriction ; owl:allValuesFrom mifc:FoodAcquisitionLocationType ; @@ -383,46 +422,61 @@ mifc:Food a owl:Class, owl:onProperty mifc:food_cooking_method ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_acquisition_longitude ], + owl:onProperty mifc:food_acquisition_latitude ], [ a owl:Restriction ; - owl:allValuesFrom mifc:FoodRipenessState ; - owl:onProperty mifc:food_ripeness_state ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_distributor_country_subdivision ], [ a owl:Restriction ; - owl:allValuesFrom mifc:FoodPreservationState ; + owl:minCardinality 0 ; owl:onProperty mifc:food_preservation_state ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:food_primary_type ], + owl:onProperty mifc:food_acquisition_organization ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_additional_types ], + owl:allValuesFrom mifc:FoodPreservationState ; + owl:onProperty mifc:food_preservation_state ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_expiration_date ], + owl:minCardinality 0 ; + owl:onProperty mifc:food_primary_type_label ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Float ; - owl:onProperty mifc:food_acquisition_longitude ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_laboratory_sample_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_acquisition_city ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_upc_code ], + owl:onProperty mifc:food_acquisition_country_subdivision ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:food_id ], + owl:onProperty mifc:food_acquisition_date ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty mifc:food_category_label ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:food_ripeness_state ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_sample_id ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; + owl:onProperty mifc:food_distributor_country ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_expiration_date ], + [ a owl:Restriction ; + owl:allValuesFrom mifc:FoodStorageTemperatureState ; + owl:onProperty mifc:food_storage_temperature_state ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:food_laboratory_sample_batch_id ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:food_acquisition_country_subdivision ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:food_primary_type_label ], + owl:maxCardinality 1 ; + owl:onProperty mifc:food_storage_temperature_state ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty mifc:food_distributor_country_subdivision ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty mifc:food_upc_code ], mifc:NamedThing ; skos:definition "Metadata about foods analyzed for components of nutritional interest." ; skos:exactMatch schema1:Food ; @@ -433,36 +487,36 @@ mifc:Provenance a owl:Class, rdfs:label "Provenance" ; rdfs:subClassOf [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:contributor_orcid ], - [ a owl:Restriction ; - owl:minCardinality 0 ; owl:onProperty mifc:organization_name ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:dataset_label ], + owl:maxCardinality 1 ; + owl:onProperty mifc:mifc_version_tag ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty mifc:dataset_label ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:contributor_orcid ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty mifc:organization_name ], + owl:onProperty mifc:mifc_version_tag ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty mifc:contributor_orcid ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:dataset_label ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty mifc:organization_name ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty mifc:mifc_version_tag ], + owl:onProperty mifc:dataset_label ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty mifc:mifc_version_tag ], + owl:onProperty mifc:contributor_orcid ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; + owl:onProperty mifc:organization_name ], + [ a owl:Restriction ; + owl:minCardinality 0 ; owl:onProperty mifc:mifc_version_tag ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; @@ -875,33 +929,6 @@ mifc:provenances a owl:ObjectProperty, mifc:NamedThing a owl:Class, linkml:ClassDefinition ; rdfs:label "NamedThing" ; - rdfs:subClassOf [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_batch_id ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:laboratory_sample_id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_id ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:laboratory_sample_batch_id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_id ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty mifc:laboratory_sample_aliquot_id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_batch_id ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty mifc:laboratory_sample_aliquot_id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty mifc:laboratory_sample_aliquot_id ] ; skos:closeMatch schema1:Thing ; skos:inScheme . @@ -931,12 +958,6 @@ mifc:component_derivation_type a owl:ObjectProperty, skos:definition "A controlled vocabulary term denoting how a component of nutritional interest was generated, (e.g., Analytical or Calculated)." ; skos:inScheme . -mifc:component_id a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "component_id" ; - skos:definition "A string denoting the primary identifier for a sample of the class Component. Note that component_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_id from the Food class." ; - skos:inScheme . - mifc:component_limit_of_quantitation a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "component_limit_of_quantitation" ; @@ -973,6 +994,12 @@ mifc:component_recorded_value a owl:ObjectProperty, skos:definition "A float representing a recorded value of a component of nutritional interest measured from a laboratory sample derived from a food sample." ; skos:inScheme . +mifc:component_sample_id a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "component_sample_id" ; + skos:definition "A string denoting the primary identifier for a sample of the class Component. Note that component_sample_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_sample_id from the Food class." ; + skos:inScheme . + mifc:component_type a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "component_type" ; @@ -985,6 +1012,12 @@ mifc:component_type_label a owl:ObjectProperty, skos:definition "A string denoting the label of a controlled vocabulary term representing an analyzed component_type from a food sample." ; skos:inScheme . +mifc:compound_analytical_laboratory_name a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "compound_analytical_laboratory_name" ; + skos:definition "A string denoting the name of a laboratory that conducted the analytical analysis of a component of nutritional interest." ; + skos:inScheme . + mifc:compound_analytical_measurement_method a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "compound_analytical_measurement_method" ; @@ -1117,12 +1150,6 @@ mifc:food_expiration_date a owl:ObjectProperty, skos:definition "A datetime value representing the food expiration data as shown on the labeling information of the food sample." ; skos:inScheme . -mifc:food_id a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "food_id" ; - skos:definition "A string denoting the primary identifier for a sample of the class Food. Note that food_id should be unique in a given dataset and should be used to relate Food and Component records via component_id from the Component class." ; - skos:inScheme . - mifc:food_preservation_state a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "food_preservation_state" ; @@ -1152,6 +1179,12 @@ mifc:food_ripeness_state a owl:ObjectProperty, skos:definition "An enumerated set of controlled vocabulary terms representing the qualitative freshness state of a food sample when prepared for analysis." ; skos:inScheme . +mifc:food_sample_id a owl:ObjectProperty, + linkml:SlotDefinition ; + rdfs:label "food_sample_id" ; + skos:definition "A string denoting the primary identifier for a sample of the class Food. Note that food_sample_id should be unique in a given dataset and should be used to relate Food and Component records via component_sample_id from the Component class." ; + skos:inScheme . + mifc:food_storage_temperature_state a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "food_storage_temperature_state" ; @@ -1166,12 +1199,6 @@ mifc:food_upc_code a owl:ObjectProperty, skos:definition "An integer denoting a Universal Product Code (UPC) barcode of a food sample." ; skos:inScheme . -mifc:laboratory_conducting_analytical_analysis a owl:ObjectProperty, - linkml:SlotDefinition ; - rdfs:label "laboratory_conducting_analytical_analysis" ; - skos:definition "A string denoting the name of a laboratory that conducted the analytical analysis of a measured_compound." ; - skos:inScheme . - mifc:laboratory_sample_aggregation_maximum_measured_compound_value a owl:ObjectProperty, linkml:SlotDefinition ; rdfs:label "laboratory_sample_aggregation_maximum_measured_compound_value" ; @@ -1200,35 +1227,37 @@ mifc:laboratory_sample_aggregation_minimum_measured_compound_value a owl:ObjectP skos:definition "A float representing the minimum measured compound value of an aggregation of samples." ; skos:inScheme . -mifc:laboratory_sample_aliquot_id a owl:ObjectProperty, +mifc:mifc_version_tag a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "laboratory_sample_aliquot_id" ; - skos:definition "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample." ; + rdfs:label "mifc_version_tag" ; + skos:definition "A string corresponding to a named MIFC release number (e.g., \"v1.0.1\")." ; skos:inScheme . -mifc:laboratory_sample_batch_id a owl:ObjectProperty, +mifc:organization_name a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "laboratory_sample_batch_id" ; - skos:definition "A string denoting an identifier of a batch of laboratory samples analysed together." ; + rdfs:label "organization_name" ; + skos:definition "A string corresponding to a \"|\" delimited list of organizations who created or help to create to a MIFC formatted dataset. E.g., \"USDA\"." ; skos:inScheme . -mifc:laboratory_sample_id a owl:ObjectProperty, +mifc:food_laboratory_sample_aliquot_id a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "laboratory_sample_id" ; - skos:definition "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; - skos:inScheme . + rdfs:label "food_laboratory_sample_aliquot_id" ; + skos:definition "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample." ; + skos:inScheme ; + skos:note "Only use this attribute if identifiers are assigned to aliquots/sub-samples of food laboratory samples denoted by their food_laboratory_sample_id." . -mifc:mifc_version_tag a owl:ObjectProperty, +mifc:food_laboratory_sample_batch_id a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "mifc_version_tag" ; - skos:definition "A string corresponding to a named MIFC release number (e.g., \"v1.0.1\")." ; + rdfs:label "food_laboratory_sample_batch_id" ; + skos:definition "A string denoting an identifier of a batch of laboratory samples analysed together." ; skos:inScheme . -mifc:organization_name a owl:ObjectProperty, +mifc:food_laboratory_sample_id a owl:ObjectProperty, linkml:SlotDefinition ; - rdfs:label "organization_name" ; - skos:definition "A string corresponding to a \"|\" delimited list of organizations who created or help to create to a MIFC formatted dataset. E.g., \"USDA\"." ; - skos:inScheme . + rdfs:label "food_laboratory_sample_id" ; + skos:definition "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; + skos:inScheme ; + skos:note "Only use this attribute if a separate ID is assigned to laboratory samples derived from food samples. Otherwise just use the food_sample_id." . mifc:FoodRipenessState a owl:Class, linkml:EnumDefinition ; diff --git a/project/protobuf/mifc.proto b/project/protobuf/mifc.proto index 88f2f02..bfe3426 100644 --- a/project/protobuf/mifc.proto +++ b/project/protobuf/mifc.proto @@ -4,10 +4,7 @@ // Metadata about components of nutritional interest measured from foods. message Component { - string laboratorySampleId = 0 - string laboratorySampleAliquotId = 0 - string laboratorySampleBatchId = 0 - string componentId = 0 + string componentSampleId = 0 string componentType = 0 string componentTypeLabel = 0 float componentRecordedValue = 0 @@ -24,8 +21,11 @@ message Component float laboratorySampleAggregationMeasuredCompoundStandardDeviation = 0 string compoundAnalyticalMeasurementProtocolDoi = 0 analyticalMeasurementMethod compoundAnalyticalMeasurementMethod = 0 - string laboratoryConductingAnalyticalAnalysis = 0 + string compoundAnalyticalLaboratoryName = 0 boolean componentQualityControlRemeasurement = 0 + string foodLaboratorySampleId = 0 + string foodLaboratorySampleAliquotId = 0 + string foodLaboratorySampleBatchId = 0 } message Container { @@ -36,10 +36,7 @@ message Container // Metadata about foods analyzed for components of nutritional interest. message Food { - string laboratorySampleId = 0 - string laboratorySampleAliquotId = 0 - string laboratorySampleBatchId = 0 - string foodId = 0 + string foodSampleId = 0 string foodPrimaryType = 0 string foodPrimaryTypeLabel = 0 integer foodUpcCode = 0 @@ -62,13 +59,13 @@ message Food string foodExpirationDate = 0 string foodCategoryLabel = 0 string foodAdditionalTypes = 0 + string foodLaboratorySampleId = 0 + string foodLaboratorySampleAliquotId = 0 + string foodLaboratorySampleBatchId = 0 } // Supplemental data about the provenance of a Food and Component dataset collection standardized using MIFC. message Provenance { - string laboratorySampleId = 0 - string laboratorySampleAliquotId = 0 - string laboratorySampleBatchId = 0 string datasetLabel = 0 string mifcVersionTag = 0 string contributorOrcid = 0 diff --git a/project/shacl/mifc.shacl.ttl b/project/shacl/mifc.shacl.ttl index cefd48f..c613964 100644 --- a/project/shacl/mifc.shacl.ttl +++ b/project/shacl/mifc.shacl.ttl @@ -25,162 +25,144 @@ mifc:Container a sh:NodeShape ; mifc:NamedThing a sh:NodeShape ; sh:closed false ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a batch of laboratory samples analysed together." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path mifc:laboratory_sample_batch_id ], - [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path mifc:laboratory_sample_id ], - [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path mifc:laboratory_sample_aliquot_id ] ; sh:targetClass mifc:NamedThing . schema1:Component a sh:NodeShape ; sh:closed true ; sh:description "Metadata about components of nutritional interest measured from foods." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "A controlled vocabulary term denoting the method used to conduct an analytical analysis on a sample, (e.g., HPLC)." ; - sh:in ( OBI:0002116 "GLC" "GC" "Nephelometry" "Gravimetric" "Fluorometric" "Kjeldahl" ) ; - sh:maxCount 1 ; - sh:order 16 ; - sh:path mifc:compound_analytical_measurement_method ], - [ sh:datatype xsd:string ; - sh:description "A controlled vocabulary term denoting how a component of nutritional interest was generated, (e.g., Analytical or Calculated)." ; + sh:property [ sh:datatype xsd:integer ; + sh:description "An integer representing the number of individual samples that comprise a component sample. 1 if an individual sample >1 if an aggregation of samples." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path mifc:component_derivation_type ], + sh:order 5 ; + sh:path mifc:component_data_points_number ], [ sh:datatype xsd:string ; - sh:description "A string denoting the label of a controlled vocabulary term representing an analyzed component_type from a food sample." ; + sh:description "A unit code representing the unit of measurement in which a component_recorded_value is measured." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path mifc:component_type_label ], + sh:order 4 ; + sh:path mifc:component_measurement_unit ], [ sh:datatype xsd:float ; - sh:description "A float representing a recorded value of a component of nutritional interest measured from a laboratory sample derived from a food sample." ; + sh:description "A float representing the standard deviation of a measured compound value of an aggregation of samples." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path mifc:component_recorded_value ], + sh:order 14 ; + sh:path mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample." ; + sh:description "A controlled vocabulary term representing the type of component of nutritional interest analyzed from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 20 ; - sh:path mifc:laboratory_sample_aliquot_id ], + sh:order 1 ; + sh:path mifc:component_type ], [ sh:datatype xsd:float ; - sh:description "A float representing the median measured compound value of an aggregation of samples." ; + sh:description "A float representing the maximum measured compound value of an aggregation of samples." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path mifc:laboratory_sample_aggregation_median_measured_compound_value ], + sh:order 12 ; + sh:path mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], + [ sh:description "A controlled vocabulary term denoting the method used to conduct an analytical analysis on a sample, (e.g., HPLC)." ; + sh:in ( OBI:0002116 "GLC" "GC" "Nephelometry" "Gravimetric" "Fluorometric" "Kjeldahl" ) ; + sh:maxCount 1 ; + sh:order 16 ; + sh:path mifc:compound_analytical_measurement_method ], [ sh:datatype xsd:string ; - sh:description "A datetime value representing recorded date pertaining to an analyzed sample." ; + sh:description "A string denoting a digital object identifier link to a measurement protocol used to conduct an analytical analysis on a sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path mifc:component_record_date ], + sh:order 15 ; + sh:path mifc:compound_analytical_measurement_protocol_doi ], [ sh:datatype xsd:string ; - sh:description "A comment relating to an analyzed component of nutritional interest." ; + sh:description "A datetime value representing the date in which a component of nutritional interest was analyzed." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path mifc:component_comment ], + sh:order 7 ; + sh:path mifc:component_analysis_date ], [ sh:datatype xsd:string ; sh:description "A string denoting an identifier of a batch of laboratory samples analysed together." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 21 ; - sh:path mifc:laboratory_sample_batch_id ], - [ sh:datatype xsd:boolean ; - sh:description "A boolean value denoting TRUE if a component_recorded_value was measured more than once for internal laboratory quality control purposes." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path mifc:component_quality_control_remeasurement ], + sh:path mifc:food_laboratory_sample_batch_id ], [ sh:datatype xsd:string ; - sh:description "A string denoting the name of a laboratory that conducted the analytical analysis of a measured_compound." ; + sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path mifc:laboratory_conducting_analytical_analysis ], + sh:order 19 ; + sh:path mifc:food_laboratory_sample_id ], [ sh:datatype xsd:string ; - sh:description "A string representing the lowest analyte concentration likely to be reliably distinguished from the Limit of Blank (LoB) and at which detection is feasible during the analysis of a component of nutritional interest." ; + sh:description "A datetime value representing recorded date pertaining to an analyzed sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path mifc:component_limit_of_quantitation ], + sh:order 6 ; + sh:path mifc:component_record_date ], [ sh:datatype xsd:string ; - sh:description "A string denoting the primary identifier for a sample of the class Component. Note that component_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_id from the Food class." ; + sh:description "A string denoting the name of a laboratory that conducted the analytical analysis of a component of nutritional interest." ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path mifc:component_id ], + sh:order 17 ; + sh:path mifc:compound_analytical_laboratory_name ], [ sh:datatype xsd:string ; - sh:description "A controlled vocabulary term representing the type of component of nutritional interest analyzed from a food sample." ; + sh:description "A string denoting the label of a controlled vocabulary term representing an analyzed component_type from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path mifc:component_type ], + sh:order 2 ; + sh:path mifc:component_type_label ], [ sh:datatype xsd:float ; - sh:description "A float representing the standard deviation of a measured compound value of an aggregation of samples." ; + sh:description "A float representing the minimum measured compound value of an aggregation of samples." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path mifc:laboratory_sample_aggregation_measured_compound_standard_deviation ], + sh:order 11 ; + sh:path mifc:laboratory_sample_aggregation_minimum_measured_compound_value ], [ sh:datatype xsd:string ; - sh:description "A string denoting a digital object identifier link to a measurement protocol used to conduct an analytical analysis on a sample." ; + sh:description "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 15 ; - sh:path mifc:compound_analytical_measurement_protocol_doi ], + sh:order 20 ; + sh:path mifc:food_laboratory_sample_aliquot_id ], [ sh:datatype xsd:string ; - sh:description "A datetime value representing the date in which a component of nutritional interest was analyzed." ; + sh:description "A comment relating to an analyzed component of nutritional interest." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path mifc:component_analysis_date ], + sh:order 8 ; + sh:path mifc:component_comment ], [ sh:datatype xsd:string ; - sh:description "A unit code representing the unit of measurement in which a component_recorded_value is measured." ; + sh:description "A string denoting the primary identifier for a sample of the class Component. Note that component_sample_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_sample_id from the Food class." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path mifc:component_measurement_unit ], - [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; + sh:order 0 ; + sh:path mifc:component_sample_id ], + [ sh:datatype xsd:float ; + sh:description "A float representing a recorded value of a component of nutritional interest measured from a laboratory sample derived from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path mifc:laboratory_sample_id ], + sh:order 3 ; + sh:path mifc:component_recorded_value ], [ sh:datatype xsd:float ; - sh:description "A float representing the maximum measured compound value of an aggregation of samples." ; + sh:description "A float representing the median measured compound value of an aggregation of samples." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path mifc:laboratory_sample_aggregation_maximum_measured_compound_value ], - [ sh:datatype xsd:integer ; - sh:description "An integer representing the number of individual samples that comprise a component sample. 1 if an individual sample >1 if an aggregation of samples." ; + sh:order 13 ; + sh:path mifc:laboratory_sample_aggregation_median_measured_compound_value ], + [ sh:datatype xsd:string ; + sh:description "A string representing the lowest analyte concentration likely to be reliably distinguished from the Limit of Blank (LoB) and at which detection is feasible during the analysis of a component of nutritional interest." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path mifc:component_data_points_number ], - [ sh:datatype xsd:float ; - sh:description "A float representing the minimum measured compound value of an aggregation of samples." ; + sh:order 10 ; + sh:path mifc:component_limit_of_quantitation ], + [ sh:datatype xsd:string ; + sh:description "A controlled vocabulary term denoting how a component of nutritional interest was generated, (e.g., Analytical or Calculated)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path mifc:laboratory_sample_aggregation_minimum_measured_compound_value ] ; + sh:order 9 ; + sh:path mifc:component_derivation_type ], + [ sh:datatype xsd:boolean ; + sh:description "A boolean value denoting TRUE if a component_recorded_value was measured more than once for internal laboratory quality control purposes." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 18 ; + sh:path mifc:component_quality_control_remeasurement ] ; sh:targetClass schema1:Component . schema1:Food a sh:NodeShape ; @@ -188,157 +170,157 @@ schema1:Food a sh:NodeShape ; sh:description "Metadata about foods analyzed for components of nutritional interest." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "A string or controlled vocabulary denoting the label of the food group or category of the primary food material." ; + sh:description "A string denoting the country code from which a food sample was acquired." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 21 ; - sh:path mifc:food_category_label ], + sh:order 9 ; + sh:path mifc:food_acquisition_country ], + [ sh:datatype xsd:string ; + sh:description "A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 24 ; + sh:path mifc:food_laboratory_sample_aliquot_id ], [ sh:datatype xsd:string ; sh:description "A datetime value representing the food expiration data as shown on the labeling information of the food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 20 ; sh:path mifc:food_expiration_date ], + [ sh:datatype xsd:string ; + sh:description "A string denoting the country subdivision from which a food sample was acquired (e.g., state or province)." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path mifc:food_acquisition_country_subdivision ], + [ sh:datatype xsd:string ; + sh:description "A string denoting the name of the agent (person, device or other type of service) that acquired the food sample." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 15 ; + sh:path mifc:food_acquisition_agent_name ], + [ sh:datatype xsd:float ; + sh:description "A float representing the longitude of the place from which the food sample was acquired." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 14 ; + sh:path mifc:food_acquisition_longitude ], [ sh:description "An enumerated set of controlled vocabulary terms representing the any cooking method(s) applied to a food sample prior to analysis (e.g., \"baked\")." ; sh:in ( "baked" "blanched" "boiled" "braised" "broiled" "cooked" "dry-heat cooked" "dry-roasted" "fried" "grilled" "heated" "microwaved" "moist-heat cooked" "oil-roasted" "pan-broiled" "pan-browned" "pan-fried" "parboiled" "partially fried" "poached" "precooked" "refried" "roasted" "sauteed" "simmered" "slow-roasted" "smoked" "spit-roasted" "steamed" "stewed" "stir-fried" "toasted" "uncooked" "unheated" ) ; sh:maxCount 1 ; sh:order 7 ; sh:path mifc:food_cooking_method ], - [ sh:datatype xsd:string ; - sh:description "A datetime value representing the date a food sample was acquired." ; + [ sh:description "An enumerated set of controlled vocabulary terms representing the qualitative temperature state at which a food sample was stored prior to acquisition (e.g., \"Refrigerated\")." ; + sh:in ( "chilled" "foodsafe chilled" "frozen" "refrigerated" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path mifc:food_acquisition_date ], - [ sh:datatype xsd:string ; - sh:description "A string denoting the country code of a distributor organization from which a food sample was acquired." ; + sh:order 5 ; + sh:path mifc:food_storage_temperature_state ], + [ sh:description "An enumerated set of controlled vocabulary terms representing the qualitative freshness state of a food sample when prepared for analysis." ; + sh:in ( "ripe" "overripe" "unripe" "slightly ripe" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path mifc:food_distributor_country ], + sh:order 6 ; + sh:path mifc:food_ripeness_state ], [ sh:datatype xsd:string ; - sh:description "A string denoting the country subdivision from which a food sample was acquired (e.g., state or province)." ; + sh:description "A string denoting the name of the organization responsible for acquired the food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path mifc:food_acquisition_country_subdivision ], + sh:order 16 ; + sh:path mifc:food_acquisition_organization ], [ sh:datatype xsd:string ; - sh:description "A string denoting the city of a distributor organization from which a food sample was acquired." ; + sh:description "A string denoting an identifier of a batch of laboratory samples analysed together." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path mifc:food_distributor_city ], + sh:order 25 ; + sh:path mifc:food_laboratory_sample_batch_id ], [ sh:datatype xsd:string ; sh:description "A string denoting the label of a controlled vocabulary term representing the primary food material which was sampled." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path mifc:food_primary_type_label ], - [ sh:datatype xsd:string ; - sh:description "A string denoting the country subdivision of a distributor organization from which a food sample was acquired, (e.g., state or province)." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path mifc:food_distributor_country_subdivision ], - [ sh:datatype xsd:string ; - sh:description "A controlled vocabulary term representing the primary food material which was sampled." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path schema1:name ], [ sh:description "A string describing the type of location from which a food sample was acquired (e.g., a supermarket)." ; sh:in ( "field" "fresh market" "small grocery" "supermarket" "biobank" "unknown" "other" ) ; sh:maxCount 1 ; sh:order 12 ; sh:path mifc:food_acquisition_location_type ], [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 24 ; - sh:path mifc:laboratory_sample_aliquot_id ], - [ sh:description "An enumerated set of controlled vocabulary terms representing the qualitative freshness state of a food sample when prepared for analysis." ; - sh:in ( "ripe" "overripe" "unripe" "slightly ripe" ) ; - sh:maxCount 1 ; - sh:order 6 ; - sh:path mifc:food_ripeness_state ], - [ sh:datatype xsd:string ; - sh:description "A string denoting the name of the agent (person, device or other type of service) that acquired the food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 15 ; - sh:path mifc:food_acquisition_agent_name ], - [ sh:datatype xsd:integer ; - sh:description "An integer denoting a Universal Product Code (UPC) barcode of a food sample." ; + sh:description "A controlled vocabulary term representing the primary food material which was sampled." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path mifc:food_upc_code ], + sh:order 1 ; + sh:path schema1:name ], [ sh:datatype xsd:float ; sh:description "A float representing the latitude of the place from which the food sample was acquired." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 13 ; sh:path mifc:food_acquisition_latitude ], - [ sh:description "An enumerated set of controlled vocabulary terms representing the qualitative temperature state at which a food sample was stored prior to acquisition (e.g., \"Refrigerated\")." ; - sh:in ( "chilled" "foodsafe chilled" "frozen" "refrigerated" ) ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path mifc:food_storage_temperature_state ], [ sh:datatype xsd:string ; - sh:description "A string denoting the name of the organization responsible for acquired the food sample." ; + sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 16 ; - sh:path mifc:food_acquisition_organization ], + sh:order 23 ; + sh:path mifc:food_laboratory_sample_id ], [ sh:description "An enumerated set of controlled vocabulary terms representing the preservation state(s) of a food sample (e.g., \"raw\")." ; sh:in ( "air-dried" "artificially dried" "brined" "candied" "canned" "cured" "dried" "fermented" "freeze-dried" "fresh" "heat treated" "irradiated" "jellied" "kippered" "naturally dried" "pasteurized" "pickled" "raw" "shelf stable" "sun-dried" "ultraviolet light exposed" ) ; sh:maxCount 1 ; sh:order 4 ; sh:path mifc:food_preservation_state ], [ sh:datatype xsd:string ; - sh:description "A string denoting the primary identifier for a sample of the class Food. Note that food_id should be unique in a given dataset and should be used to relate Food and Component records via component_id from the Component class." ; + sh:description "A string or controlled vocabulary denoting the label of the food group or category of the primary food material." ; sh:maxCount 1 ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path mifc:food_id ], + sh:order 21 ; + sh:path mifc:food_category_label ], [ sh:datatype xsd:string ; - sh:description "A string denoting the city in which a food sample was acquired." ; + sh:description "A datetime value representing the date a food sample was acquired." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path mifc:food_acquisition_city ], + sh:order 11 ; + sh:path mifc:food_acquisition_date ], [ sh:datatype xsd:string ; - sh:description "A string denoting the country code from which a food sample was acquired." ; + sh:description "A string denoting the country subdivision of a distributor organization from which a food sample was acquired, (e.g., state or province)." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path mifc:food_acquisition_country ], + sh:order 19 ; + sh:path mifc:food_distributor_country_subdivision ], [ sh:datatype xsd:string ; - sh:description "A list of controlled vocabulary denoting the label(s) of additional food types, not including the food_primary_type that are in a food sample." ; + sh:description "A string denoting the city of a distributor organization from which a food sample was acquired." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 22 ; - sh:path mifc:food_additional_types ], + sh:order 17 ; + sh:path mifc:food_distributor_city ], [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; + sh:description "A string denoting the country code of a distributor organization from which a food sample was acquired." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 23 ; - sh:path mifc:laboratory_sample_id ], - [ sh:datatype xsd:float ; - sh:description "A float representing the longitude of the place from which the food sample was acquired." ; + sh:order 18 ; + sh:path mifc:food_distributor_country ], + [ sh:datatype xsd:integer ; + sh:description "An integer denoting a Universal Product Code (UPC) barcode of a food sample." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path mifc:food_acquisition_longitude ], + sh:order 3 ; + sh:path mifc:food_upc_code ], [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a batch of laboratory samples analysed together." ; + sh:description "A string denoting the primary identifier for a sample of the class Food. Note that food_sample_id should be unique in a given dataset and should be used to relate Food and Component records via component_sample_id from the Component class." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 25 ; - sh:path mifc:laboratory_sample_batch_id ] ; + sh:order 0 ; + sh:path mifc:food_sample_id ], + [ sh:datatype xsd:string ; + sh:description "A list of controlled vocabulary denoting the label(s) of additional food types, not including the food_primary_type that are in a food sample." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 22 ; + sh:path mifc:food_additional_types ], + [ sh:datatype xsd:string ; + sh:description "A string denoting the city in which a food sample was acquired." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path mifc:food_acquisition_city ] ; sh:targetClass schema1:Food . schema1:Provenance a sh:NodeShape ; @@ -346,29 +328,11 @@ schema1:Provenance a sh:NodeShape ; sh:description "Supplemental data about the provenance of a Food and Component dataset collection standardized using MIFC." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path mifc:laboratory_sample_aliquot_id ], - [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a batch of laboratory samples analysed together." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path mifc:laboratory_sample_batch_id ], - [ sh:datatype xsd:string ; sh:description "A string corresponding to a named MIFC release number (e.g., \"v1.0.1\")." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 1 ; sh:path mifc:mifc_version_tag ], - [ sh:datatype xsd:string ; - sh:description "A string denoting an identifier of a laboratory sample which was prepared from a food sample." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path mifc:laboratory_sample_id ], [ sh:datatype xsd:string ; sh:description "A string corresponding to the labeled name of dataset (e.g., \"Standard Reference (SR) Legacy\")." ; sh:maxCount 1 ; diff --git a/project/shex/mifc.shex b/project/shex/mifc.shex index d323a45..112db99 100644 --- a/project/shex/mifc.shex +++ b/project/shex/mifc.shex @@ -47,7 +47,7 @@ linkml:Sparqlpath xsd:string CLOSED { ( $ ( & ; rdf:type [ ] ? ; - @linkml:String ; + @linkml:String ; @linkml:String ? ; @linkml:String ? ; @linkml:Float ? ; @@ -70,8 +70,11 @@ linkml:Sparqlpath xsd:string ] ? ; - @linkml:String ? ; - @linkml:Boolean ? + @linkml:String ? ; + @linkml:Boolean ? ; + @linkml:String ? ; + @linkml:String ? ; + @linkml:String ? ) ; rdf:type [ schema1:Component ] ? ) @@ -160,7 +163,10 @@ linkml:Sparqlpath xsd:string @linkml:String ? ; @linkml:String ? ; @linkml:String ? ; - @linkml:String ? + @linkml:String ? ; + @linkml:String ? ; + @linkml:String ? ; + @linkml:String ? ) ; rdf:type [ schema1:Food ] ) @@ -171,10 +177,7 @@ linkml:Sparqlpath xsd:string ) { - ( $ ( @linkml:String ? ; - @linkml:String ? ; - @linkml:String ? - ) ; + ( $ rdf:type . * ; rdf:type [ ] ? ) } diff --git a/project/sqlschema/mifc.sql b/project/sqlschema/mifc.sql index 59a0a66..f4dde99 100644 --- a/project/sqlschema/mifc.sql +++ b/project/sqlschema/mifc.sql @@ -1,10 +1,7 @@ -- # Class: "NamedThing" Description: "" -- * Slot: id Description: --- * Slot: laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. -- # Class: "Food" Description: "Metadata about foods analyzed for components of nutritional interest." --- * Slot: food_id Description: A string denoting the primary identifier for a sample of the class Food. Note that food_id should be unique in a given dataset and should be used to relate Food and Component records via component_id from the Component class. +-- * Slot: food_sample_id Description: A string denoting the primary identifier for a sample of the class Food. Note that food_sample_id should be unique in a given dataset and should be used to relate Food and Component records via component_sample_id from the Component class. -- * Slot: food_primary_type Description: A controlled vocabulary term representing the primary food material which was sampled. -- * Slot: food_primary_type_label Description: A string denoting the label of a controlled vocabulary term representing the primary food material which was sampled. -- * Slot: food_upc_code Description: An integer denoting a Universal Product Code (UPC) barcode of a food sample. @@ -27,13 +24,13 @@ -- * Slot: food_expiration_date Description: A datetime value representing the food expiration data as shown on the labeling information of the food sample. -- * Slot: food_category_label Description: A string or controlled vocabulary denoting the label of the food group or category of the primary food material. -- * Slot: food_additional_types Description: A list of controlled vocabulary denoting the label(s) of additional food types, not including the food_primary_type that are in a food sample. --- * Slot: laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. +-- * Slot: food_laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. +-- * Slot: food_laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample. +-- * Slot: food_laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. -- * Slot: Container_id Description: Autocreated FK slot -- # Class: "Component" Description: "Metadata about components of nutritional interest measured from foods." -- * Slot: id Description: --- * Slot: component_id Description: A string denoting the primary identifier for a sample of the class Component. Note that component_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_id from the Food class. +-- * Slot: component_sample_id Description: A string denoting the primary identifier for a sample of the class Component. Note that component_sample_id does not need be unique in a given dataset and should be used to relate Food and Component records via food_sample_id from the Food class. -- * Slot: component_type Description: A controlled vocabulary term representing the type of component of nutritional interest analyzed from a food sample. -- * Slot: component_type_label Description: A string denoting the label of a controlled vocabulary term representing an analyzed component_type from a food sample. -- * Slot: component_recorded_value Description: A float representing a recorded value of a component of nutritional interest measured from a laboratory sample derived from a food sample. @@ -50,11 +47,11 @@ -- * Slot: laboratory_sample_aggregation_measured_compound_standard_deviation Description: A float representing the standard deviation of a measured compound value of an aggregation of samples. -- * Slot: compound_analytical_measurement_protocol_doi Description: A string denoting a digital object identifier link to a measurement protocol used to conduct an analytical analysis on a sample. -- * Slot: compound_analytical_measurement_method Description: A controlled vocabulary term denoting the method used to conduct an analytical analysis on a sample, (e.g., HPLC). --- * Slot: laboratory_conducting_analytical_analysis Description: A string denoting the name of a laboratory that conducted the analytical analysis of a measured_compound. +-- * Slot: compound_analytical_laboratory_name Description: A string denoting the name of a laboratory that conducted the analytical analysis of a component of nutritional interest. -- * Slot: component_quality_control_remeasurement Description: A boolean value denoting TRUE if a component_recorded_value was measured more than once for internal laboratory quality control purposes. --- * Slot: laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. +-- * Slot: food_laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. +-- * Slot: food_laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a food laboratory sample which was prepared from a food sample. +-- * Slot: food_laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. -- * Slot: Container_id Description: Autocreated FK slot -- # Class: "Provenance" Description: "Supplemental data about the provenance of a Food and Component dataset collection standardized using MIFC." -- * Slot: id Description: @@ -62,18 +59,12 @@ -- * Slot: mifc_version_tag Description: A string corresponding to a named MIFC release number (e.g., "v1.0.1"). -- * Slot: contributor_orcid Description: A string corresponding to a "|" delimited list of ORCIDs of people who contributed to a MIFC formatted dataset. See https://orcid.org/. -- * Slot: organization_name Description: A string corresponding to a "|" delimited list of organizations who created or help to create to a MIFC formatted dataset. E.g., "USDA". --- * Slot: laboratory_sample_id Description: A string denoting an identifier of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_aliquot_id Description: A string denoting an identifier of a unique aliquot of a laboratory sample which was prepared from a food sample. --- * Slot: laboratory_sample_batch_id Description: A string denoting an identifier of a batch of laboratory samples analysed together. -- * Slot: Container_id Description: Autocreated FK slot -- # Class: "Container" Description: "" -- * Slot: id Description: CREATE TABLE "NamedThing" ( id INTEGER NOT NULL, - laboratory_sample_id TEXT, - laboratory_sample_aliquot_id TEXT, - laboratory_sample_batch_id TEXT, PRIMARY KEY (id) ); CREATE TABLE "Container" ( @@ -81,7 +72,7 @@ CREATE TABLE "Container" ( PRIMARY KEY (id) ); CREATE TABLE "Food" ( - food_id TEXT NOT NULL, + food_sample_id TEXT NOT NULL, food_primary_type TEXT, food_primary_type_label TEXT, food_upc_code INTEGER, @@ -104,16 +95,16 @@ CREATE TABLE "Food" ( food_expiration_date TEXT, food_category_label TEXT, food_additional_types TEXT, - laboratory_sample_id TEXT, - laboratory_sample_aliquot_id TEXT, - laboratory_sample_batch_id TEXT, + food_laboratory_sample_id TEXT, + food_laboratory_sample_aliquot_id TEXT, + food_laboratory_sample_batch_id TEXT, "Container_id" INTEGER, - PRIMARY KEY (food_id), + PRIMARY KEY (food_sample_id), FOREIGN KEY("Container_id") REFERENCES "Container" (id) ); CREATE TABLE "Component" ( id INTEGER NOT NULL, - component_id TEXT NOT NULL, + component_sample_id TEXT NOT NULL, component_type TEXT, component_type_label TEXT, component_recorded_value FLOAT, @@ -130,11 +121,11 @@ CREATE TABLE "Component" ( laboratory_sample_aggregation_measured_compound_standard_deviation FLOAT, compound_analytical_measurement_protocol_doi TEXT, compound_analytical_measurement_method VARCHAR(12), - laboratory_conducting_analytical_analysis TEXT, + compound_analytical_laboratory_name TEXT, component_quality_control_remeasurement BOOLEAN, - laboratory_sample_id TEXT, - laboratory_sample_aliquot_id TEXT, - laboratory_sample_batch_id TEXT, + food_laboratory_sample_id TEXT, + food_laboratory_sample_aliquot_id TEXT, + food_laboratory_sample_batch_id TEXT, "Container_id" INTEGER, PRIMARY KEY (id), FOREIGN KEY("Container_id") REFERENCES "Container" (id) @@ -145,9 +136,6 @@ CREATE TABLE "Provenance" ( mifc_version_tag TEXT, contributor_orcid TEXT, organization_name TEXT, - laboratory_sample_id TEXT, - laboratory_sample_aliquot_id TEXT, - laboratory_sample_batch_id TEXT, "Container_id" INTEGER, PRIMARY KEY (id), FOREIGN KEY("Container_id") REFERENCES "Container" (id) diff --git a/src/mifc/datamodel/mifc.py b/src/mifc/datamodel/mifc.py index 3489818..81a5912 100644 --- a/src/mifc/datamodel/mifc.py +++ b/src/mifc/datamodel/mifc.py @@ -1,5 +1,5 @@ # Auto generated from mifc.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-06-20T16:34:00 +# Generation date: 2024-06-20T17:37:48 # Schema: mifc # # id: https://w3id.org/kaiiam/mifc @@ -47,11 +47,10 @@ # Types # Class references -class FoodFoodId(extended_str): +class FoodFoodSampleId(extended_str): pass -@dataclass class NamedThing(YAMLRoot): _inherited_slots: ClassVar[List[str]] = [] @@ -60,22 +59,6 @@ class NamedThing(YAMLRoot): class_name: ClassVar[str] = "NamedThing" class_model_uri: ClassVar[URIRef] = MIFC.NamedThing - laboratory_sample_id: Optional[str] = None - laboratory_sample_aliquot_id: Optional[str] = None - laboratory_sample_batch_id: Optional[str] = None - - def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self.laboratory_sample_id is not None and not isinstance(self.laboratory_sample_id, str): - self.laboratory_sample_id = str(self.laboratory_sample_id) - - if self.laboratory_sample_aliquot_id is not None and not isinstance(self.laboratory_sample_aliquot_id, str): - self.laboratory_sample_aliquot_id = str(self.laboratory_sample_aliquot_id) - - if self.laboratory_sample_batch_id is not None and not isinstance(self.laboratory_sample_batch_id, str): - self.laboratory_sample_batch_id = str(self.laboratory_sample_batch_id) - - super().__post_init__(**kwargs) - @dataclass class Food(NamedThing): @@ -89,7 +72,7 @@ class Food(NamedThing): class_name: ClassVar[str] = "Food" class_model_uri: ClassVar[URIRef] = MIFC.Food - food_id: Union[str, FoodFoodId] = None + food_sample_id: Union[str, FoodFoodSampleId] = None food_primary_type: Optional[str] = None food_primary_type_label: Optional[str] = None food_upc_code: Optional[int] = None @@ -112,12 +95,15 @@ class Food(NamedThing): food_expiration_date: Optional[str] = None food_category_label: Optional[str] = None food_additional_types: Optional[str] = None + food_laboratory_sample_id: Optional[str] = None + food_laboratory_sample_aliquot_id: Optional[str] = None + food_laboratory_sample_batch_id: Optional[str] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self._is_empty(self.food_id): - self.MissingRequiredField("food_id") - if not isinstance(self.food_id, FoodFoodId): - self.food_id = FoodFoodId(self.food_id) + if self._is_empty(self.food_sample_id): + self.MissingRequiredField("food_sample_id") + if not isinstance(self.food_sample_id, FoodFoodSampleId): + self.food_sample_id = FoodFoodSampleId(self.food_sample_id) if self.food_primary_type is not None and not isinstance(self.food_primary_type, str): self.food_primary_type = str(self.food_primary_type) @@ -185,6 +171,15 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.food_additional_types is not None and not isinstance(self.food_additional_types, str): self.food_additional_types = str(self.food_additional_types) + if self.food_laboratory_sample_id is not None and not isinstance(self.food_laboratory_sample_id, str): + self.food_laboratory_sample_id = str(self.food_laboratory_sample_id) + + if self.food_laboratory_sample_aliquot_id is not None and not isinstance(self.food_laboratory_sample_aliquot_id, str): + self.food_laboratory_sample_aliquot_id = str(self.food_laboratory_sample_aliquot_id) + + if self.food_laboratory_sample_batch_id is not None and not isinstance(self.food_laboratory_sample_batch_id, str): + self.food_laboratory_sample_batch_id = str(self.food_laboratory_sample_batch_id) + super().__post_init__(**kwargs) @@ -200,7 +195,7 @@ class Component(NamedThing): class_name: ClassVar[str] = "Component" class_model_uri: ClassVar[URIRef] = MIFC.Component - component_id: str = None + component_sample_id: str = None component_type: Optional[str] = None component_type_label: Optional[str] = None component_recorded_value: Optional[float] = None @@ -217,14 +212,17 @@ class Component(NamedThing): laboratory_sample_aggregation_measured_compound_standard_deviation: Optional[float] = None compound_analytical_measurement_protocol_doi: Optional[str] = None compound_analytical_measurement_method: Optional[Union[str, "AnalyticalMeasurementMethod"]] = None - laboratory_conducting_analytical_analysis: Optional[str] = None + compound_analytical_laboratory_name: Optional[str] = None component_quality_control_remeasurement: Optional[Union[bool, Bool]] = None + food_laboratory_sample_id: Optional[str] = None + food_laboratory_sample_aliquot_id: Optional[str] = None + food_laboratory_sample_batch_id: Optional[str] = None def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - if self._is_empty(self.component_id): - self.MissingRequiredField("component_id") - if not isinstance(self.component_id, str): - self.component_id = str(self.component_id) + if self._is_empty(self.component_sample_id): + self.MissingRequiredField("component_sample_id") + if not isinstance(self.component_sample_id, str): + self.component_sample_id = str(self.component_sample_id) if self.component_type is not None and not isinstance(self.component_type, str): self.component_type = str(self.component_type) @@ -274,12 +272,21 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): if self.compound_analytical_measurement_method is not None and not isinstance(self.compound_analytical_measurement_method, AnalyticalMeasurementMethod): self.compound_analytical_measurement_method = AnalyticalMeasurementMethod(self.compound_analytical_measurement_method) - if self.laboratory_conducting_analytical_analysis is not None and not isinstance(self.laboratory_conducting_analytical_analysis, str): - self.laboratory_conducting_analytical_analysis = str(self.laboratory_conducting_analytical_analysis) + if self.compound_analytical_laboratory_name is not None and not isinstance(self.compound_analytical_laboratory_name, str): + self.compound_analytical_laboratory_name = str(self.compound_analytical_laboratory_name) if self.component_quality_control_remeasurement is not None and not isinstance(self.component_quality_control_remeasurement, Bool): self.component_quality_control_remeasurement = Bool(self.component_quality_control_remeasurement) + if self.food_laboratory_sample_id is not None and not isinstance(self.food_laboratory_sample_id, str): + self.food_laboratory_sample_id = str(self.food_laboratory_sample_id) + + if self.food_laboratory_sample_aliquot_id is not None and not isinstance(self.food_laboratory_sample_aliquot_id, str): + self.food_laboratory_sample_aliquot_id = str(self.food_laboratory_sample_aliquot_id) + + if self.food_laboratory_sample_batch_id is not None and not isinstance(self.food_laboratory_sample_batch_id, str): + self.food_laboratory_sample_batch_id = str(self.food_laboratory_sample_batch_id) + super().__post_init__(**kwargs) @@ -325,12 +332,12 @@ class Container(YAMLRoot): class_name: ClassVar[str] = "Container" class_model_uri: ClassVar[URIRef] = MIFC.Container - foods: Optional[Union[Dict[Union[str, FoodFoodId], Union[dict, Food]], List[Union[dict, Food]]]] = empty_dict() + foods: Optional[Union[Dict[Union[str, FoodFoodSampleId], Union[dict, Food]], List[Union[dict, Food]]]] = empty_dict() components: Optional[Union[Union[dict, Component], List[Union[dict, Component]]]] = empty_list() provenances: Optional[Union[Union[dict, Provenance], List[Union[dict, Provenance]]]] = empty_list() def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]): - self._normalize_inlined_as_list(slot_name="foods", slot_type=Food, key_name="food_id", keyed=True) + self._normalize_inlined_as_list(slot_name="foods", slot_type=Food, key_name="food_sample_id", keyed=True) if not isinstance(self.components, list): self.components = [self.components] if self.components is not None else [] @@ -510,17 +517,8 @@ def _addvals(cls): class slots: pass -slots.laboratory_sample_id = Slot(uri=MIFC.laboratory_sample_id, name="laboratory_sample_id", curie=MIFC.curie('laboratory_sample_id'), - model_uri=MIFC.laboratory_sample_id, domain=None, range=Optional[str]) - -slots.laboratory_sample_aliquot_id = Slot(uri=MIFC.laboratory_sample_aliquot_id, name="laboratory_sample_aliquot_id", curie=MIFC.curie('laboratory_sample_aliquot_id'), - model_uri=MIFC.laboratory_sample_aliquot_id, domain=None, range=Optional[str]) - -slots.laboratory_sample_batch_id = Slot(uri=MIFC.laboratory_sample_batch_id, name="laboratory_sample_batch_id", curie=MIFC.curie('laboratory_sample_batch_id'), - model_uri=MIFC.laboratory_sample_batch_id, domain=None, range=Optional[str]) - -slots.food_id = Slot(uri=MIFC.food_id, name="food_id", curie=MIFC.curie('food_id'), - model_uri=MIFC.food_id, domain=None, range=URIRef) +slots.food_sample_id = Slot(uri=MIFC.food_sample_id, name="food_sample_id", curie=MIFC.curie('food_sample_id'), + model_uri=MIFC.food_sample_id, domain=None, range=URIRef) slots.food_primary_type = Slot(uri=SCHEMA.name, name="food_primary_type", curie=SCHEMA.curie('name'), model_uri=MIFC.food_primary_type, domain=None, range=Optional[str]) @@ -588,8 +586,8 @@ class slots: slots.food_additional_types = Slot(uri=MIFC.food_additional_types, name="food_additional_types", curie=MIFC.curie('food_additional_types'), model_uri=MIFC.food_additional_types, domain=None, range=Optional[str]) -slots.component_id = Slot(uri=MIFC.component_id, name="component_id", curie=MIFC.curie('component_id'), - model_uri=MIFC.component_id, domain=None, range=str) +slots.component_sample_id = Slot(uri=MIFC.component_sample_id, name="component_sample_id", curie=MIFC.curie('component_sample_id'), + model_uri=MIFC.component_sample_id, domain=None, range=str) slots.component_type = Slot(uri=MIFC.component_type, name="component_type", curie=MIFC.curie('component_type'), model_uri=MIFC.component_type, domain=None, range=Optional[str]) @@ -639,8 +637,8 @@ class slots: slots.compound_analytical_measurement_method = Slot(uri=MIFC.compound_analytical_measurement_method, name="compound_analytical_measurement_method", curie=MIFC.curie('compound_analytical_measurement_method'), model_uri=MIFC.compound_analytical_measurement_method, domain=None, range=Optional[Union[str, "AnalyticalMeasurementMethod"]]) -slots.laboratory_conducting_analytical_analysis = Slot(uri=MIFC.laboratory_conducting_analytical_analysis, name="laboratory_conducting_analytical_analysis", curie=MIFC.curie('laboratory_conducting_analytical_analysis'), - model_uri=MIFC.laboratory_conducting_analytical_analysis, domain=None, range=Optional[str]) +slots.compound_analytical_laboratory_name = Slot(uri=MIFC.compound_analytical_laboratory_name, name="compound_analytical_laboratory_name", curie=MIFC.curie('compound_analytical_laboratory_name'), + model_uri=MIFC.compound_analytical_laboratory_name, domain=None, range=Optional[str]) slots.component_quality_control_remeasurement = Slot(uri=MIFC.component_quality_control_remeasurement, name="component_quality_control_remeasurement", curie=MIFC.curie('component_quality_control_remeasurement'), model_uri=MIFC.component_quality_control_remeasurement, domain=None, range=Optional[Union[bool, Bool]]) @@ -657,8 +655,17 @@ class slots: slots.organization_name = Slot(uri=MIFC.organization_name, name="organization_name", curie=MIFC.curie('organization_name'), model_uri=MIFC.organization_name, domain=None, range=Optional[str]) +slots.food_laboratory_sample_id = Slot(uri=MIFC.food_laboratory_sample_id, name="food_laboratory_sample_id", curie=MIFC.curie('food_laboratory_sample_id'), + model_uri=MIFC.food_laboratory_sample_id, domain=None, range=Optional[str]) + +slots.food_laboratory_sample_aliquot_id = Slot(uri=MIFC.food_laboratory_sample_aliquot_id, name="food_laboratory_sample_aliquot_id", curie=MIFC.curie('food_laboratory_sample_aliquot_id'), + model_uri=MIFC.food_laboratory_sample_aliquot_id, domain=None, range=Optional[str]) + +slots.food_laboratory_sample_batch_id = Slot(uri=MIFC.food_laboratory_sample_batch_id, name="food_laboratory_sample_batch_id", curie=MIFC.curie('food_laboratory_sample_batch_id'), + model_uri=MIFC.food_laboratory_sample_batch_id, domain=None, range=Optional[str]) + slots.container__foods = Slot(uri=MIFC.foods, name="container__foods", curie=MIFC.curie('foods'), - model_uri=MIFC.container__foods, domain=None, range=Optional[Union[Dict[Union[str, FoodFoodId], Union[dict, Food]], List[Union[dict, Food]]]]) + model_uri=MIFC.container__foods, domain=None, range=Optional[Union[Dict[Union[str, FoodFoodSampleId], Union[dict, Food]], List[Union[dict, Food]]]]) slots.container__components = Slot(uri=MIFC.components, name="container__components", curie=MIFC.curie('components'), model_uri=MIFC.container__components, domain=None, range=Optional[Union[Union[dict, Component], List[Union[dict, Component]]]])