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:
- sbgn (true|false): a flag whether diagrams of this project should be displayed in SBGN style; false means CellDesigner style
- 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
- 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
Note
Overview images are not configured here.
Their configuration is provided in the coords.json file inside the images subdirectory —
see Overview images.
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/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 four custom elements:- glyphs: the element with alias
ca1uses glyphglyphs/g1.png, the element with aliassa11uses glyphglyphs/g2.png - immediate links: the element with alias
sa8redirects to URL “https://disease-maps.io/” - submaps: the element with alias
sa13points to the submapsubmap_example
- glyphs: the element with alias
- 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": [],
"default_center_x": 100.0,
"default_center_y": 100.0,
"default_zoom_level": 2,
"max_zoom_levels": 2,
"name": "submap_example"
},
{
"custom_elements": [
{
"element_id": "sa11",
"immediate_link": null,
"glyph_file_name": "glyphs/g2.png",
"submap": null
},
{
"element_id": "ca1",
"immediate_link": null,
"glyph_file_name": "glyphs/g1.png",
"submap": null
},
{
"element_id": "sa8",
"immediate_link": "https://disease-maps.io/",
"glyph_file_name": null,
"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": 2,
"max_zoom_levels": 3,
"name": "advanced_map_example"
}
],
"sbgn": false,
"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"
}
}