From d211696551d902489876e460ff32299a1473b930 Mon Sep 17 00:00:00 2001 From: Bill Riehl Date: Thu, 19 Dec 2024 12:13:58 -0500 Subject: [PATCH] fix dts manifest / other json mapping --- .../conf/supported_apps_w_extensions.json | 32 ++++++++++--------- .../autodetect/GenerateMappings.py | 4 ++- staging_service/autodetect/Mappings.py | 4 +++ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/deployment/conf/supported_apps_w_extensions.json b/deployment/conf/supported_apps_w_extensions.json index a4649424..47af9b64 100644 --- a/deployment/conf/supported_apps_w_extensions.json +++ b/deployment/conf/supported_apps_w_extensions.json @@ -121,8 +121,7 @@ "csv", "tsv", "xls", - "xlsx", - "json" + "xlsx" ], "media": [ "tsv", @@ -149,6 +148,9 @@ ], "escher_map": [ "json" + ], + "dts_manifest": [ + "json" ] }, "types": { @@ -1102,31 +1104,31 @@ } ] }, - "json": { + "smbl": { "file_ext_type": [ - "JSON" + "SBML" ], "mappings": [ { - "id": "import_specification", - "title": "Import Specification", - "app_weight": 1 - }, - { - "id": "escher_map", - "title": "EscherMap", + "id": "fba_model", + "title": "FBA Model", "app_weight": 1 } ] }, - "smbl": { + "json": { "file_ext_type": [ - "SBML" + "JSON" ], "mappings": [ { - "id": "fba_model", - "title": "FBA Model", + "id": "escher_map", + "title": "EscherMap", + "app_weight": 1 + }, + { + "id": "dts_manifest", + "title": "Data Transfer Service Manifest", "app_weight": 1 } ] diff --git a/staging_service/autodetect/GenerateMappings.py b/staging_service/autodetect/GenerateMappings.py index 4d2287f7..62e7cc1e 100644 --- a/staging_service/autodetect/GenerateMappings.py +++ b/staging_service/autodetect/GenerateMappings.py @@ -50,6 +50,7 @@ ZIP, assembly_id, decompress_id, + dts_manifest, escher_map_id, expression_matrix_id, extension_to_file_format_mapping, @@ -90,6 +91,7 @@ phenotype_set_id: "Phenotype Set", escher_map_id: "EscherMap", import_specification: "Import Specification", + dts_manifest: "Data Transfer Service Manifest" } file_format_to_app_mapping = {} @@ -129,7 +131,7 @@ fba_model_id, import_specification, ] -file_format_to_app_mapping[JSON] = [escher_map_id, import_specification] +file_format_to_app_mapping[JSON] = [escher_map_id, dts_manifest] file_format_to_app_mapping[SBML] = [fba_model_id] app_id_to_extensions = defaultdict(list) diff --git a/staging_service/autodetect/Mappings.py b/staging_service/autodetect/Mappings.py index af08e54c..a063eb33 100644 --- a/staging_service/autodetect/Mappings.py +++ b/staging_service/autodetect/Mappings.py @@ -51,6 +51,10 @@ # import_specification is not a "real" data type, but rather tells the narrative that the # file contains specifications for how to load one or more other staging area files. import_specification = "import_specification" +# dts_manifest is also not a real data type, but functions like import_specification as +# it tells the narrative that the file has specs for loading other staging area files +# that came from the Data Transfer Service, and that this manifest follows that spec. +dts_manifest = "dts_manifest" decompress_id = "decompress" metabolic_annotations_id = "metabolic_annotation" metabolic_annotations_bulk_id = "metabolic_annotation_bulk"