Skip to content

Commit

Permalink
fix dts manifest / other json mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Dec 19, 2024
1 parent aa24fff commit d211696
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
32 changes: 17 additions & 15 deletions deployment/conf/supported_apps_w_extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@
"csv",
"tsv",
"xls",
"xlsx",
"json"
"xlsx"
],
"media": [
"tsv",
Expand All @@ -149,6 +148,9 @@
],
"escher_map": [
"json"
],
"dts_manifest": [
"json"
]
},
"types": {
Expand Down Expand Up @@ -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
}
]
Expand Down
4 changes: 3 additions & 1 deletion staging_service/autodetect/GenerateMappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
ZIP,
assembly_id,
decompress_id,
dts_manifest,
escher_map_id,
expression_matrix_id,
extension_to_file_format_mapping,
Expand Down Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions staging_service/autodetect/Mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d211696

Please sign in to comment.