From d933176d1dbc9cb30205b897c6f83e13743a78a3 Mon Sep 17 00:00:00 2001 From: oyurekten <103259724+oyurekten@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:16:02 +0100 Subject: [PATCH 1/4] new and updated values for DataTypeEnum --- mars-cli/mars_lib/models/isa_json.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mars-cli/mars_lib/models/isa_json.py b/mars-cli/mars_lib/models/isa_json.py index ead6b34..11f336c 100644 --- a/mars-cli/mars_lib/models/isa_json.py +++ b/mars-cli/mars_lib/models/isa_json.py @@ -31,8 +31,17 @@ class DataTypeEnum(str, Enum): RAW_DATA_FILE = "Raw Data File" DERIVED_DATA_FILE = "Derived Data File" IMAGE_FILE = "Image File" - SPECTRAL_RAW_DATA_FILE = "Spectral Raw Data File" # TODO: QUESTION: This is not mentioned in the specs (https://isa-specs.readthedocs.io/) - FREE_INDUCTION_DECAY_FILE = "Free Induction Decay File" # TODO: QUESTION: This is not mentioned in the specs (https://isa-specs.readthedocs.io/) + # The following names are not mentioned in the specs (https://isa-specs.readthedocs.io/en/latest/isajson.html#data-schema-json). + # However, spectral data file names are mentioned in the ISA-Tab specs (https://isa-specs.readthedocs.io/en/latest/isatab.html). + # TODO: Review and support all possible data file names mentioned in the the ISA-Tab specs (Section 2.3.8). + # Metabolights support the following data file types: + RAW_SPECTRAL_DATA_FILE = "Raw Spectral Data File" + DERIVED_SPECTRAL_DATA_FILE = "Derived Spectral Data File" + FREE_INDUCTION_DECAY_DATA_FILE = "Free Induction Decay Data File" + ACQUSITION_PARAMETER_DATA_FILE = "Acquisition Parameter Data File" + + +DATA_TYPE_VALUES = {item.value for item in DataTypeEnum} class Data(IsaBase): @@ -43,7 +52,7 @@ class Data(IsaBase): @field_validator("type") def apply_enum(cls, v: str) -> str: - if v not in [item.value for item in DataTypeEnum]: + if v not in DATA_TYPE_VALUES: raise ValueError("Invalid material type") return v From 9d877f02bfb04f777433827a6687451b94b22326 Mon Sep 17 00:00:00 2001 From: oyurekten <103259724+oyurekten@users.noreply.github.com> Date: Sat, 14 Sep 2024 11:27:02 +0100 Subject: [PATCH 2/4] test data updates. Free Induction Decay File -> Free Induction Decay Data File and Spectral Raw Data File -> Raw Spectral Data File --- test-data/ISA-BH2023-ALL/isa-bh2023-all.json | 82 ++++++++++---------- test-data/ISA-BH2023-Mx/isa-bh2023-mx.json | 82 ++++++++++---------- 2 files changed, 82 insertions(+), 82 deletions(-) diff --git a/test-data/ISA-BH2023-ALL/isa-bh2023-all.json b/test-data/ISA-BH2023-ALL/isa-bh2023-all.json index 1a3208a..6841e08 100644 --- a/test-data/ISA-BH2023-ALL/isa-bh2023-all.json +++ b/test-data/ISA-BH2023-ALL/isa-bh2023-all.json @@ -75,49 +75,49 @@ "@id": "#data_file/2647db5f-0ed8-4536-aec7-8d5d4cfc65d3", "comments": [], "name": "ms-data-0.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/d3cf3b1f-f375-4763-8837-89d9f453116c", "comments": [], "name": "ms-data-1.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/ca61e6d1-0cab-45be-b333-e45583e06311", "comments": [], "name": "ms-data-2.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/0eb3dcc9-b79c-4b44-ac31-b977ea63ae2c", "comments": [], "name": "ms-data-3.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/a449d1e5-9f71-4503-a165-97c5a4c69252", "comments": [], "name": "ms-data-4.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/f32fe0d7-d349-4f70-948e-17f7d8ec22fe", "comments": [], "name": "ms-data-5.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/15c1fb2e-2814-4bff-a37d-cb336fb8b5f4", "comments": [], "name": "ms-data-6.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/402b1d0c-6925-44bd-a365-16bf933659aa", "comments": [], "name": "ms-data-7.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" } ], "filename": "a_BH2023-isotopologue-ms-assay.txt", @@ -864,193 +864,193 @@ "@id": "#data_file/cc587806-e123-459e-b089-37731063b6ce", "comments": [], "name": "nmr-data-topoHACO-DIPSY-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5b4ec5f5-57c1-459d-b022-2a21395f0dbc", "comments": [], "name": "nmr-data-topoHACO-DIPSY-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/053fe2d8-a3c1-4405-90ba-5a44576b4755", "comments": [], "name": "nmr-data-topoHACO-DIPSY-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5b6f541e-ed67-4061-9ce7-987b299b238c", "comments": [], "name": "nmr-data-topoHACO-DIPSY-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/8ac4d26e-9d70-48eb-97b2-fd2b03d70dc7", "comments": [], "name": "nmr-data-topoHACO-DIPSY-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/632db404-8826-40f1-92b0-3e5f17b48e17", "comments": [], "name": "nmr-data-topoHACO-DIPSY-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/6dbadd82-109c-4e87-9a9d-3fe0f820d066", "comments": [], "name": "nmr-data-topoHACO-DIPSY-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/f8b16168-af0c-45a5-8748-9bbd9579457b", "comments": [], "name": "nmr-data-topoHACO-DIPSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/2b5b1f3e-6ad3-42eb-8dc3-988d9f35b134", "comments": [], "name": "nmr-data-topoHNCA-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/e23ccca9-7f27-4001-b4f7-632ac031476b", "comments": [], "name": "nmr-data-topoHNCA-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/1285966c-8236-46d6-9b6d-ecd99af63503", "comments": [], "name": "nmr-data-topoHNCA-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/b4051169-6be9-41cd-9cf1-0b62287226f2", "comments": [], "name": "nmr-data-topoHNCA-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/ccd56c4c-d54e-4629-90cf-01b088242fd8", "comments": [], "name": "nmr-data-topoHNCA-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/743004a7-7a7a-4d84-ada5-59bc145494dd", "comments": [], "name": "nmr-data-topoHNCA-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/ee89ba9a-4338-495a-ac7c-bc817788dd0d", "comments": [], "name": "nmr-data-topoHNCA-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/a8443352-8dfa-4afc-9253-db2033520d38", "comments": [], "name": "nmr-data-topoHNCA-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/6b436486-605b-4099-94be-293d2a9c149a", "comments": [], "name": "nmr-data-topoHSQC-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/2dd6ce6a-d36d-4f50-9a59-abb922729aa7", "comments": [], "name": "nmr-data-topoHSQC-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/f2b57ff4-3a49-4954-9473-ac2cb9caf990", "comments": [], "name": "nmr-data-topoHSQC-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/caaec7ef-2b45-44d4-a795-be3e95ba698f", "comments": [], "name": "nmr-data-topoHSQC-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/7c25feec-5af8-4a0d-84cf-755fce9cb33c", "comments": [], "name": "nmr-data-topoHSQC-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/470899c8-03d5-4c3e-bc0f-5b1c294e37f6", "comments": [], "name": "nmr-data-topoHSQC-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/ef1692cd-12a1-4e25-b035-3c3c7dc76931", "comments": [], "name": "nmr-data-topoHSQC-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/eb9c13be-d281-4081-ae03-fe8519461948", "comments": [], "name": "nmr-data-topoHSQC-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/0d00bdaa-df1a-4e14-a497-a95dd5f729a0", "comments": [], "name": "nmr-data-topoZQF-TOCSY-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/72496274-97ad-4e72-b7fd-7c500ac69b4b", "comments": [], "name": "nmr-data-topoZQF-TOCSY-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/a4465bef-42fe-43bd-89a0-872a6b749a7a", "comments": [], "name": "nmr-data-topoZQF-TOCSY-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/c7f86f88-92a6-4490-8672-cef8fbbfa25a", "comments": [], "name": "nmr-data-topoZQF-TOCSY-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/bd4b9325-bca0-4770-b287-4f515036333c", "comments": [], "name": "nmr-data-topoZQF-TOCSY-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/effd7cc5-3bc6-4d40-9bc8-c21b819ba95e", "comments": [], "name": "nmr-data-topoZQF-TOCSY-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/7da41385-7cb8-4a3e-85bb-360f4ea90a16", "comments": [], "name": "nmr-data-topoZQF-TOCSY-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5b69b0e6-95da-4534-bd0d-02527f9a1b8d", "comments": [], "name": "nmr-data-topoZQF-TOCSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" } ], "filename": "a_BH2023-isotopomer-nmr-assay.txt", @@ -2741,7 +2741,7 @@ "@id": "#data_file/abee3156-8521-4539-bcf3-c5bfeadb2f83", "comments": [], "name": "nmr-data-topoHACO-DIPSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" } ], "filename": "a_BH2023-metabolite-profiling-nmr-assay.txt", diff --git a/test-data/ISA-BH2023-Mx/isa-bh2023-mx.json b/test-data/ISA-BH2023-Mx/isa-bh2023-mx.json index 24de616..3f15869 100644 --- a/test-data/ISA-BH2023-Mx/isa-bh2023-mx.json +++ b/test-data/ISA-BH2023-Mx/isa-bh2023-mx.json @@ -70,49 +70,49 @@ "@id": "#data_file/66bf4a49-7f2e-454c-87dc-13b1e6e5ab38", "comments": [], "name": "ms-data-0.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/09582375-7f12-480c-9370-555e2ada7bcd", "comments": [], "name": "ms-data-1.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/365bfea6-7c1a-4f67-bf63-c224913f6e04", "comments": [], "name": "ms-data-2.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/8f02a364-1553-415a-9832-9055502ddaf5", "comments": [], "name": "ms-data-3.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/6cce85ba-3ed8-4f59-be70-1adf389d9f02", "comments": [], "name": "ms-data-4.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/2a6eb1b3-3c6a-4dd8-8bdb-9bad51b22a65", "comments": [], "name": "ms-data-5.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/8649e673-dc96-4541-ab88-b641bc1ec77a", "comments": [], "name": "ms-data-6.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" }, { "@id": "#data_file/f794f4f5-13e7-48e1-83fb-31b8479f104c", "comments": [], "name": "ms-data-7.mzml", - "type": "Spectral Raw Data File" + "type": "Raw Spectral Data File" } ], "filename": "a_BH2023-isotopologue-ms-assay.txt", @@ -854,193 +854,193 @@ "@id": "#data_file/fee20077-2dc1-48bd-baa8-011717706897", "comments": [], "name": "nmr-data-topoHACO-DIPSY-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/4921fec1-ca87-4d78-a7d4-8bd90a06b1d0", "comments": [], "name": "nmr-data-topoHACO-DIPSY-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/6fb3a542-c334-4740-9080-aabad35d5ffe", "comments": [], "name": "nmr-data-topoHACO-DIPSY-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5ad0979a-0635-40ff-9ea4-bb4906c5641c", "comments": [], "name": "nmr-data-topoHACO-DIPSY-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/247e5f2d-8b36-401e-8803-6d8eaaa00db3", "comments": [], "name": "nmr-data-topoHACO-DIPSY-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/b26dafa8-a83d-4b08-b027-b96c5c05f086", "comments": [], "name": "nmr-data-topoHACO-DIPSY-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/f3474682-5424-4f9e-a11e-f08bd350f71c", "comments": [], "name": "nmr-data-topoHACO-DIPSY-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/d68bb8c6-9e31-49a7-aaac-9f1d29091b31", "comments": [], "name": "nmr-data-topoHACO-DIPSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/fcf2a6ae-5788-4e82-be9d-9306e21014bd", "comments": [], "name": "nmr-data-topoHNCA-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5d269130-7dd6-4d5e-b3b6-41a3056b6e5c", "comments": [], "name": "nmr-data-topoHNCA-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/71279196-fd95-46fc-9158-e5b3605459f8", "comments": [], "name": "nmr-data-topoHNCA-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/5272458b-aade-4338-9aeb-3d16cdc60454", "comments": [], "name": "nmr-data-topoHNCA-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/218aa68e-a6e2-42a0-a7f7-f84b24e91667", "comments": [], "name": "nmr-data-topoHNCA-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/ee6422ca-3044-43e8-9b7b-c0a6fa484dd2", "comments": [], "name": "nmr-data-topoHNCA-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/6413cb64-f6c2-425d-8172-1adbf447b35a", "comments": [], "name": "nmr-data-topoHNCA-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/0e2c3c53-9840-4d25-a0a0-5a04b02fa464", "comments": [], "name": "nmr-data-topoHNCA-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/f154f4ab-9347-4f26-b5b6-93fa40429f98", "comments": [], "name": "nmr-data-topoHSQC-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/98e317d0-b629-44ee-87b1-71d3453be954", "comments": [], "name": "nmr-data-topoHSQC-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/bc91e699-b282-4465-8220-4ff9093aacff", "comments": [], "name": "nmr-data-topoHSQC-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/0613a35a-f38b-4d87-8c53-0d589ec22512", "comments": [], "name": "nmr-data-topoHSQC-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/ae8435cc-5ce7-4632-ac57-192e03b86257", "comments": [], "name": "nmr-data-topoHSQC-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/da879de6-9efd-4166-9b13-0e777fef4416", "comments": [], "name": "nmr-data-topoHSQC-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/3ad233f7-6fc1-48ba-8418-3d3650db4dc6", "comments": [], "name": "nmr-data-topoHSQC-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/f961a92d-8181-4a0e-ac49-86280d0fc234", "comments": [], "name": "nmr-data-topoHSQC-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/8db1d729-d421-4520-a0a2-491425db149f", "comments": [], "name": "nmr-data-topoZQF-TOCSY-1.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/75de8c84-fed2-4d6f-b259-584ee798a7ef", "comments": [], "name": "nmr-data-topoZQF-TOCSY-2.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/0dd18ce0-3117-48b6-a0b4-69b98d6ff65e", "comments": [], "name": "nmr-data-topoZQF-TOCSY-3.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/914a8717-ebfb-4b1a-9c59-d7ba81a7569f", "comments": [], "name": "nmr-data-topoZQF-TOCSY-4.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/bafdb005-55a8-47f1-b64f-ea9cf9ba9bfe", "comments": [], "name": "nmr-data-topoZQF-TOCSY-5.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/63e59e05-d888-4289-b8ae-93075b547946", "comments": [], "name": "nmr-data-topoZQF-TOCSY-6.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/3fed889d-6d8c-4427-825e-22d94880277c", "comments": [], "name": "nmr-data-topoZQF-TOCSY-7.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" }, { "@id": "#data_file/81e71189-710a-43e6-8fdc-8edc1643a632", "comments": [], "name": "nmr-data-topoZQF-TOCSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" } ], "filename": "a_BH2023-isotopomer-nmr-assay.txt", @@ -2726,7 +2726,7 @@ "@id": "#data_file/a2831d88-2d0a-47ca-b5dd-6673f687fb3d", "comments": [], "name": "nmr-data-topoHACO-DIPSY-8.nmrml", - "type": "Free Induction Decay File" + "type": "Free Induction Decay Data File" } ], "filename": "a_BH2023-metabolite-profiling-nmr-assay.txt", From 6d07cef39677d1a80232cc3224a34df7bb1e5d40 Mon Sep 17 00:00:00 2001 From: oyurekten <103259724+oyurekten@users.noreply.github.com> Date: Mon, 16 Sep 2024 02:12:46 +0100 Subject: [PATCH 3/4] Metabolights accepts Metabolite Asignment File type to report metabolite identification results. DataType enum and test data were updated --- mars-cli/mars_lib/models/isa_json.py | 1 + test-data/ISA-BH2023-ALL/isa-bh2023-all.json | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mars-cli/mars_lib/models/isa_json.py b/mars-cli/mars_lib/models/isa_json.py index 11f336c..5159cad 100644 --- a/mars-cli/mars_lib/models/isa_json.py +++ b/mars-cli/mars_lib/models/isa_json.py @@ -39,6 +39,7 @@ class DataTypeEnum(str, Enum): DERIVED_SPECTRAL_DATA_FILE = "Derived Spectral Data File" FREE_INDUCTION_DECAY_DATA_FILE = "Free Induction Decay Data File" ACQUSITION_PARAMETER_DATA_FILE = "Acquisition Parameter Data File" + METABOLITE_ASSIGNMENT_FILE = "Metabolite Assignment File" # Used in MetaboLights to report metabolite assignments DATA_TYPE_VALUES = {item.value for item in DataTypeEnum} diff --git a/test-data/ISA-BH2023-ALL/isa-bh2023-all.json b/test-data/ISA-BH2023-ALL/isa-bh2023-all.json index 6841e08..66c2484 100644 --- a/test-data/ISA-BH2023-ALL/isa-bh2023-all.json +++ b/test-data/ISA-BH2023-ALL/isa-bh2023-all.json @@ -65,11 +65,17 @@ } ], "dataFiles": [ + { + "@id": "#data_file/4dd85c35-6e70-4541-99ac-324328f817eb", + "comments": [], + "name": "m_BH2023___metabolite_profiling_v2_maf.tsv", + "type": "Metabolite Assignment File" + }, { "@id": "#data_file/b3530ec1-6bc5-4757-a526-81c1773530a6", "comments": [], "name": "isotopologue-distribution-analysis.txt", - "type": "Derived Data File" + "type": "Derived Spectral Data File" }, { "@id": "#data_file/2647db5f-0ed8-4536-aec7-8d5d4cfc65d3", @@ -819,6 +825,9 @@ "outputs": [ { "@id": "#data_file/b3530ec1-6bc5-4757-a526-81c1773530a6" + }, + { + "@id": "#data_file/4dd85c35-6e70-4541-99ac-324328f817eb" } ], "parameterValues": [ From a724d42e4393bb95b681fad8306dfd0c34886cd8 Mon Sep 17 00:00:00 2001 From: Kevin De Pelseneer Date: Mon, 30 Sep 2024 17:08:45 +0200 Subject: [PATCH 4/4] Formatting --- mars-cli/mars_lib/models/isa_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mars-cli/mars_lib/models/isa_json.py b/mars-cli/mars_lib/models/isa_json.py index 5159cad..cf9c936 100644 --- a/mars-cli/mars_lib/models/isa_json.py +++ b/mars-cli/mars_lib/models/isa_json.py @@ -32,7 +32,7 @@ class DataTypeEnum(str, Enum): DERIVED_DATA_FILE = "Derived Data File" IMAGE_FILE = "Image File" # The following names are not mentioned in the specs (https://isa-specs.readthedocs.io/en/latest/isajson.html#data-schema-json). - # However, spectral data file names are mentioned in the ISA-Tab specs (https://isa-specs.readthedocs.io/en/latest/isatab.html). + # However, spectral data file names are mentioned in the ISA-Tab specs (https://isa-specs.readthedocs.io/en/latest/isatab.html). # TODO: Review and support all possible data file names mentioned in the the ISA-Tab specs (Section 2.3.8). # Metabolights support the following data file types: RAW_SPECTRAL_DATA_FILE = "Raw Spectral Data File"