Configuration file - structure and definitions#
MINERVA projects can have a complex structure (read about project structure here) and the accompanying configuration file (always named config.json) allows to integrate them, and pre-define configuration options that will become available on project file (.zip) upload.
The configuration file has the following structure:
- maps - an array of entries, one for each diagram in the project .zip file, both root and submap. Each entry contains the following keys:
- custom_elements - an array of entries, one for each species alias (read about aliases here) with a defined function. Each entry contains the following keys:
- element_id (string): species alias of the element in the corresponding map
- immediate_link (string): an URL to which the user will be redirected on click of this element
- glyph_file_name (string): a glyph (custom graphics) to be displayed for this element; refers to one of the files in
glyphssubdirectory (read more about glyphs) - submap (string): a submap to which this element should be linked, submap filename without its extension (read more about submaps).
- default_center_x, default_center_y (double): default starting X and Y coordinates for this diagram
- default_zoom_level (integer): default starting zoom level for this diagram; depends on the maximum size of the diagram
- max_zoom_levels (integer): maximum zoom level allowed for this diagram; depends on the maximum size of the diagram
- name (string): a diagram name for which this configuration is assigned; filename without its extension
- custom_elements - an array of entries, one for each species alias (read about aliases here) with a defined function. Each entry contains the following keys:
- overview_images - an array of entries containing instructions how to connect files inside the
imagessubdirectory with the map contents, see Overview images- links array with instructions how to connect an image to map contents
- filename naming linked image file
- width and height of the image
- sbgn (true|false): a flag whether diagrams of this project should be displayed in SBGN style; false means CellDesigner style
- network_view_as_default (true|false): a flag whether diagrams of this project should be displayed as a network (true) or a structured view (false), see also user manual
- hide_on_zoom (true|false): by default, MINERVA optimises diagram display by hiding element labels, arrowheads, and shape outlines on zoom out; setting this flag to false makes MINERVA to show all elements, always.
- disease (string): an
identifiers.orgurl pointing to a MeSH disease identifier - organism (string): an
identifiers.orgurl pointing to a Taxonomy identifier - name (string): name of the project in MINERVA
- version (string): version of the project
- notify_email (string): an email to which project updates are sent about finished project upload and removal
- license: a license object for the contents of the project; a key - value pair with
- name (string): predefined license string; available license strings are listed below
- content (string): predefined license text, as provided by https://creativecommons.org/
- custom_license_name (string): a custom license name, if none of the predefined ones are sufficient
- custom_license_url (string): URL to custom license conditions
- source_git_repository (string): link to source git repository if the project was loaded from git
- source_git_branch (string): name of source git repository branch if the project was loaded from a git branch
Available defined licenses#
- “CC0 1.0 Universal”
- “Creative Commons Attribution 4.0 International Public License”
- “Creative Commons Attribution-ShareAlike 4.0 International Public License”
- “Creative Commons Attribution-NonCommercial 4.0 International”
- “Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License”
- “Creative Commons Attribution-NoDerivatives 4.0 International Public License”
- “Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License”
See also https://minerva-service.lcsb.uni.lu/minerva/new_api/licenses/.
An example configuration file#
Below is a complete JSON structure for an example project. A short summary:
- the project has two maps, named
submap_exampleandadvanced_map_example submap_examplehas a default center XY in [100.0,100.0], default zoom of 2, and max zoom level of 2advanced_map_examplealso defines default center and max and default zoom levels; it has three custom elements (two glyphs and a submap):- glyphs: the element with alias
ca1uses glyphglyphs/g2.png, the element with aliassa11uses glyphglyphs/g1.png - submaps: the element with alias
sa13points to the submapsubmap_example
- glyphs: the element with alias
- the project has two overview images in the
imagessubfolder and defines how they are connected to the map - the project is displayed in CellDesigner style, and is annotated with disease MeSH
D010300, and organism9606 - name, email and version are provided
- contents are distributed under “Creative Commons Attribution 4.0 International Public License”
- the project was uploaded locally (git repository is
null)
{
"maps": [
{
"custom_elements": [
{
"element_id": "sa11",
"immediate_link": null,
"glyph_file_name": "glyphs/g1.png",
"submap": null
},
{
"element_id": "ca1",
"immediate_link": null,
"glyph_file_name": "glyphs/g2.png",
"submap": null
},
{
"element_id": "sa13",
"immediate_link": null,
"glyph_file_name": null,
"submap": "submap_example"
}
],
"default_center_x": 10.0,
"default_center_y": 10.0,
"default_zoom_level": 1,
"max_zoom_levels": 2,
"name": "advanced_map_example"
},
{
"custom_elements": [],
"default_center_x": 100.0,
"default_center_y": 100.0,
"default_zoom_level": 2,
"max_zoom_levels": 2,
"name": "submap_example"
}
],
"overview_images": [
{
"links": [
{
"link_type": "SEARCH_QUERY",
"polygon": [
{
"x": 967.0,
"y": 700.0
},
{
"x": 2067.0,
"y": 700.0
},
{
"x": 2067.0,
"y": 1207.0
},
{
"x": 967.0,
"y": 1207.0
}
],
"target_map_filename": null,
"target_map_x": null,
"target_map_y": null,
"target_map_z": null,
"target_overview_image_filename": null,
"search_query": "reaction:re3,reaction:re4"
}
],
"filename": "overview_sub.png",
"width": 3033,
"height": 1685
},
{
"links": [
{
"link_type": "OVERVIEW_IMAGE",
"polygon": [
{
"x": 167.0,
"y": 607.0
},
{
"x": 1267.0,
"y": 607.0
},
{
"x": 1267.0,
"y": 1117.0
},
{
"x": 167.0,
"y": 1117.0
}
],
"target_map_filename": null,
"target_map_x": null,
"target_map_y": null,
"target_map_z": null,
"target_overview_image_filename": "overview_sub.png",
"search_query": null
},
{
"link_type": "MAP",
"polygon": [
{
"x": 1653.0,
"y": 453.0
},
{
"x": 2277.0,
"y": 191.0
},
{
"x": 2901.0,
"y": 453.0
},
{
"x": 2901.0,
"y": 1500.0
},
{
"x": 2277.0,
"y": 1177.0
},
{
"x": 1653.0,
"y": 1500.0
}
],
"target_map_filename": "advanced_map_example",
"target_map_x": 270.0,
"target_map_y": 24.0,
"target_map_z": 4.0,
"target_overview_image_filename": null,
"search_query": null
}
],
"filename": "overview_main.png",
"width": 3033,
"height": 1685
}
],
"sbgn": false,
"network_view_as_default": false,
"hide_on_zoom": true,
"disease": "https://identifiers.org/mesh:D010300",
"organism": "https://identifiers.org/taxonomy:9606",
"name": "advanced_map",
"version": "v0.1",
"notify_email": "my@email.com",
"custom_license_name": "",
"custom_license_url": "",
"source_git_repository": null,
"source_git_branch": null,
"license": {
"name": "Creative Commons Attribution 4.0 International Public License",
"content": "[text of the license from https://creativecommons.org/licenses/by/4.0/deed.en]"
}
}