From 5d3e2158ee322d95b484d4f2a4da1a9adb4a670c Mon Sep 17 00:00:00 2001 From: Patrick Kalita Date: Wed, 11 Dec 2024 13:52:30 -0800 Subject: [PATCH] Add legend graphic to CX2 network descriptions --- src/gocam/translation/cx2/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gocam/translation/cx2/main.py b/src/gocam/translation/cx2/main.py index bef6fcc..e0c28ef 100644 --- a/src/gocam/translation/cx2/main.py +++ b/src/gocam/translation/cx2/main.py @@ -48,6 +48,12 @@ "Xenopus", ] +# This graph was produced by the NDEx team based on the style attributes in our CX2 networks. This +# image gets referenced in the network description. It seems a bit fragile to have this static image +# with no process in place to update it if the style changes. But the NDEx folks were fairly +# insistent that we include a legend graphic in the network description. +LEGEND_GRAPHIC_SRC = "https://home.ndexbio.org/img/go-cam_legend_2024108_v2.png" + def _remove_species_code_suffix(label: str) -> str: for code in SPECIES_CODES: @@ -155,6 +161,7 @@ def _add_input_output_nodes( "@context": json.dumps(go_context.as_dict()), "name": gocam.title if gocam.title is not None else gocam.id, "prov:wasDerivedFrom": go_converter.expand(gocam.id), + "description": f"

" } ) # This gets added separately so we can declare the datatype