Skip to content

Instantly share code, notes, and snippets.

@jwist
Last active November 13, 2018 05:51
Show Gist options
  • Save jwist/804dacf96ef8bfc212607bac3f6335e7 to your computer and use it in GitHub Desktop.
Save jwist/804dacf96ef8bfc212607bac3f6335e7 to your computer and use it in GitHub Desktop.
view.json for visualizeR rangesExplorer
{
"version": "2.98.0",
"grid": {
"layers": {
"Default layer": {
"name": "Default layer"
},
"admin": {
"name": "admin"
},
"spectra": {
"name": "spectra"
},
"help": {
"name": "help"
},
"Upload": {
"name": "Upload"
}
},
"xWidth": 10,
"yHeight": 10
},
"modules": [
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 155,
"top": 50
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 1,
"vars_in": [
{
"rel": "value",
"name": "pcaResultLoadings"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"label"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 13,
"height": 15
},
"zIndex": 0,
"display": true,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 2
},
"size": {
"width": 35,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 2,
"vars_in": [
{
"rel": "list",
"name": "data"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onSelect",
"rel": "row",
"jpath": [
"data"
],
"name": "selectedDataSets"
},
{
"event": "onSelect",
"rel": "row",
"jpath": [
"metadata"
],
"name": "selectedMetadata"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Dartaset Selector (click on row)",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"label"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 38,
"top": 23
},
"size": {
"width": 14,
"height": 15
},
"zIndex": 0,
"display": true,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 18
},
"size": {
"width": 35,
"height": 17
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 3,
"vars_in": [
{
"rel": "list",
"name": "selectedDataSets"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onSelect",
"rel": "row",
"jpath": [
"data"
],
"name": "selectedData"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Select analysis (click on row)",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nAPI.loading('computeStatistics','Please wait while we compute basic statistics for the chosen data');\n\n// you need to leave some time to display the message\n// we use setImmediate to achieve this\n\nsetImmediate(getStats);\n\n\nfunction getStats() {\nlet selectedData = API.getData('selectedData')\nlet varNames = Object.keys(selectedData[0])\n\n\nlet x = new Array\nlet s = new Array\nObject.keys(selectedData[0]).forEach(e => {\n x.push([[e], selectedData.map(col => col[e])])\n s.push({\"index\": e,\n \"indicator\": {\n \"type\": \"sparkline\",\n \"value\": selectedData.map(col => col[e]),\n \"_options\": {\n \"type\": \"box\",\n \"raw\": false,\n \"minValue\": -50,\n \"maxValue\": 20,\n \"boxLineColor\": \"black\",\n \"boxFillColor\": \"lightgrey\",\n \"whiskerColor\": \"black\",\n \"medianColor\": \"red\",\n \"lineColor\": \"black\",\n \"target\": [],\n \"targetColor\": \"green\"\n }\n }})\n})\n\n\nconsole.log('calculate indicators executed')\n\nAPI.createData('selectedDataMatrix', s)\nAPI.createData('x', x)\nAPI.createData('varNames', varNames)\n\n API.stopLoading('computeStatistics');\n}\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 60,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 4,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedData"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "calculate indicators",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns",
"editable",
"keepSelected"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
"30"
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"index"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"width": 86,
"hideColumn": []
},
{
"name": "indicator",
"jpath": [
"indicator"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"width": 129,
"hideColumn": []
}
]
],
"actionCols": [
[
{
"name": "help",
"icon": "fa-question",
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"action": "getHelp",
"position": "end",
"clickMode": "text",
"isAction": true
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 36
},
"size": {
"width": 35,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metabolites indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 5,
"vars_in": [
{
"rel": "list",
"name": "selectedDataMatrix"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onRowsSelect",
"rel": "rows",
"jpath": [],
"name": "selectedIndicators"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Metabolites selector",
"zindex": 0
},
{
"url": "modules/types/chart/statistics/parallel_coordinates/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"colJPath": [
"element"
],
"options": [
[
"hide",
"brush",
"shadow"
]
],
"brushMode": [
"1D-axes-multi"
],
"predicate": [
"and"
]
}
],
"cols": [
[
{}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": true,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 37,
"top": 2
},
"size": {
"width": 86,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to select sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 40,
"top": 0
},
"size": {
"width": 121,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 6,
"vars_in": [
{
"rel": "value",
"name": "selectedData"
},
{
"rel": "columns",
"name": "parallelVariablesLabels"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onBrushSelection",
"rel": "flagResult",
"jpath": [],
"name": "selectedParallel"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
185,
27,
27,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Click and drag on the variable axis to filter sample within a range",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let selectedIndicators = API.getData('selectedIndicators')\n\nlet parallelVariablesLabels = []\nselectedIndicators.map(x => {\n parallelVariablesLabels.push({\"name\" : x.index, \"jpath\" : \"element.\" + x.index})\n})\n\nAPI.createData('parallelVariablesLabels', parallelVariablesLabels)\n\nconsole.log('create parallel executed')\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 25
},
"size": {
"width": 60,
"height": 21
},
"zIndex": 0,
"display": true,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 7,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedIndicators"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "create parallel variables",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"//let selectedSample = API.getData('selectedParallel');\n//let selectedMarkers = API.getData('selectedMarkers').resurrect();\nlet metadata = API.getData('selectedMetadata');\nlet s = new Array();\n\n//let s = selectedSample.reduce(\n// (out, bool, index) => bool ? out.concat(metadata[index]) : out, \n//[]\n//)\n\nswitch(this.variable) {\n case 'selectedParallel':\n //selectedParallel is a boolean filter\n let selectedSample = API.getData('selectedParallel');\n s = selectedSample.reduce(\n (out, bool, index) => bool ? out.concat(metadata[index]) : out, \n []\n )\n break;\n case 'selectedMarkers':\n //selectedMarkers is a list an array with index\n let selectedMarkers = API.getData('selectedMarkers').resurrect();\n console.log(selectedMarkers);\n s = metadata.filter((v,i,a) => selectedMarkers.includes(i + 1));\n break;\n}\n\n\nAPI.createData('selectedSamples', s)\n\nconsole.log('sample selector executed')\n\n\n//let s2 = []\n//selectedSample.forEach( (e, i) => {\n// if (e) {s2.push(metadata[i])}\n//})\n\n//let selectedMetadata = metadata[s]\n//let m = metadata.filter( (x, i) => {\n// if (s.includes(i)) {return i}\n//}\n//)\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 47
},
"size": {
"width": 60,
"height": 20
},
"zIndex": 0,
"display": true,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 29,
"top": 11
},
"size": {
"width": 72,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 8,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedParallel"
},
{
"rel": "inputValue",
"name": "selectedMarkers"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "sample selector",
"zindex": 19
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns",
"editable"
]
],
"copyPaste": [
[
"active"
]
],
"copyPasteOptions": [
[
"newRows",
"readOnly"
]
],
"autoColumns": [
[]
],
"toolbar": [
[
"showHide"
]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735\n"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"jpath": [],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": true,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 90,
"top": 29
},
"size": {
"width": 35,
"height": 21
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 40,
"top": 63
},
"size": {
"width": 121,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 9,
"vars_in": [
{
"rel": "list",
"name": "selectedSamples"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onRowsSelect",
"rel": "rows",
"jpath": [],
"name": "selectedSampleIDs"
},
{
"event": "onHover",
"rel": "row",
"jpath": [],
"name": "currentID"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Metadata of the filtered samples",
"zindex": 0
},
{
"url": "modules/types/display/single_value/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
null
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
"string"
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 39
},
"size": {
"width": 28,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Error messages",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 0
},
"size": {
"width": 17,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 10,
"vars_in": [
{
"rel": "value",
"name": "errorMessage"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Error messages",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"editable",
"keepSelected"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
"120"
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "boxplot",
"jpath": [],
"editor": "none",
"forceType": "chart",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "main",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 84,
"top": 3
},
"size": {
"width": 68,
"height": 40
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 11,
"vars_in": [
{
"rel": "list",
"name": "boxPlot"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Print",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\n\n// action name is captured (boxplotButton or invert_button)\n// the first one triggers the calculation, while the second one must only\n// invert the selection\n\nlet actionName, actionValue;\n\nactionName = this.action.name;\nactionValue = this.action.value;\n\n// selectedIndicators are the metabolites selected in the PCA or parallel\n// Boxplots are only drawn for these metabolites\nlet selectedIndicators = API.getData('selectedIndicators')\nlet selectedSample = API.getData('selectedSamples')\nlet selectedSampleIDs = API.getData('selectedSampleIDs')\n\nswitch(actionName) {\n case 'invertButton':\n let metadata = API.getData('selectedMetadata');\n let s = new Array(); \n \n let selectedMarkers = selectedSample.map(x => x._highlight);\n //console.log(\"markers selected before inversion: \" + selectedMarkers);\n \n s = metadata.filter((v,i,a) => !selectedMarkers.includes(i + 1));\n //console.log(\"Samples after inversion: \" + s.map(x => x._highlight));\n\n API.createData('selectedSamples', s)\n console.log('Boxplot executed: exec with invertButton')\n break;\n \n case 'resetSelectionButton':\n API.createData('selectedSampleIDs', []);\n API.createData('errorMessage', 'selection reseted');\n break;\n \n case 'boxplotButton':\n\n if (selectedSampleIDs.length > 0) {\n let filter = selectedSampleIDs.map(x => x._highlight);\n let filterSamples = selectedSample.map(x => x._highlight);\n //console.log(filter);\n //console.log(selectedSample);\n \n var aGroup = selectedIndicators.map((x, i) => {\n return x.indicator.value.filter((e, i) => filter.includes(i+1));\n });\n \n var bGroup = selectedIndicators.map(x => {\n return x.indicator.value.filter((e, i) => !filter.includes(i+1) && filterSamples.includes(i+1));\n });\n //console.log(\"agroup: \" + aGroup);\n //console.log(\"bgroup: \" + bGroup);\n \n //console.log(bGroup)\n let bplots = []\n if (selectedSampleIDs.length > 0) {\n aGroup.forEach((x, i) => {\n bplots[i] = new Boxplot(selectedIndicators[i].index, [getBoxPlot(aGroup[i], 0), getBoxPlot(bGroup[i], 1)]);\n });\n } else {\n parallelVariables.forEach((x, i) => {\n bplots[i] = new Boxplot(selectedIndicators[i].index, [getBoxPlot(x, i)]);\n });\n }\n //let boxPlot = new Boxplot('Box plots', bplots)\n \n //let boxPlot = new Boxplot('e', [getBoxPlot(vect, 0)])\n //let boxPlot2 = new Boxplot('e', [getBoxPlot(vect, 1)])\n //console.log(bplots)\n \n //API.createData('boxPlot', [boxPlot, boxPlot2])\n API.createData('boxPlot', bplots)\n API.createData('boxPlotvertical', bplots)\n } else {\n let errorMessage = \"Please select at least one sample in the table\"\n API.createData('errorMessage', errorMessage);\n }\n break;\n}\n\nfunction Boxplot (title, boxData) {\n this.title = title,\n this.data = boxData\n}\n\nfunction BoxData (x, q1, q2, q3, whiskers, outliers) {\n this.type = 'box',\n this.orientation = 'x'\n this.maxBoxWidth = 10,\n this.defaultStyle = {\n\t \"outlierLineWidth\" : 1,\n\t \"outlierLineColor\" : 'rgb( 255, 255, 255 )',\n\t \"outlierFillColor\" : 'rgb( 0, 255, 0 )',\n\t \"outlierFillOpacity\" : 0\n\t}\n this.boxes = new Array( \n {'y' : x, \n 'Q1' : q1, \n 'Q2' : q2, \n 'Q3' : q3, \n 'whiskers' : whiskers, \n 'outliers' : outliers})\n}\n\nfunction quantile(data, q) {\n data=Array_Sort_Numbers(data);\n var pos = ((data.length) - 1) * q;\n var base = Math.floor(pos);\n var rest = pos - base;\n if( (data[base+1]!==undefined) ) {\n return data[base] + rest * (data[base+1] - data[base]);\n } else {\n return data[base];\n }\n}\n\nfunction Array_Sort_Numbers(inputarray){\n return inputarray.sort(function(a, b) {\n return a - b;\n });\n}\n\n//let vect = [.26, 0.34, 0.70, 1.75, 50.57, 1.55, 0.08, 0.42, 0.50, 3.20, 0.15, 0.49, 0.95, 0.24, 1.37, 0.17, 6.98, 0.10, 0.94, 0.38]\n\nfunction getBoxPlot(vect, idx){\n let q25 = quantile(vect, 0.25)\n let q50 = quantile(vect, 0.50)\n let q75 = quantile(vect, 0.75)\n \n let iqr = 1.5* (q75 - q25)\n let max = Math.max.apply(Math, vect)\n let min = Math.min.apply(Math, vect)\n \n let upperLimit = (max < q75 + iqr ? max : q75 + iqr)\n let lowerLimit = (min > q25 - iqr ? min : q25 - iqr)\n \n let outliers = []\n vect.forEach(e => {\n if (e > upperLimit ) {\n outliers.push(e)\n }\n if (e < lowerLimit ) {\n outliers.push(e)\n } \n } )\n \n let boxData = new BoxData(idx, q25, q50, q75, [lowerLimit, upperLimit], outliers)\n \n return boxData\n}\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 68
},
"size": {
"width": 60,
"height": 16
},
"zIndex": 0,
"display": true,
"title": "box plot calculator",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 12,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "boxplotButton"
},
{
"rel": "execute",
"name": "invertButton"
},
{
"rel": "execute",
"name": "resetSelectionButton"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "box plot calculator",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Compute / Refresh Boxplot"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
null
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 159,
"top": -1
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 15,
"top": 85
},
"size": {
"width": 14,
"height": 8
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 13,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "boxplotButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 36
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Invert selection"
],
"onLabel": [
"invert selection"
],
"offLabel": [
"restore selection"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"invert"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 133,
"top": 16
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 85
},
"size": {
"width": 14,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 14,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "invertButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 34
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 157,
"top": 9
},
"size": {
"width": 27,
"height": 35
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 15,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p>to do:</p>\n\n<p><s>fix inverse selection</s></p>\n\n<p><s>reset selection</s></p>\n\n<p><s>boxplot without selection</s></p>\n\n<p>&nbsp;</p>\n\n<p><s>upload target</s></p>\n\n<p>loadings pca</p>\n\n<p>color pca / select groups for color</p>\n\n<p>check for zero deviation in columns</p>\n\n<p>&nbsp;</p>\n\n<p>correlation matrix between selected Parallels</p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"var {Matrix, MatrixStat: Stat, ArrayStat} = ML;\nconst computeMean = ArrayStat.mean;\nconst computeVariance = ArrayStat.variance;\nconst mean = Stat.mean;\nconst stdev = Stat.standardDeviation;\nvar spectraDataSet = [];\nvar matrixYData = [];\nvar actionName, actionValue\n\nlet d = API.getData('data')\nlet highlights = d[0].metadata.map(x=>x._highlight)\n\nswitch(this.variable) {\n case 'csvParameters':\n actionName = 'csvParameters';\n break;\n default:\n actionName = this.action.name;\n actionValue = this.action.value;\n}\n\nswitch (actionName) {\n case \"PCA\":\n //get the matrix\n matrixYData = API.getData(\"selectedIndicators\").map(x=>x.indicator.value);\n matrixYData = transpose(matrixYData);\n\n //check for number of columns\n if (matrixYData[0].length < 2) {\n API.createData('errorMessage', 'Select at least 2 indicators(metabolites)');\n break;\n };\n \n // get parameters for PCA\n let pcaPlotParam = API.getData(\"pcaPlot\").resurrect();\n \n let pca = PCA(matrixYData, {\n nComponents: pcaPlotParam.numberOfEigenVectors,\n threshold: pcaPlotParam.threshold,\n maxIterations: pcaPlotParam.maxIterations,\n scale: true,\n center: true\n });\n \n plotResult(pca.T, pcaPlotParam, 'pcaResult');\n plotResult(pca.P, pcaPlotParam, 'pcaResultLoadings');\n break;\n \n case 'plotResult':\n var {x, y} = actionValue.data;\n var indexs = actionValue.indexs;\n var dataClass = actionValue.dataClass;\n if (!dataClass) {\n dataClass = new Array(x.length).fill([1]);\n }\n var l = x.length;\n let nbClasses = dataClass[0].length;\n var result = {\n title: 'main plot',\n data: [\n {\n x: x,\n y: y,\n type: 'scatter',\n info: Array.from({length: x.length}, (v, k) => k+1),\n styles: {\n unselected: new Array(x.length),\n selected: new Array(x.length)\n }\n }\n ]\n };\n var selectedScale = chroma.scale(['green', 'black']).domain([0, nbClasses - 1]).mode('hsl');\n var unselectedScale = chroma.scale(['red', 'blue']).domain([0, nbClasses - 1]).mode('hsl');\n console.log(unselectedScale(0).toString());\n \n let unselected = result.data[0].styles.unselected;\n let selected = result.data[0].styles.selected;\n \n for (let i = 0; i < l; i++) {\n for (let j = 0; j < nbClasses; j++) {\n if(dataClass[i][j] === 1) {\n unselected[i] = {\n fill: unselectedScale(j).toString(),\n shape: \"circle\",\n cx: 0,\n cy: 0,\n r: 3,\n height: \"5px\",\n width: \"5px\",\n stroke: \"transparent\"\n };\n selected[i] = {\n fill: selectedScale(j).toString(),\n shape: \"circle\",\n cx: 0,\n cy: 0,\n r: 3,\n height: \"5px\",\n width: \"5px\",\n stroke: \"transparent\"\n };\n j = nbClasses;\n };\n // info[i] = {index: indexs[i]};\n }\n }\n API.createData(actionValue.varName, result);\n if (actionValue.varName == 'pcaResult' ) {\n API.createData(actionValue.varName + 'ellipse', predictEllipse(x, y, 5, 0.95, 1024));\n }\n break;\n}\n\nfunction plotResult(prediction, pcaPlot, varName) {\n var x = prediction.getColumn(pcaPlot.pcx - 1);\n var y = prediction.getColumn(pcaPlot.pcy - 1);\n var dataClass = new Array(x.length).fill([0, 0, 0, 1]);\n //console.log(dataClass);\n dataClass[0] = [1, 0,0, 0];\n dataClass[1] = [0, 1,0, 0];\n dataClass[2] = [0, 0,1, 0];\n //API.createData('dataToPlot', {data: {x, y}, varName, dataClass});\n API.doAction('plotResult', {data: {x, y}, varName, dataClass});\n}\n\nfunction adjustData(dataSet, options) {\n if (Array.isArray(dataSet[0])) {\n dataSet = Matrix.checkMatrix(dataSet);\n } else if (Array.isArray(dataSet)) {\n dataSet = new Matrix(dataSet.map(a => {\n return [a];\n }));\n } else {\n throw new Error('Invalid data type for dataSet');\n }\n const {\n means = Stat.mean(dataSet),\n std = Stat.standardDeviation(dataSet, means, true)\n } = options;\n\n return [dataSet, means, std];\n}\n\nfunction normal(x) {\n if (!Array.isArray(x)) {\n throw new Error('The input should be an array');\n } else if (!Array.isArray(x[0])) {\n return vectorNormalization(x);\n } else {\n return matrixNormalization(x);\n }\n}\n\nfunction vectorNormalization(data) {\n let mean = computeMean(data);\n let std = computeVariance(data, true);\n\n let ans = new Array(data.length);\n if (std === 0) {\n for (let i = 0; i < ans.length; i++) {\n ans[i] = (data[i] - mean);\n }\n } else {\n for (let i = 0; i < ans.length; i++) {\n ans[i] = (data[i] - mean) / std;\n }\n }\n\n return ans;\n}\n\nfunction matrixNormalization(data) {\n let means = MatrixStat.mean(data, 1);\n let std = matrixStandardDeviation(data, means);\n\n let ans = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n ans[i] = new Array(data[i].length);\n for (let j = 0; j < data[i].length; j++) {\n if (std[i] === 0) {\n ans[i][j] = (data[i][j] - means[i]);\n } else {\n ans[i][j] = (data[i][j] - means[i]) / std[i];\n }\n }\n }\n return ans;\n}\n\nfunction matrixStandardDeviation(data, means) {\n return data.map(\n (row, i) => Math.sqrt(row.reduce(\n (acc, val) => acc + ((val - means[i]) * (val - means[i]))\n , 0) / (row.length - 1))\n );\n}\n\nfunction PCA(dataset, options = {}) {\n var {\n nComponents = 2,\n threshold = 1e-9,\n maxIterations = 100\n } = options;\n\n var eMatrix = _adjust(dataset, options);\n \n var r = eMatrix.rows;\n var c = eMatrix.columns;\n\n var T = Matrix.zeros(r, nComponents);\n var P = Matrix.zeros(c, nComponents);\n var eigenvalues = new Array(nComponents);\n \n for (let i = 0; i < nComponents; i++) {\n let tIndex = maxSumColIndex(eMatrix.clone().mulM(eMatrix));\n let t = eMatrix.getColumnVector(tIndex);\n \n let k = 0;\n let tNew = t.dot(t);\n for (let tOld = Number.MAX_SAFE_INTEGER; Math.abs(tOld - tNew) > threshold && k < maxIterations; k++) {\n var p = getLoading(eMatrix, t);\n t = eMatrix.mmul(p);\n tOld = tNew;\n tNew = t.dot(t);\n //console.log(t.dot(t), tNew,tOld)\n \n }\n eigenvalues[i] = tNew;\n T.setColumn(i, t);\n P.setColumn(i, p);\n eMatrix.sub(t.mmul(p.transpose()));\n }\n return {T, P};\n}\n\nfunction getLoading(e, t) {\n var m = e.columns;\n var n = e.rows;\n\n var result = new Matrix(m, 1);\n\n var Bcolj = new Array(n);\n for (var i = 0; i < m; i++) {\n var s = 0;\n for (let k = 0; k < n; k++) {\n s += e.get(k, i) * t[k][0];\n }\n result.set(i, 0, s);\n }\n return result.mul(1 / result.norm());\n}\n\nfunction maxSumColIndex(data) {\n return data.sum('column').maxIndex()[0];\n}\n\nfunction _adjust(dataset, options) {\n dataset = new Matrix(dataset);\n if (options.center) {\n const means = mean(dataset);\n const stdevs = stdev(dataset, means, true);\n // this.means = means;\n dataset.subRowVector(means);\n if (options.scale) {\n for (var i = 0; i < stdevs.length; i++) {\n if (stdevs[i] === 0) {\n throw new RangeError('Cannot scale the dataset (standard deviation is zero at index ' + i);\n }\n }\n // this.stdevs = stdevs;\n dataset.divRowVector(stdevs);\n }\n }\n return dataset;\n};\n\nfunction predictEllipse(x, y, n, alpha, nbPoints) {\n let variance = [computeVariance(x), computeVariance(y)];\n let means = [0,0];\n let elp = ellipse([0,0], variance, nbPoints)\n let c = 2 * (n-1)/n * (n+1)/(n-2);\n let F = Math.sqrt(c * 4.7374);\n elp = elp.map((point) => {\n return point.map((p, i) => F * p + means[i])\n })\n return elp;\n}\n\nfunction ellipse(center, std, nbPoints) {\n let vector = new Array(nbPoints);\n let jump = 2 * Math.PI / (nbPoints - 1);\n let t = 0;\n for (let i = 0; i < nbPoints; i++) {\n vector[i] = [center[0] + Math.sqrt(std[0]) * Math.cos(t), center[1] + Math.sqrt(std[1]) * Math.sin(t)];\n t += jump;\n }\n return vector;\n}\n\nfunction transpose(matrix) {\n return matrix[0].map((col, i) => matrix.map(row => row[i]));\n}\n"
]
}
],
"libs": [
[
{
"lib": "ML",
"alias": "ML"
},
{
"lib": "src/util/ui",
"alias": "UI"
},
{
"lib": "jszip",
"alias": "JSZip"
},
{
"lib": "components/papa-parse/papaparse.min",
"alias": "Papa"
},
{
"lib": "SD",
"alias": "SD"
},
{
"lib": "chroma",
"alias": "chroma"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 94
},
"size": {
"width": 60,
"height": 14
},
"zIndex": 0,
"display": true,
"title": "compute pca",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 16,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "PCA"
},
{
"rel": "execute",
"name": "plotResult"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "compute pca",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"PCA"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
null
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 74,
"top": 20
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 25
},
"size": {
"width": 17,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 130,
"top": 29
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 96,
"top": 37
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 96,
"top": 37
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 17,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "PCA"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 37
},
{
"url": "modules/types/edition/onde/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"hasButton": [
[]
],
"button_text": [
"Export"
],
"debouncing": [
0
],
"output": [
"modified"
],
"mode": [
"schema"
],
"schemaSource": [
"config"
],
"schema": [
"{\n \"type\":\"object\",\n \"properties\":{\n \"pcx\":{\n \"label\":\"PCX\",\n \"type\":\"number\",\n \"title\":\"Principal component in X axis\",\n \"default\": \"1\"\n },\n \"pcy\":{\n \"label\":\"PCY\",\n \"type\":\"number\",\n \"title\":\"Principal component in Y axis\",\n \"default\": \"2\"\n },\n \"numberOfEigenVectors\": {\n \"label\":\"EigenVectors\",\n \"type\":\"number\",\n \"title\":\"number of principal components to use\",\n \"default\": \"3\"\n }\n }\n}"
],
"onchangeFilter": [
null
]
}
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 114,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 83,
"top": 12
},
"size": {
"width": 32,
"height": 19
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 103,
"top": 23
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 89,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 89,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 18,
"vars_in": [
{
"rel": "inputValue",
"name": "pcaPlot"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"xy"
],
"wheelAction": [
"none"
],
"wheelbaseline": [
0
],
"fullOut": [
"both"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[]
],
"selectScatter": [
[
"yes"
]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 53,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 116,
"top": 12
},
"size": {
"width": 29,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 39,
"height": 40
},
"zIndex": 0,
"display": true,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 19,
"vars_in": [
{
"rel": "chart",
"name": "pcaResult"
},
{
"rel": "chart",
"name": "pcaResultellipse"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onSelectScatter",
"rel": "selectedData",
"jpath": [],
"name": "selectedMarkers"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Scores",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let selectedSampleIDs = API.getData('selectedSampleIDs')\nlet spec = API.getData('spec')\nlet invert = 1\n\nlet selectedSample = API.getData('selectedParallel')\nif (selectedSampleIDs.length > 0) {\n let F = selectedSampleIDs.map(x => x._highlight);\n console.log(F)\n var data = spec.filter((v, i, a) => F.includes(i+1));\n}\n\n//let data = spec.filter((e, i) => {\n// return (invert == 1 ? selectedSample[i] : !selectedSample[i]);\n//});\n\n//let data = selectedSampleIDs.map(x => x._highlight);\n//let data = spec.map(x=>x.dataMatrix);\n\n//let data = spec.filter(\n// (v, i, a) => selectedSample[i]\n//)\n\nlet x = data[0].dataMatrix.filter(function(value, index, Arr) {\n return index % 2 == 0\n})\n\nlet color = []\nlet col = []\nx.forEach( i => col.push({'_rgb':[0,0,255,1]}) )\n//color.forEach((ele, ind, arr) => arr[ind]._rgb[0] = 0)\n\n\nlet y = data.map( x => \n x.dataMatrix.filter((value, index, Arr) => \n index % 2 == 1\n )\n)\n\nlet spectra = data.map((e, i) => {\n let groupColor = e.color.split(\"(\")[1].split(\")\")[0].split(\",\").map(Number)\n color =[]\n x.forEach( () => color.push({'_rgb':groupColor}) )\n let s = (\n {'type': 'color',\n 'y': y[i],\n 'x': x,\n 'color': color\n })\n return s\n }\n)\n\nAPI.createData('filteredSpectra', {'data':spectra})\nconsole.log(\"executed: make chart spectra from parralel\")\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 109
},
"size": {
"width": 60,
"height": 20
},
"zIndex": 0,
"display": true,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 89,
"top": 38
},
"size": {
"width": 66,
"height": 55
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 20,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedSampleIDs"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "make chart spectra from parralel",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nif (this.variable==='currentLayer') {\n this.button=get('currentLayer')+'';\n}\n\nvar layers={\n 'default': {\n layer:'Default layer',\n info:`\n <h3>General overview of the sample</h3>\n Click on a button to change specific values and jump to the corresponding tab\n `\n },\n 'spectra': {\n layer: 'spectra',\n info: `<h3>Spectra view</h3> From selected sample, go back to the original data/spectra.`\n },\n 'help': {\n layer: 'help',\n info: `<h3>Help configuration:</h3> Configure and update help information.`\n },\n 'Upload': {\n layer: 'Upload',\n info: `<h3>Upload tool:</h3> Upload your data.`\n }\n\n}\n\nif (layers[this.button]) {\n for (var key of Object.keys(layers)) {\n this.enableButton(key);\n }\n API.switchToLayer(layers[this.button].layer)\n this.disableButton(this.button);\n API.createData('layerInfo',layers[this.button].info);\n window.localStorage.setItem('defaultSampleLayer', this.button);\n} else {\n switch (this.button) {\n case 'save':\n API.doAction('save');\n break;\n case 'help':\n API.doAction('Help');\n break;\n }\n}\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "default",
"label": "Browser",
"hide": [],
"disable": []
},
{
"name": "spectra",
"label": "Spectra",
"hide": [],
"disable": []
},
{
"name": "Upload",
"label": "Upload",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 115,
"top": 42
},
"size": {
"width": 32,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 11
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 6,
"top": 84
},
"size": {
"width": 32,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 1
},
"size": {
"width": 31,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 106,
"top": 24
},
"size": {
"width": 33,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 21,
"vars_in": [
{
"rel": "inputValue",
"name": "currentLayer"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 38
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"x"
],
"wheelAction": [
"zoomY"
],
"wheelbaseline": [
0
],
"fullOut": [
"none"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[
"track"
]
],
"selectScatter": [
[]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display",
"flip"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 40,
"top": 25
},
"size": {
"width": 121,
"height": 37
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 22,
"vars_in": [
{
"rel": "chart",
"name": "filteredSpectra"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"//let data = API.getData('data')\n//console.log(data[0].metadata.map(x=>x._highlight))\nlet currentID = API.getData('currentID')\n\nif (currentID != null) { \nlet score = JSON.parse(JSON.stringify(API.getData('pcaResult')))\n\nconsole.log(currentID._highlight)\n\nlet index = score.data[0].info.filter( val => val.id == currentID._highlight )\nconsole.log(index)\n\n//score.data[0].styles.unselected[index].fill = \"transparent\"\nscore.data[0].styles.unselected[index].r = 6\nscore.data[0].styles.unselected[index].stroke = \"red\"\n\nlet currentChart = ({\"title\": \"score plot\",\n \"data\": [{\n \"type\": \"scatter\",\n \"info\":[],\n \"x\":[score.data[0].x[1]],\n \"y\":[score.data[0].y[1]],\n \"styles\": {\n \"unselected\": [\n {\"fill\": \"transparent\",\n \"shape\": \"circle\",\n \"cx\": 0,\n \"cy\": 0,\n \"r\": 8,\n \"height\": \"5px\",\n \"width\": \"5px\",\n \"stroke\": \"red\"}]\n }\n }]\n})\n\nAPI.createData('currentChart', currentChart)\nAPI.createData('modifiedScores', score)\nAPI.createData('currentID', null)\nconsole.log('executed')\n}\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 33
},
"size": {
"width": 54,
"height": 58
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 1,
"top": 48
},
"size": {
"width": 68,
"height": 44
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 23,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 18
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"// create empty help text\nlet selectedData = API.getData('selectedData');\nlet varNames = Object.keys(selectedData[0]);\n\nlet c = new Array();\nvarNames.forEach(e => c.push({ID: e, title: e, text: []}));\n//API.createData('helpText', c)\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 72
},
"size": {
"width": 54,
"height": 13
},
"zIndex": 0,
"display": true,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 77
},
"size": {
"width": 54,
"height": 13
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 24,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "create empty help text",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let action = this.action;\n\nlet help = API.getData('help').resurrect();\n\nlet selectedMetabolite = action.value.index.resurrect();\nlet index = help.map(x => x.ID);\n\nlet match = index.indexOf(selectedMetabolite);\nconsole.log(match)\n\nAPI.createData('helpText', help[match]);\n\nconsole.log(\"gethelp: executed\")\n"
]
}
],
"libs": [
[
{
"lib": "src/util/ui",
"alias": "UI"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": [
"disable"
]
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 54,
"height": 26
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 54,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "getHelp executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 25,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "getHelp"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/display/template-twig/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"selectable": [
[]
],
"template": [
"<font size=\"4\"><center><h2>{{helpText.title}}</h2></center>\n<br>\n\n{%for element in helpText.text %}\n<p align=\"justify\">{{element.p}}</p>\n{% endfor %}\n</font>"
],
"modifyInForm": [
[]
],
"debouncing": [
0
],
"formOptions": [
[
"keepFormValueIfDataUndefined"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 41
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 46
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 26,
"vars_in": [
{
"rel": "value",
"name": "helpText"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onRendered",
"rel": "renderedHtml",
"jpath": [],
"name": "html"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[
"expand"
]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"[{\"ID\":\"Creatine\",\"title\":\"Creatine\",\"text\":[]},{\"ID\":\"Glucose\",\"title\":\"Glucose\",\"text\":[]},{\"ID\":\"D_Galactose_alpha\",\"title\":\"D_Galactose_alpha\",\"text\":[]},{\"ID\":\"D_Lactose\",\"title\":\"D_Lactose\",\"text\":[]},{\"ID\":\"Alanine\",\"title\":\"Alanine\",\"text\":[]},{\"ID\":\"Lactate\",\"title\":\"Lactate\",\"text\":[]},{\"ID\":\"Acetate\",\"title\":\"Acetate\",\"text\":[]},{\"ID\":\"Succinate\",\"title\":\"Succinate\",\"text\":[]},{\"ID\":\"Citrate\",\"title\":\"Citrate\",\"text\":[]},{\"ID\":\"Dimethylamine\",\"title\":\"Dimethylamine\",\"text\":[]},{\"ID\":\"Trimethylamine\",\"title\":\"Trimethylamine\",\"text\":[]},{\"ID\":\"Betaine\",\"title\":\"Betaine\",\"text\":[]},{\"ID\":\"Glycine\",\"title\":\"Glycine\",\"text\":[]},{\"ID\":\"Fumaric_acid\",\"title\":\"Fumaric_acid\",\"text\":[]},{\"ID\":\"Formate\",\"title\":\"Formate\",\"text\":[]},{\"ID\":\"X1_Methylnicotinamide\",\"title\":\"X1_Methylnicotinamide\",\"text\":[]},{\"ID\":\"Dimethylglycine\",\"title\":\"Dimethylglycine\",\"text\":[]},{\"ID\":\"Myo_Inositol\",\"title\":\"Myo_Inositol\",\"text\":[]},{\"ID\":\"Taurine\",\"title\":\"Taurine\",\"text\":[]},{\"ID\":\"Hippurate\",\"title\":\"Hippurate\",\"text\":[{\"p\":\"Hippurate is the glycine conjugate of benzoic acid and is synthesised in both the liver and renal cortex. Other minor routes of synthesis of benzoic acid in humans include basic metabolism of protein catabolism or from metabolism of quinic acid via the shikimate pathway in the gastrointestine (Pero et al 2010 D.O.I. 10.2174/157488410790410588) It is typically associated with bacterial metabolism of dietary phenolics. The absence of hippurate in the urine of new-born infants is consistent with the involvement of the gut bacteria in its synthesis. Hippurate was first identified in horse (hippos) urine in 1829 by Liebig and is one of the highest concentration aromatic compounds in human urine. It is associated with lean muscle mass, low body weight and is inversely associated with blood pressure. Excretion of hippurate has been found to be higher in both rodent models and man and typically increases with age.\"},{\"p\":\"In a rat model of response to laproscopic surgery urinary concentrations of hippurate were significantly increased post surgery (Kinross et al 2011 PMID: 21105667).\"},{\"p\":\"Consumption of black and green teas, apple cider, sweet potato, cranberries and other berries result in increased urinary excretion of hippurate.\"},{\"p\":\"Review on hippurate metabolism PMID: 23342949; DOI: 10.1021/pr300900b\"}]},{\"ID\":\"Acetone\",\"title\":\"Acetone\",\"text\":[]},{\"ID\":\"X3_Hydroxybutyric_acid\",\"title\":\"X3_Hydroxybutyric_acid\",\"text\":[]},{\"ID\":\"Acetoacetic_acid\",\"title\":\"Acetoacetic_acid\",\"text\":[]},{\"ID\":\"Valine\",\"title\":\"Valine\",\"text\":[]},{\"ID\":\"Methionine\",\"title\":\"Methionine\",\"text\":[]},{\"ID\":\"Arginine\",\"title\":\"Arginine\",\"text\":[]},{\"ID\":\"X1_Methylhistidine\",\"title\":\"X1_Methylhistidine\",\"text\":[]},{\"ID\":\"Sarcosine\",\"title\":\"Sarcosine\",\"text\":[]},{\"ID\":\"Trigonelline\",\"title\":\"Trigonelline\",\"text\":[]},{\"ID\":\"Benzoic_acid\",\"title\":\"Benzoic_acid\",\"text\":[]},{\"ID\":\"X4_Aminobutyric_acid\",\"title\":\"X4_Aminobutyric_acid\",\"text\":[]},{\"ID\":\"Pyruvic_acid\",\"title\":\"Pyruvic_acid\",\"text\":[]},{\"ID\":\"Oxaloacetic_acid\",\"title\":\"Oxaloacetic_acid\",\"text\":[]},{\"ID\":\"D_Mannitol\",\"title\":\"D_Mannitol\",\"text\":[]},{\"ID\":\"D_Mannose_alpha\",\"title\":\"D_Mannose_alpha\",\"text\":[]},{\"ID\":\"Adenosine\",\"title\":\"Adenosine\",\"text\":[]},{\"ID\":\"Allantoin\",\"title\":\"Allantoin\",\"text\":[]},{\"ID\":\"Caffeine\",\"title\":\"Caffeine\",\"text\":[]},{\"ID\":\"Imidazole\",\"title\":\"Imidazole\",\"text\":[]},{\"ID\":\"Inosine\",\"title\":\"Inosine\",\"text\":[]},{\"ID\":\"Allopurinol\",\"title\":\"Allopurinol\",\"text\":[]},{\"ID\":\"Tartrate\",\"title\":\"Tartrate\",\"text\":[]},{\"ID\":\"Proline_betaine\",\"title\":\"Proline_betaine\",\"text\":[]},{\"ID\":\"D_Mandelic_acid\",\"title\":\"D_Mandelic_acid\",\"text\":[]},{\"ID\":\"X2_Furoylglycine\",\"title\":\"X2_Furoylglycine\",\"text\":[]},{\"ID\":\"X2_Oxoglutaric_acid\",\"title\":\"X2_Oxoglutaric_acid\",\"text\":[]},{\"ID\":\"X2_Methylsuccinic_acid\",\"title\":\"X2_Methylsuccinic_acid\",\"text\":[]},{\"ID\":\"Guanidinoacetate\",\"title\":\"Guanidinoacetate\",\"text\":[]},{\"ID\":\"X1_Methyladenosine\",\"title\":\"X1_Methyladenosine\",\"text\":[]},{\"ID\":\"Propylene_glycol\",\"title\":\"Propylene_glycol\",\"text\":[]},{\"ID\":\"Glycerol\",\"title\":\"Glycerol\",\"text\":[]},{\"ID\":\"Isopropanol\",\"title\":\"Isopropanol\",\"text\":[]},{\"ID\":\"Ethanol\",\"title\":\"Ethanol\",\"text\":[]},{\"ID\":\"Methanol\",\"title\":\"Methanol\",\"text\":[]},{\"ID\":\"Paracetamol\",\"title\":\"Paracetamol\",\"text\":[]},{\"ID\":\"Paracetamol_glucuronide\",\"title\":\"Paracetamol_glucuronide\",\"text\":[]},{\"ID\":\"L_Ascorbic_acid\",\"title\":\"L_Ascorbic_acid\",\"text\":[]},{\"ID\":\"X1_Methylguanidine\",\"title\":\"X1_Methylguanidine\",\"text\":[]},{\"ID\":\"Orotic_acid\",\"title\":\"Orotic_acid\",\"text\":[]},{\"ID\":\"Methylmalonic_acid\",\"title\":\"Methylmalonic_acid\",\"text\":[]},{\"ID\":\"X2_Hydroxyisovalerate\",\"title\":\"X2_Hydroxyisovalerate\",\"text\":[]},{\"ID\":\"X3_Hydroxyisovalerate\",\"title\":\"X3_Hydroxyisovalerate\",\"text\":[]},{\"ID\":\"Ethylmalonic_acid\",\"title\":\"Ethylmalonic_acid\",\"text\":[]},{\"ID\":\"N_Acetylaspartic_acid\",\"title\":\"N_Acetylaspartic_acid\",\"text\":[]},{\"ID\":\"Glutaric_acid\",\"title\":\"Glutaric_acid\",\"text\":[]},{\"ID\":\"Uridine\",\"title\":\"Uridine\",\"text\":[]},{\"ID\":\"Propionic_acid\",\"title\":\"Propionic_acid\",\"text\":[]},{\"ID\":\"Isoleucine\",\"title\":\"Isoleucine\",\"text\":[]},{\"ID\":\"DL_Alloisoleucine\",\"title\":\"DL_Alloisoleucine\",\"text\":[]},{\"ID\":\"Leucine\",\"title\":\"Leucine\",\"text\":[]},{\"ID\":\"Citrulline\",\"title\":\"Citrulline\",\"text\":[]},{\"ID\":\"X3_Hydroxypropionic_acid\",\"title\":\"X3_Hydroxypropionic_acid\",\"text\":[]},{\"ID\":\"Phenylalanine\",\"title\":\"Phenylalanine\",\"text\":[]},{\"ID\":\"Phenylpyruvic_acid\",\"title\":\"Phenylpyruvic_acid\",\"text\":[]},{\"ID\":\"N_Acetylphenylalanine\",\"title\":\"N_Acetylphenylalanine\",\"text\":[]},{\"ID\":\"Neopterin\",\"title\":\"Neopterin\",\"text\":[]},{\"ID\":\"Phenylacetic_acid\",\"title\":\"Phenylacetic_acid\",\"text\":[]},{\"ID\":\"X2_Hydroxyphenylacetic_acid\",\"title\":\"X2_Hydroxyphenylacetic_acid\",\"text\":[]},{\"ID\":\"X3_Phenyllactic_acid\",\"title\":\"X3_Phenyllactic_acid\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenyllactic_acid\",\"title\":\"X4_Hydroxyphenyllactic_acid\",\"text\":[]},{\"ID\":\"X2_Oxoisocaproic_acid\",\"title\":\"X2_Oxoisocaproic_acid\",\"text\":[]},{\"ID\":\"X2_Oxoisovaleric_acid\",\"title\":\"X2_Oxoisovaleric_acid\",\"text\":[]},{\"ID\":\"X3_Methyl_2_oxovaleric_acid\",\"title\":\"X3_Methyl_2_oxovaleric_acid\",\"text\":[]},{\"ID\":\"X3_Methylcrotonylglycine\",\"title\":\"X3_Methylcrotonylglycine\",\"text\":[]},{\"ID\":\"Uracil\",\"title\":\"Uracil\",\"text\":[]},{\"ID\":\"X2_Hydroxy_4_methylvaleric_acid\",\"title\":\"X2_Hydroxy_4_methylvaleric_acid\",\"text\":[]},{\"ID\":\"D_Galactonic_acid\",\"title\":\"D_Galactonic_acid\",\"text\":[]},{\"ID\":\"Galactitol\",\"title\":\"Galactitol\",\"text\":[]},{\"ID\":\"N_Isovaleroylglycine\",\"title\":\"N_Isovaleroylglycine\",\"text\":[]},{\"ID\":\"X5_Aminolevulinic_acid\",\"title\":\"X5_Aminolevulinic_acid\",\"text\":[]},{\"ID\":\"Propionylglycine\",\"title\":\"Propionylglycine\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenylacetate\",\"title\":\"X4_Hydroxyphenylacetate\",\"text\":[]},{\"ID\":\"X3_Hydroxyvaleric_acid\",\"title\":\"X3_Hydroxyvaleric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxyglutaric_acid\",\"title\":\"X3_Hydroxyglutaric_acid\",\"text\":[]},{\"ID\":\"E_Glutaconic_acid\",\"title\":\"E_Glutaconic_acid\",\"text\":[]},{\"ID\":\"L_Pyroglutamic_acid\",\"title\":\"L_Pyroglutamic_acid\",\"text\":[]},{\"ID\":\"Tiglylglycine\",\"title\":\"Tiglylglycine\",\"text\":[]},{\"ID\":\"Cystine\",\"title\":\"Cystine\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenylpyruvic_acid\",\"title\":\"X4_Hydroxyphenylpyruvic_acid\",\"text\":[]},{\"ID\":\"Glutamic_acid\",\"title\":\"Glutamic_acid\",\"text\":[]},{\"ID\":\"Glutamine\",\"title\":\"Glutamine\",\"text\":[]},{\"ID\":\"Glycolate\",\"title\":\"Glycolate\",\"text\":[]},{\"ID\":\"Cytosine\",\"title\":\"Cytosine\",\"text\":[]},{\"ID\":\"Adenine\",\"title\":\"Adenine\",\"text\":[]},{\"ID\":\"D_Gluconic_acid\",\"title\":\"D_Gluconic_acid\",\"text\":[]},{\"ID\":\"N_Acetyltyrosine\",\"title\":\"N_Acetyltyrosine\",\"text\":[]},{\"ID\":\"X3_Aminoisobutyrate\",\"title\":\"X3_Aminoisobutyrate\",\"text\":[]},{\"ID\":\"Choline\",\"title\":\"Choline\",\"text\":[]},{\"ID\":\"Tyrosine\",\"title\":\"Tyrosine\",\"text\":[]},{\"ID\":\"Butyric_acid\",\"title\":\"Butyric_acid\",\"text\":[]},{\"ID\":\"Succinylacetone\",\"title\":\"Succinylacetone\",\"text\":[]},{\"ID\":\"Oxypurinol\",\"title\":\"Oxypurinol\",\"text\":[]},{\"ID\":\"Pantothenic_acid\",\"title\":\"Pantothenic_acid\",\"text\":[]},{\"ID\":\"Tyramine\",\"title\":\"Tyramine\",\"text\":[]},{\"ID\":\"L_Tryptophan\",\"title\":\"L_Tryptophan\",\"text\":[]},{\"ID\":\"Dihydrothymine\",\"title\":\"Dihydrothymine\",\"text\":[]},{\"ID\":\"Dihydrouracil\",\"title\":\"Dihydrouracil\",\"text\":[]},{\"ID\":\"Thymine\",\"title\":\"Thymine\",\"text\":[]},{\"ID\":\"Xanthurenic_acid\",\"title\":\"Xanthurenic_acid\",\"text\":[]},{\"ID\":\"Argininosuccinic_acid\",\"title\":\"Argininosuccinic_acid\",\"text\":[]},{\"ID\":\"Acetoine\",\"title\":\"Acetoine\",\"text\":[]},{\"ID\":\"Maleic_acid\",\"title\":\"Maleic_acid\",\"text\":[]},{\"ID\":\"Malic_acid\",\"title\":\"Malic_acid\",\"text\":[]},{\"ID\":\"N_Acetylglutamate\",\"title\":\"N_Acetylglutamate\",\"text\":[]},{\"ID\":\"L_Homocystine\",\"title\":\"L_Homocystine\",\"text\":[]},{\"ID\":\"Isobutyrylglycine\",\"title\":\"Isobutyrylglycine\",\"text\":[]},{\"ID\":\"D_Panthenol\",\"title\":\"D_Panthenol\",\"text\":[]},{\"ID\":\"X4_Aminohippuric_acid\",\"title\":\"X4_Aminohippuric_acid\",\"text\":[]},{\"ID\":\"X3_Methylglutaconic_acid\",\"title\":\"X3_Methylglutaconic_acid\",\"text\":[]},{\"ID\":\"X1_Methylhydantoin\",\"title\":\"X1_Methylhydantoin\",\"text\":[]},{\"ID\":\"Citraconic_acid\",\"title\":\"Citraconic_acid\",\"text\":[]},{\"ID\":\"Quinolinic_acid\",\"title\":\"Quinolinic_acid\",\"text\":[]},{\"ID\":\"DL_Kynurenin\",\"title\":\"DL_Kynurenin\",\"text\":[]},{\"ID\":\"X2_Ketobutyric_acid\",\"title\":\"X2_Ketobutyric_acid\",\"text\":[]},{\"ID\":\"Pimelic_acid\",\"title\":\"Pimelic_acid\",\"text\":[]},{\"ID\":\"Syringic_acid\",\"title\":\"Syringic_acid\",\"text\":[]},{\"ID\":\"X4_Hydroxyhippuric_acid\",\"title\":\"X4_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X4_Pyridoxic_acid\",\"title\":\"X4_Pyridoxic_acid\",\"text\":[]},{\"ID\":\"L_Threonic_acid\",\"title\":\"L_Threonic_acid\",\"text\":[]},{\"ID\":\"L_Citramalic_acid\",\"title\":\"L_Citramalic_acid\",\"text\":[]},{\"ID\":\"X5_Aminopentanoic_acid\",\"title\":\"X5_Aminopentanoic_acid\",\"text\":[]},{\"ID\":\"X4_Ethylphenol\",\"title\":\"X4_Ethylphenol\",\"text\":[]},{\"ID\":\"X1_3_Dimethyluric_acid\",\"title\":\"X1_3_Dimethyluric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxy_3_methylglutaric_acid\",\"title\":\"X3_Hydroxy_3_methylglutaric_acid\",\"text\":[]},{\"ID\":\"Thymol\",\"title\":\"Thymol\",\"text\":[]},{\"ID\":\"Theobromine\",\"title\":\"Theobromine\",\"text\":[]},{\"ID\":\"L_Fucose_alpha\",\"title\":\"L_Fucose_alpha\",\"text\":[]},{\"ID\":\"Pyrocatechol\",\"title\":\"Pyrocatechol\",\"text\":[]},{\"ID\":\"L_Carnosine\",\"title\":\"L_Carnosine\",\"text\":[]},{\"ID\":\"Phenylacetylglutamine\",\"title\":\"Phenylacetylglutamine\",\"text\":[]},{\"ID\":\"X4_Cresylsulfate\",\"title\":\"X4_Cresylsulfate\",\"text\":[]},{\"ID\":\"Lysine\",\"title\":\"Lysine\",\"text\":[]},{\"ID\":\"NAc_S_propenyl_Cys_SO\",\"title\":\"NAc_S_propenyl_Cys_SO\",\"text\":[]},{\"ID\":\"O_Acetylcarnitine\",\"title\":\"O_Acetylcarnitine\",\"text\":[]},{\"ID\":\"N_Acetyl_S_Methyl_cysteine_sulfoxide\",\"title\":\"N_Acetyl_S_Methyl_cysteine_sulfoxide\",\"text\":[]},{\"ID\":\"Trimethylamine_N_oxide\",\"title\":\"Trimethylamine_N_oxide\",\"text\":[]},{\"ID\":\"Rhamnitol\",\"title\":\"Rhamnitol\",\"text\":[]},{\"ID\":\"Carnitine\",\"title\":\"Carnitine\",\"text\":[]},{\"ID\":\"N_Methyl_2_pyridone_5_carboxamide\",\"title\":\"N_Methyl_2_pyridone_5_carboxamide\",\"text\":[]},{\"ID\":\"N_Acetylneuraminate\",\"title\":\"N_Acetylneuraminate\",\"text\":[]},{\"ID\":\"X2_Hydroxyhippuric_acid\",\"title\":\"X2_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxyhippuric_acid\",\"title\":\"X3_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X3_Methylhistidine\",\"title\":\"X3_Methylhistidine\",\"text\":[]},{\"ID\":\"trans_Aconitate\",\"title\":\"trans_Aconitate\",\"text\":[]},{\"ID\":\"Methylamine\",\"title\":\"Methylamine\",\"text\":[]},{\"ID\":\"Histidine\",\"title\":\"Histidine\",\"text\":[]},{\"ID\":\"Paracetamol_sulfate\",\"title\":\"Paracetamol_sulfate\",\"text\":[]},{\"ID\":\"Carboxyibuprofen\",\"title\":\"Carboxyibuprofen\",\"text\":[]},{\"ID\":\"Ibuprofen\",\"title\":\"Ibuprofen\",\"text\":[]},{\"ID\":\"_highlight\",\"title\":\"_highlight\",\"text\":[]},{\"ID\":\"_row\",\"title\":\"_row\",\"text\":[]}]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 42
},
"size": {
"width": 43,
"height": 29
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 42
},
"size": {
"width": 54,
"height": 19
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 27,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onObjectChange",
"rel": "output",
"jpath": [],
"name": "help"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[]
],
"script": [
"let html = API.getData('html');\nlet helpText = API.getData('helpText');\n\nif(helpText == null) {\n html = `\n <h2>TEAMMATE - A simple urinary metabolite reference database and toolbox\n for analysing urine composition based on 1H NMR spectral \n profiles</h2><br>\n Authors: Torben Kimhofer<sup>1</sup>, Alejandro Bolaños<sup>2</sup>,\n Luc Patiny<sup>3</sup>, Julien Wist<sup>2</sup>, Elaine Holmes<sup>1</sup>\n <br><br><sup>1</sup>Division of Computational and Systems Medicine, Imperial College, London, UK.\n <br><sup>2</sup>Chemistry Department, Universidad del Valle, Cali, Valle, Colombia.\n <br><sup>3</sup>Institute of Chemical Sciences and Engineering, Ecole Polytechnique Fédérale de Lausanne (EPFL), Lausanne, CH-1015, Switzerland.\n `\n}\n\nUI.dialog(String(html), {'width': '600px'});\nconsole.log(\"display html help: executed\")"
]
}
],
"libs": [
[
{
"lib": "src/util/ui",
"alias": "UI"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": [
"disable"
]
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 27
},
"size": {
"width": 54,
"height": 44
},
"zIndex": 0,
"display": true,
"title": "display html help",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 62
},
"size": {
"width": 54,
"height": 14
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 28,
"vars_in": [
{
"rel": "inputValue",
"name": "html"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "display html help",
"zindex": 0
},
{
"url": "modules/types/client_interaction/dragdrop/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"label": [
"Drop your file here"
],
"dragoverlabel": [
null
],
"hoverlabel": [
"Drag'n drop or paste here"
],
"fileSelectLabel": [
"Select file"
],
"labelFontSize": [
26
],
"checkOptions": [
[
"promptAmbiguous"
]
],
"inputOptions": [
[
"allowDrop",
"allowPaste",
"allowFileInput"
]
]
}
],
"vars": [
[
{
"filter": "ext",
"extension": "zip",
"filetype": "buffer",
"type": "",
"variable": "file"
},
{
"filter": "ext",
"extension": "xlsx",
"filetype": "buffer",
"type": "",
"variable": "xlsxFile"
},
{
"filter": "ext",
"extension": "csv",
"filetype": "text",
"type": "",
"variable": "csvFile"
}
]
],
"string_general": [
{
"askFilename": [
[]
]
}
],
"string": [
[
{
"filter": "ext",
"extension": "*",
"type": "",
"variable": "str"
}
]
],
"photo": [
[
{
"variable": "photo"
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 92,
"top": 36
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 123,
"top": 23
},
"size": {
"width": 24,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 58,
"top": 18
},
"size": {
"width": 24,
"height": 23
},
"zIndex": 0,
"display": true,
"title": "Upload your data",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 29,
"vars_out": [
{
"event": "onRead",
"rel": "data",
"jpath": [],
"name": "droppedData"
}
],
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Upload your data",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nlet actionName, actionValue;\nlet data = [];\nlet customMethod;\n\nswitch(this.variable) {\n case 'droppedData':\n actionName = 'droppedData';\n actionValue = API.getData(actionName).resurrect();\n break\n default:\n actionName = this.action.name;\n actionValue = this.action.value;\n}\n\nswitch(actionName) {\n case 'droppedData':\n \n //var zipFile = actionValue;\n //var jsZip = new JSZip();\n //let zip = await jsZip.loadAsync(actionValue.content);\n //let res = await zip.files['rangesExplorer.data.json'].async('string');\n \n //API.createData('res', JSON.parse(res));\n //console.log('zip executed');\n \n switch (String(Object.keys(actionValue))) {\n case 'parseXlsx':\n var metadata = [];\n xlsxParser.fromDataAsync(actionValue.content).then((result) => {\n var sheets = result.sheets();\n var template = {}, temp = {};\n for (let sheet of sheets) {\n let name = sheet.name().toLowerCase().replace(/\\s/g, '');\n template[name] = {};\n temp[name] = sheet;\n let currentSheet = template[name];\n let minCol = sheet.row(1).minUsedColumnNumber();\n let maxCol = sheet.row(1).maxUsedColumnNumber() + 1;\n let headers = sheet.row(1)._cells.map((cell) => cell._value.replace(/\\s/g, ''));\n for (let i = minCol; i < maxCol; i++) {\n currentSheet[headers[i]] = null;\n }\n }\n temp.main.forEachExistingRow((_, i) => {\n metadata[i] = JSON.parse(JSON.stringify(template));\n for (let key in template) {\n let sheet = temp[key];\n let currentMetadata = metadata[i];\n let currentSheet = currentMetadata[key];\n let column = 1;\n if (sheet.row(i)._cells.length === 0) return;\n for (let header in currentSheet) {\n currentSheet[header] = sheet.row(i)._cells[column++]._value;\n }\n }\n })\n metadata = metadata.slice(2);\n var metadataList = {};\n metadata.forEach((m, i, array) => {\n let highlight = Math.random();\n let key = m.main.SampleID.replace(/\\./g, '_').toLowerCase();\n m._highlight = highlight;\n metadataList[key] = {\n index: i,\n _highlight: highlight\n }\n return;\n });\n \n API.createData('metadataList', metadataList);\n API.createData('metadata', metadata);\n });\n break;\n \n case 'csvFile':\n customMethod = Papa.parse(actionValue.csvFile.content, {\n header: true,\n delimiter: \",\"\n });\n \n //API.createData('customMethod', data);\n extractCSV(customMethod);\n break;\n }\n \n case 'download':\n var string = \",Creatinine,Creatine,Glucose,Alanine,Lactate,Acetate,Succinate,Citrate,Dimethylamine,Trimethylamine\\nAirwave_1_10_1Custom,10.77096162,0.149213248,0.219200053,,,0.114529688,0.107564026,2.809720562,0.290457802,0.001393114\\nAirwave_1_100_1Custom,2.316093057,0.01303475,0.054474036,,,0.031174903,0.039852373,1.039391475,0.073301503,0.001408082\\nAirwave_6_30_1Custom,13.30611001,0.191876443,0.231654052,,,0.060562254,0.052609127,1.318416998,0.441306889,0.008132261\\nAirwave_38_90_1Custom,11.85137551,0.13781424,0.208870282,,,0.05917576,0.033497749,3.370650175,0.257927047,0.001422446\";\n var toDownload = new Blob([string], {type: 'text/plain'});\n fileSaver(toDownload, 'ExampleFile.csv');\n break;\n \n case 'downloadTemplate':\n var string = \",Creatinine,Creatine,Glucose,Alanine,Lactate,Acetate,Succinate,Citrate,Dimethylamine,Trimethylamine,Betaine,Glycine,Formate,Methylnicotinamide,Dimethylglycine,Taurine,Hippurate,Hydroxybutyric_acid,Valine,Methylhistidine,Sarcosine,Trigonelline,Tartrate,Guanidinoacetate,Ethanol,Paracetamol,Paracetamol_glucuronide,X1_Hydroxyisovalerate,X3_Hydroxyisovalerate,Isoleucine,Leucine,X4_Hydroxyphenylacetate,Glutamine,Glycolate,X3_Aminoisobutyrate,Tyrosine,Pantothenic_acid,X4_Hydroxyhippuric_acid\\nAirwave_1_10_1,10.77096162,0.149213248,0.219200053,0.46928622,0.151093488,0.114529688,0.107564026,2.809720562,0.290457802,0.001393114,0.157630721,0.85743617,0.117838248,0.08022949,0.050912889,1.631998796,0.801086358,0,0.054591478,0,0,0.12843978,0.056903813,0.561631098,0,0,0,0.001524958,0.08380798,0.012319695,0.054196726,0.079207377,0,0.62164627,0.166112223,0,0.096905673,0\";\n var toDownload = new Blob([string], {type: 'text/plain'});\n fileSaver(toDownload, 'TemplateFile.csv');\n break;\n \n}\n\nconsole.log('parse csv executed with action: ' + actionName);\n\n\nfunction extractCSV(customMethod) {\n //var customMethod = API.getData('customMethod').resurrect();\n var customDescriptors = getDescriptors(customMethod);\n console.log(customDescriptors)\n var customData = cleanData(customMethod);\n console.log(customData)\n var customName = customData.map(d => d.sampleid);\n console.log(customName)\n let custom = ({customName: customName, customData: customData});\n API.createData('customData', custom);\n \n let data = API.getData('selectedData');\n let metadata = API.getData('selectedMetadata');\n \n //let customData = API.getData('customData').customData;\n //let customName = API.getData('customData').customName;\n \n customData.map((x, i) => data.push(completeCustomData(data, x, customName[i])));\n API.createData('selectedData', data);\n console.log(data.length);\n \n customData.map((x, i) => metadata.push(completeCustomMetadata(metadata, customName[i])));\n API.createData('selectedMetadata', metadata);\n console.log(metadata.length);\n \n API.switchToLayer(\"Default layer\");\n\n}\n\nfunction getDescriptors(input) {\n let result = [];\n for (let i of input.meta.fields) {\n if (i === '') continue;\n let name = i.replace(/\\./g, '_').toLowerCase();\n result.push({\n name,\n jpath: 'element.' + name,\n });\n }\n return result;\n}\n\nfunction cleanData(input, factor = 1) {\n var data = JSON.parse(JSON.stringify(input.data));\n if (input.errors.length > 0) {\n let errors = input.errors.filter((a) => a.row !== undefined);\n errors.sort((a, b) => a.row + b.row).forEach((e) => {\n data.splice(e.row, 1);\n });\n }\n \n return data.map((e, index) => {\n let result = {}\n let keys = Object.keys(e);\n for (let i = 1; i < keys.length; i++) {\n let name = keys[i].replace(/\\./g, '_').toLowerCase();\n result[name] = Number(e[keys[i]]) * factor;\n };\n result['sampleid'] = e[''].replace(/\\./g, '_').toLowerCase();;\n return result;\n })\n}\n\nfunction clone(input) {\n return JSON.parse(JSON.stringify(input));\n}\n\nfunction completeCustomData(data, custom, customName) {\n let result = {};\n let labels = Object.keys(data[0]);\n let customKeys = Object.keys(custom).map(x => x.toLowerCase());\n let labelsLC = labels.map(x => x.toLowerCase());\n labelsLC.map((x, i) => (customKeys.indexOf(x) != -1) ? result[labels[i]] = custom[x] : result[labels[i]] = 0);\n result[\"_highlight\"] = data.length + 1;\n result[\"_row\"] = customName;\n return result;\n}\n\nfunction completeCustomMetadata(metadata, customName) {\n let result = {};\n let labels = Object.keys(metadata[0]);\n labels.map((x, i) => result[labels[i]] = null);\n result[\"SampleID\"] = customName;\n result[\"_highlight\"] = metadata.length + 1;\n result[\"_row\"] = customName;\n return result;\n}\n\nfunction clone(input) {\n return JSON.parse(JSON.stringify(input));\n}\n\n"
]
}
],
"libs": [
[
{
"lib": "jszip",
"alias": "JSZip"
},
{
"lib": "xlsxParser",
"alias": "xlsxParser"
},
{
"lib": "Papa-parser",
"alias": "Papa"
},
{
"lib": "file-saver",
"alias": "fileSaver"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 130
},
"size": {
"width": 60,
"height": 16
},
"zIndex": 0,
"display": true,
"title": "Download / upload executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 47
},
"size": {
"width": 68,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 79,
"top": 26
},
"size": {
"width": 68,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Download / upload executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 30,
"vars_in": [
{
"rel": "inputValue",
"name": "droppedData"
}
],
"actions_in": [
{
"rel": "execute",
"name": "download"
},
{
"rel": "execute",
"name": "extractCSV"
},
{
"rel": "execute",
"name": "downloadTemplate"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download / upload executor",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Download example file"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"download"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 5
},
"size": {
"width": 20,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 15,
"top": 18
},
"size": {
"width": 20,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Download example file",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 31,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "download"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download example file",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 109,
"top": 47
},
"size": {
"width": 25,
"height": 37
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 32,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;3</span></p>\n\n<p><span style=\"font-size:12px\">It may take a while to read and extract your data. If successful you will be redirected to the main panel of this application that is &quot;Browser&quot;.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">You can use the following button to navigate into the application.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Browser allows to browse the data and is the default or landing layer.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Spectra allows you to select samples and see the original spectra.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Upload allows you to upload your custom data.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 9,
"top": 48
},
"size": {
"width": 26,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 33,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;1</span></p>\n\n<p><span style=\"font-size:12px\">First, download the example file (CSV format). Open it with MS Excel or LibreOffice and add the values corresponding to the metabolites. Add as many rows as necessary but, please, do not alter the column names. Columns can be deleted if unnecessary, except the first one that should contain a unique identifier for each sample.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 57,
"top": 48
},
"size": {
"width": 26,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 34,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;2</span></p>\n\n<p><span style=\"font-size:12px\">Once done, save the file in CSV format and drop it into the area for that purpose. You can also click in the area to display the file selector tool of your OS.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Download template file"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"downloadTemplate"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 5
},
"size": {
"width": 20,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 15,
"top": 27
},
"size": {
"width": 20,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Download example file",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 35,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "downloadTemplate"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download example file",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let a = API.getData('data');\nfunction test(){\n let errorMessage = \"3dd\";\n console.log(errorMessage);\n API.createData('errorMessage', errorMessage);\n}\nsetTimeout(test, 100);"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 65,
"top": 101
},
"size": {
"width": 54,
"height": 26
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Upload"
}
},
"id": 36,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Reset Selection"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"reset"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 131,
"top": 49
},
"size": {
"width": 12,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 30,
"top": 86
},
"size": {
"width": 16,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Upload"
}
},
"id": 37,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "resetSelectionButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 35
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"xy"
],
"wheelAction": [
"none"
],
"wheelbaseline": [
0
],
"fullOut": [
"both"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[]
],
"selectScatter": [
[
"yes"
]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
"Loading X"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
"Loading Y"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "pcaResult",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
255,
1,
12,
1
],
"strokewidth": "2",
"strokestyle": "2",
"plotcontinuous": "discrete",
"peakpicking": [],
"markers": [
"markers"
],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 83,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 116,
"top": 38
},
"size": {
"width": 29,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 41
},
"size": {
"width": 39,
"height": 40
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 38,
"vars_in": [
{
"rel": "chart",
"name": "pcaResultLoadings"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onSelectScatter",
"rel": "selectedData",
"jpath": [],
"name": "selectedMarkers"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Loadings",
"zindex": 0
}
],
"variables": [
{
"varname": "data",
"jpath": [
"data"
]
},
{
"varname": "spec",
"jpath": [
"spec"
]
}
],
"aliases": [
{
"path": "https://www.lactame.com/lib/spectra-data/3.2.4/spectra-data.min",
"alias": "SD"
},
{
"path": "https://www.lactame.com/lib/nmr-predictor/1.0.8/nmr-predictor.min",
"alias": "Predictor"
},
{
"path": "https://www.lactame.com/lib/openchemlib/4.6.2/openchemlib-full",
"alias": "OCL"
},
{
"path": "https://www.lactame.com/lib/ml/HEAD/ml",
"alias": "ML"
},
{
"path": "https://www.lactame.com/github/cheminfo-js/visualizer-helper/3ffac8f5646dd4231c1cb33cebae970e5ee0d503/",
"alias": "vh"
},
{
"path": "https://www.lactame.com/lib/image-js/0.9.5/image.min",
"alias": "IJS"
},
{
"path": "components/papa-parse/papaparse.min",
"alias": "Papa-parser"
},
{
"path": "https://dl.dropboxusercontent.com/s/ky06573iww07wnd/jerzy.js?dl=0",
"alias": "jerzy"
},
{
"path": "https://dl.dropboxusercontent.com/s/7npg0288cesrmhu/timsort.js?dl=0",
"alias": "timsort"
},
{
"path": "https://dl.dropboxusercontent.com/s/100bq1kwk27yvyj/xlsx-populate.js?dl=0",
"alias": "xlsxParser"
}
],
"configuration": {
"title": "ranges explorer 0.5.0"
},
"actionscripts": [
{
"sections": {},
"groups": {
"action": [
{
"name": [
null
],
"script": [
null
]
}
]
}
}
],
"init_script": [
{
"sections": {},
"groups": {
"general": [
{
"script": [
"\nAPI.loading('load','Please wait while data are being downloaded');\n\n// you need to leave some time to display the message\n// we use setImmediate to achieve this\n\nsetImmediate(loadData);\n\n$.getJSON('https://gist.githubusercontent.com/jwist/a79ba94fe60dc01b91868d9c7becbd5e/raw/rangesExplorer.data.json',function(result) {\n API.createData('data',result.data);\n API.createData('spec',result.spec);\n setTimeout(selectDataSets, 1000);\n setTimeout(selectData, 10000);\n API.stopLoading('load');\n})\n\nasync function loadData() {\n API.createData('pcaPlot', {'pcx': 1, 'pcy': 2, 'numberOfEigenVectors': 3})\n\n}\n\nfunction selectDataSets() {\n let data = API.getData('data');\n API.createData('selectedMetadata', data[0].metadata);\n API.createData('selectedDataSets', data[0].data);\n}\n\nfunction selectData() {\n let data = API.getData('selectedDataSets');\n API.createData('selectedData', data[0].data);\n}\n\n\n\n\n"
]
}
]
}
}
],
"custom_filters": [
{
"sections": {
"modules": [
{
"sections": {},
"groups": {
"modules": [
[
{}
]
]
}
}
],
"filtersLib": [
{
"sections": {},
"groups": {
"filters": [
[
{}
]
]
}
}
],
"filters": [
{
"sections": {},
"groups": {
"filter": [
{
"name": [
null
],
"script": [
null
]
}
],
"libs": [
[
{}
]
]
}
}
]
},
"groups": {}
}
],
"actionfiles": [
{
"sections": {},
"groups": {
"action": [
[
{}
]
]
}
}
]
}
{
"version": "2.98.0",
"grid": {
"layers": {
"Default layer": {
"name": "Default layer"
},
"admin": {
"name": "admin"
},
"spectra": {
"name": "spectra"
},
"help": {
"name": "help"
},
"Upload": {
"name": "Upload"
}
},
"xWidth": 10,
"yHeight": 10
},
"modules": [
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 155,
"top": 50
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 75,
"top": 42
},
"size": {
"width": 35,
"height": 38
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 1,
"vars_in": [
{
"rel": "value",
"name": "pcaResultLoadings"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"label"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 13,
"height": 15
},
"zIndex": 0,
"display": true,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 2
},
"size": {
"width": 35,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 23
},
"size": {
"width": 17,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Dartaset Selector (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 2,
"vars_in": [
{
"rel": "list",
"name": "data"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onSelect",
"rel": "row",
"jpath": [
"data"
],
"name": "selectedDataSets"
},
{
"event": "onSelect",
"rel": "row",
"jpath": [
"metadata"
],
"name": "selectedMetadata"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Dartaset Selector (click on row)",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"label"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 38,
"top": 23
},
"size": {
"width": 14,
"height": 15
},
"zIndex": 0,
"display": true,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 18
},
"size": {
"width": 35,
"height": 17
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 42,
"top": 23
},
"size": {
"width": 14,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Select analysis (click on row)",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 3,
"vars_in": [
{
"rel": "list",
"name": "selectedDataSets"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onSelect",
"rel": "row",
"jpath": [
"data"
],
"name": "selectedData"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Select analysis (click on row)",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nAPI.loading('computeStatistics','Please wait while we compute basic statistics for the chosen data');\n\n// you need to leave some time to display the message\n// we use setImmediate to achieve this\n\nsetImmediate(getStats);\n\n\nfunction getStats() {\nlet selectedData = API.getData('selectedData')\nlet varNames = Object.keys(selectedData[0])\n\n\nlet x = new Array\nlet s = new Array\nObject.keys(selectedData[0]).forEach(e => {\n x.push([[e], selectedData.map(col => col[e])])\n s.push({\"index\": e,\n \"indicator\": {\n \"type\": \"sparkline\",\n \"value\": selectedData.map(col => col[e]),\n \"_options\": {\n \"type\": \"box\",\n \"raw\": false,\n \"minValue\": -50,\n \"maxValue\": 20,\n \"boxLineColor\": \"black\",\n \"boxFillColor\": \"lightgrey\",\n \"whiskerColor\": \"black\",\n \"medianColor\": \"red\",\n \"lineColor\": \"black\",\n \"target\": [],\n \"targetColor\": \"green\"\n }\n }})\n})\n\n\nconsole.log('calculate indicators executed')\n\nAPI.createData('selectedDataMatrix', s)\nAPI.createData('x', x)\nAPI.createData('varNames', varNames)\n\n API.stopLoading('computeStatistics');\n}\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 60,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 1,
"top": 76
},
"size": {
"width": 60,
"height": 30
},
"zIndex": 0,
"display": false,
"title": "calculate indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 4,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedData"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "calculate indicators",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns",
"editable",
"keepSelected"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
"30"
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "label",
"jpath": [
"index"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"width": 86,
"hideColumn": []
},
{
"name": "indicator",
"jpath": [
"indicator"
],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"width": 129,
"hideColumn": []
}
]
],
"actionCols": [
[
{
"name": "help",
"icon": "fa-question",
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"action": "getHelp",
"position": "end",
"clickMode": "text",
"isAction": true
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 1,
"top": 36
},
"size": {
"width": 35,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metabolites indicators",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 23,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "Metabolites selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 5,
"vars_in": [
{
"rel": "list",
"name": "selectedDataMatrix"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onRowsSelect",
"rel": "rows",
"jpath": [],
"name": "selectedIndicators"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Export Data"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Metabolites selector",
"zindex": 0
},
{
"url": "modules/types/chart/statistics/parallel_coordinates/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"colJPath": [
"element"
],
"options": [
[
"hide",
"brush",
"shadow"
]
],
"brushMode": [
"1D-axes-multi"
],
"predicate": [
"and"
]
}
],
"cols": [
[
{}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": true,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 37,
"top": 2
},
"size": {
"width": 86,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to select sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 40,
"top": 0
},
"size": {
"width": 121,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 121,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Click and drag on the variable axis to filter sample within a range",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 6,
"vars_in": [
{
"rel": "value",
"name": "selectedData"
},
{
"rel": "columns",
"name": "parallelVariablesLabels"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onBrushSelection",
"rel": "flagResult",
"jpath": [],
"name": "selectedParallel"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
185,
27,
27,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen",
"Export Data",
"Print"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Click and drag on the variable axis to filter sample within a range",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let selectedIndicators = API.getData('selectedIndicators')\n\nlet parallelVariablesLabels = []\nselectedIndicators.map(x => {\n parallelVariablesLabels.push({\"name\" : x.index, \"jpath\" : \"element.\" + x.index})\n})\n\nAPI.createData('parallelVariablesLabels', parallelVariablesLabels)\n\nconsole.log('create parallel executed')\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 25
},
"size": {
"width": 60,
"height": 21
},
"zIndex": 0,
"display": true,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 62,
"top": 76
},
"size": {
"width": 68,
"height": 25
},
"zIndex": 0,
"display": false,
"title": "create parallel variables",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 7,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedIndicators"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "create parallel variables",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"//let selectedSample = API.getData('selectedParallel');\n//let selectedMarkers = API.getData('selectedMarkers').resurrect();\nlet metadata = API.getData('selectedMetadata');\nlet s = new Array();\n\n//let s = selectedSample.reduce(\n// (out, bool, index) => bool ? out.concat(metadata[index]) : out, \n//[]\n//)\n\nswitch(this.variable) {\n case 'selectedParallel':\n //selectedParallel is a boolean filter\n let selectedSample = API.getData('selectedParallel');\n s = selectedSample.reduce(\n (out, bool, index) => bool ? out.concat(metadata[index]) : out, \n []\n )\n break;\n case 'selectedMarkers':\n //selectedMarkers is a list an array with index\n let selectedMarkers = API.getData('selectedMarkers').resurrect();\n console.log(selectedMarkers);\n s = metadata.filter((v,i,a) => selectedMarkers.includes(i + 1));\n break;\n}\n\n\nAPI.createData('selectedSamples', s)\n\nconsole.log('sample selector executed')\n\n\n//let s2 = []\n//selectedSample.forEach( (e, i) => {\n// if (e) {s2.push(metadata[i])}\n//})\n\n//let selectedMetadata = metadata[s]\n//let m = metadata.filter( (x, i) => {\n// if (s.includes(i)) {return i}\n//}\n//)\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 47
},
"size": {
"width": 60,
"height": 20
},
"zIndex": 0,
"display": true,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 29,
"top": 11
},
"size": {
"width": 72,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 38,
"top": 27
},
"size": {
"width": 50,
"height": 36
},
"zIndex": 0,
"display": false,
"title": "sample selector",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 8,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedParallel"
},
{
"rel": "inputValue",
"name": "selectedMarkers"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "sample selector",
"zindex": 19
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"filterColumns",
"editable"
]
],
"copyPaste": [
[
"active"
]
],
"copyPasteOptions": [
[
"newRows",
"readOnly"
]
],
"autoColumns": [
[]
],
"toolbar": [
[
"showHide"
]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
null
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735\n"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"jpath": [],
"editor": "none",
"forceType": "",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "both",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": true,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 90,
"top": 29
},
"size": {
"width": 35,
"height": 21
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"spectra": {
"position": {
"left": 40,
"top": 63
},
"size": {
"width": 121,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 24,
"top": 51
},
"size": {
"width": 121,
"height": 39
},
"zIndex": 0,
"display": false,
"title": "Metadata of the filtered samples",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 9,
"vars_in": [
{
"rel": "list",
"name": "selectedSamples"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"event": "onRowsSelect",
"rel": "rows",
"jpath": [],
"name": "selectedSampleIDs"
},
{
"event": "onHover",
"rel": "row",
"jpath": [],
"name": "currentID"
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Metadata of the filtered samples",
"zindex": 0
},
{
"url": "modules/types/display/single_value/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"append": [
[]
],
"maxEntries": [
1
],
"editable": [
[]
],
"debounce": [
0
],
"defaultvalue": [
null
],
"font": [
null
],
"fontcolor": [
[
0,
0,
0,
1
]
],
"fontsize": [
null
],
"align": [
null
],
"valign": [
null
],
"rendererOptions": [
""
],
"forceType": [
"string"
],
"sprintf": [
null
],
"sprintfOrder": [
null
],
"preformatted": [
[]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 24,
"top": 39
},
"size": {
"width": 28,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Error messages",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 0
},
"size": {
"width": 17,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 37,
"top": 25
},
"size": {
"width": 86,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 10,
"vars_in": [
{
"rel": "value",
"name": "errorMessage"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Error messages",
"zindex": 0
},
{
"url": "modules/types/edition/slick_grid/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"slickCheck": [
[
"enableCellNavigation",
"rowNumbering",
"forceFitColumns",
"highlightScroll",
"forgetLastActive",
"editable",
"keepSelected"
]
],
"copyPaste": [
[]
],
"copyPasteOptions": [
[
"newRows"
]
],
"autoColumns": [
[]
],
"toolbar": [
[]
],
"colorjpath": [
[]
],
"slick.defaultColumnWidth": [
null
],
"slick.rowHeight": [
"120"
],
"slick.headerRowHeight": [
30
],
"slick.selectionModel": [
"row"
],
"idProperty": [
""
],
"filterType": [
"pref"
],
"filterRow": [
"// Documentation: https://github.com/NPellet/visualizer/blob/46b40ca86345f8fa313563bf9c6ecb80ba323101/src/modules/types/edition/slick_grid/view.js#L1695-L1735"
],
"customJpaths": [
""
]
}
],
"cols": [
[
{
"name": "boxplot",
"jpath": [],
"editor": "none",
"forceType": "chart",
"formatter": "typerenderer",
"copyFormatter": "default",
"visibility": "main",
"rendererOptions": "",
"editorOptions": "",
"hideColumn": []
}
]
],
"actionCols": [
[
{
"backgroundColor": [
255,
255,
255,
0
],
"color": [
0,
0,
0,
1
],
"position": "end",
"clickMode": "text"
}
]
],
"groupings": [
[
{
"getter": []
}
]
],
"actionOutButtons": [
[
{}
]
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"[]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 84,
"top": 3
},
"size": {
"width": 68,
"height": 40
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 146,
"top": 0
},
"size": {
"width": 42,
"height": 90
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 11,
"vars_in": [
{
"rel": "list",
"name": "boxPlot"
}
],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"vars_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Print",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\n\n// action name is captured (boxplotButton or invert_button)\n// the first one triggers the calculation, while the second one must only\n// invert the selection\n\nlet actionName, actionValue;\n\nactionName = this.action.name;\nactionValue = this.action.value;\n\n// selectedIndicators are the metabolites selected in the PCA or parallel\n// Boxplots are only drawn for these metabolites\nlet selectedIndicators = API.getData('selectedIndicators')\nlet selectedSample = API.getData('selectedSamples')\nlet selectedSampleIDs = API.getData('selectedSampleIDs')\n\nswitch(actionName) {\n case 'invertButton':\n let metadata = API.getData('selectedMetadata');\n let s = new Array(); \n \n let selectedMarkers = selectedSample.map(x => x._highlight);\n //console.log(\"markers selected before inversion: \" + selectedMarkers);\n \n s = metadata.filter((v,i,a) => !selectedMarkers.includes(i + 1));\n //console.log(\"Samples after inversion: \" + s.map(x => x._highlight));\n\n API.createData('selectedSamples', s)\n console.log('Boxplot executed: exec with invertButton')\n break;\n \n case 'resetSelectionButton':\n API.createData('selectedSampleIDs', []);\n API.createData('errorMessage', 'selection reseted');\n break;\n \n case 'boxplotButton':\n\n if (selectedSampleIDs.length > 0) {\n let filter = selectedSampleIDs.map(x => x._highlight);\n let filterSamples = selectedSample.map(x => x._highlight);\n //console.log(filter);\n //console.log(selectedSample);\n \n var aGroup = selectedIndicators.map((x, i) => {\n return x.indicator.value.filter((e, i) => filter.includes(i+1));\n });\n \n var bGroup = selectedIndicators.map(x => {\n return x.indicator.value.filter((e, i) => !filter.includes(i+1) && filterSamples.includes(i+1));\n });\n //console.log(\"agroup: \" + aGroup);\n //console.log(\"bgroup: \" + bGroup);\n \n //console.log(bGroup)\n let bplots = []\n if (selectedSampleIDs.length > 0) {\n aGroup.forEach((x, i) => {\n bplots[i] = new Boxplot(selectedIndicators[i].index, [getBoxPlot(aGroup[i], 0), getBoxPlot(bGroup[i], 1)]);\n });\n } else {\n parallelVariables.forEach((x, i) => {\n bplots[i] = new Boxplot(selectedIndicators[i].index, [getBoxPlot(x, i)]);\n });\n }\n //let boxPlot = new Boxplot('Box plots', bplots)\n \n //let boxPlot = new Boxplot('e', [getBoxPlot(vect, 0)])\n //let boxPlot2 = new Boxplot('e', [getBoxPlot(vect, 1)])\n //console.log(bplots)\n \n //API.createData('boxPlot', [boxPlot, boxPlot2])\n API.createData('boxPlot', bplots)\n API.createData('boxPlotvertical', bplots)\n } else {\n let errorMessage = \"Please select at least one sample in the table\"\n API.createData('errorMessage', errorMessage);\n }\n break;\n}\n\nfunction Boxplot (title, boxData) {\n this.title = title,\n this.data = boxData\n}\n\nfunction BoxData (x, q1, q2, q3, whiskers, outliers) {\n this.type = 'box',\n this.orientation = 'x'\n this.maxBoxWidth = 10,\n this.defaultStyle = {\n\t \"outlierLineWidth\" : 1,\n\t \"outlierLineColor\" : 'rgb( 255, 255, 255 )',\n\t \"outlierFillColor\" : 'rgb( 0, 255, 0 )',\n\t \"outlierFillOpacity\" : 0\n\t}\n this.boxes = new Array( \n {'y' : x, \n 'Q1' : q1, \n 'Q2' : q2, \n 'Q3' : q3, \n 'whiskers' : whiskers, \n 'outliers' : outliers})\n}\n\nfunction quantile(data, q) {\n data=Array_Sort_Numbers(data);\n var pos = ((data.length) - 1) * q;\n var base = Math.floor(pos);\n var rest = pos - base;\n if( (data[base+1]!==undefined) ) {\n return data[base] + rest * (data[base+1] - data[base]);\n } else {\n return data[base];\n }\n}\n\nfunction Array_Sort_Numbers(inputarray){\n return inputarray.sort(function(a, b) {\n return a - b;\n });\n}\n\n//let vect = [.26, 0.34, 0.70, 1.75, 50.57, 1.55, 0.08, 0.42, 0.50, 3.20, 0.15, 0.49, 0.95, 0.24, 1.37, 0.17, 6.98, 0.10, 0.94, 0.38]\n\nfunction getBoxPlot(vect, idx){\n let q25 = quantile(vect, 0.25)\n let q50 = quantile(vect, 0.50)\n let q75 = quantile(vect, 0.75)\n \n let iqr = 1.5* (q75 - q25)\n let max = Math.max.apply(Math, vect)\n let min = Math.min.apply(Math, vect)\n \n let upperLimit = (max < q75 + iqr ? max : q75 + iqr)\n let lowerLimit = (min > q25 - iqr ? min : q25 - iqr)\n \n let outliers = []\n vect.forEach(e => {\n if (e > upperLimit ) {\n outliers.push(e)\n }\n if (e < lowerLimit ) {\n outliers.push(e)\n } \n } )\n \n let boxData = new BoxData(idx, q25, q50, q75, [lowerLimit, upperLimit], outliers)\n \n return boxData\n}\n\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 68
},
"size": {
"width": 60,
"height": 16
},
"zIndex": 0,
"display": true,
"title": "box plot calculator",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 12,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "boxplotButton"
},
{
"rel": "execute",
"name": "invertButton"
},
{
"rel": "execute",
"name": "resetSelectionButton"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "box plot calculator",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Compute / Refresh Boxplot"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
null
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 159,
"top": -1
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 15,
"top": 85
},
"size": {
"width": 14,
"height": 8
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 124,
"top": 22
},
"size": {
"width": 17,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 13,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "boxplotButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 36
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Invert selection"
],
"onLabel": [
"invert selection"
],
"offLabel": [
"restore selection"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"invert"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 133,
"top": 16
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 85
},
"size": {
"width": 14,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 127,
"top": 26
},
"size": {
"width": 12,
"height": 5
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 14,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "invertButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 34
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 157,
"top": 9
},
"size": {
"width": 27,
"height": 35
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 15,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p>to do:</p>\n\n<p><s>fix inverse selection</s></p>\n\n<p><s>reset selection</s></p>\n\n<p><s>boxplot without selection</s></p>\n\n<p>&nbsp;</p>\n\n<p><s>upload target</s></p>\n\n<p>loadings pca</p>\n\n<p>color pca / select groups for color</p>\n\n<p>check for zero deviation in columns</p>\n\n<p>&nbsp;</p>\n\n<p>correlation matrix between selected Parallels</p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"var {Matrix, MatrixStat: Stat, ArrayStat} = ML;\nconst computeMean = ArrayStat.mean;\nconst computeVariance = ArrayStat.variance;\nconst mean = Stat.mean;\nconst stdev = Stat.standardDeviation;\nvar spectraDataSet = [];\nvar matrixYData = [];\nvar actionName, actionValue\n\nlet d = API.getData('data')\nlet highlights = d[0].metadata.map(x=>x._highlight)\n\nswitch(this.variable) {\n case 'csvParameters':\n actionName = 'csvParameters';\n break;\n default:\n actionName = this.action.name;\n actionValue = this.action.value;\n}\n\nswitch (actionName) {\n case \"PCA\":\n //get the matrix\n matrixYData = API.getData(\"selectedIndicators\").map(x=>x.indicator.value);\n matrixYData = transpose(matrixYData);\n\n //check for number of columns\n if (matrixYData[0].length < 2) {\n API.createData('errorMessage', 'Select at least 2 indicators(metabolites)');\n break;\n };\n \n // get parameters for PCA\n let pcaPlotParam = API.getData(\"pcaPlot\").resurrect();\n \n let pca = PCA(matrixYData, {\n nComponents: pcaPlotParam.numberOfEigenVectors,\n threshold: pcaPlotParam.threshold,\n maxIterations: pcaPlotParam.maxIterations,\n scale: true,\n center: true\n });\n \n plotResult(pca.T, pcaPlotParam, 'pcaResult');\n plotResult(pca.P, pcaPlotParam, 'pcaResultLoadings');\n break;\n \n case 'plotResult':\n var {x, y} = actionValue.data;\n var indexs = actionValue.indexs;\n var dataClass = actionValue.dataClass;\n if (!dataClass) {\n dataClass = new Array(x.length).fill([1]);\n }\n var l = x.length;\n let nbClasses = dataClass[0].length;\n var result = {\n title: 'main plot',\n data: [\n {\n x: x,\n y: y,\n type: 'scatter',\n info: Array.from({length: x.length}, (v, k) => k+1),\n styles: {\n unselected: new Array(x.length),\n selected: new Array(x.length)\n }\n }\n ]\n };\n var selectedScale = chroma.scale(['green', 'black']).domain([0, nbClasses - 1]).mode('hsl');\n var unselectedScale = chroma.scale(['red', 'blue']).domain([0, nbClasses - 1]).mode('hsl');\n console.log(unselectedScale(0).toString());\n \n let unselected = result.data[0].styles.unselected;\n let selected = result.data[0].styles.selected;\n \n for (let i = 0; i < l; i++) {\n for (let j = 0; j < nbClasses; j++) {\n if(dataClass[i][j] === 1) {\n unselected[i] = {\n fill: unselectedScale(j).toString(),\n shape: \"circle\",\n cx: 0,\n cy: 0,\n r: 3,\n height: \"5px\",\n width: \"5px\",\n stroke: \"transparent\"\n };\n selected[i] = {\n fill: selectedScale(j).toString(),\n shape: \"circle\",\n cx: 0,\n cy: 0,\n r: 3,\n height: \"5px\",\n width: \"5px\",\n stroke: \"transparent\"\n };\n j = nbClasses;\n };\n // info[i] = {index: indexs[i]};\n }\n }\n API.createData(actionValue.varName, result);\n if (actionValue.varName == 'pcaResult' ) {\n API.createData(actionValue.varName + 'ellipse', predictEllipse(x, y, 5, 0.95, 1024));\n }\n break;\n}\n\nfunction plotResult(prediction, pcaPlot, varName) {\n var x = prediction.getColumn(pcaPlot.pcx - 1);\n var y = prediction.getColumn(pcaPlot.pcy - 1);\n var dataClass = new Array(x.length).fill([0, 0, 0, 1]);\n //console.log(dataClass);\n dataClass[0] = [1, 0,0, 0];\n dataClass[1] = [0, 1,0, 0];\n dataClass[2] = [0, 0,1, 0];\n //API.createData('dataToPlot', {data: {x, y}, varName, dataClass});\n API.doAction('plotResult', {data: {x, y}, varName, dataClass});\n}\n\nfunction adjustData(dataSet, options) {\n if (Array.isArray(dataSet[0])) {\n dataSet = Matrix.checkMatrix(dataSet);\n } else if (Array.isArray(dataSet)) {\n dataSet = new Matrix(dataSet.map(a => {\n return [a];\n }));\n } else {\n throw new Error('Invalid data type for dataSet');\n }\n const {\n means = Stat.mean(dataSet),\n std = Stat.standardDeviation(dataSet, means, true)\n } = options;\n\n return [dataSet, means, std];\n}\n\nfunction normal(x) {\n if (!Array.isArray(x)) {\n throw new Error('The input should be an array');\n } else if (!Array.isArray(x[0])) {\n return vectorNormalization(x);\n } else {\n return matrixNormalization(x);\n }\n}\n\nfunction vectorNormalization(data) {\n let mean = computeMean(data);\n let std = computeVariance(data, true);\n\n let ans = new Array(data.length);\n if (std === 0) {\n for (let i = 0; i < ans.length; i++) {\n ans[i] = (data[i] - mean);\n }\n } else {\n for (let i = 0; i < ans.length; i++) {\n ans[i] = (data[i] - mean) / std;\n }\n }\n\n return ans;\n}\n\nfunction matrixNormalization(data) {\n let means = MatrixStat.mean(data, 1);\n let std = matrixStandardDeviation(data, means);\n\n let ans = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n ans[i] = new Array(data[i].length);\n for (let j = 0; j < data[i].length; j++) {\n if (std[i] === 0) {\n ans[i][j] = (data[i][j] - means[i]);\n } else {\n ans[i][j] = (data[i][j] - means[i]) / std[i];\n }\n }\n }\n return ans;\n}\n\nfunction matrixStandardDeviation(data, means) {\n return data.map(\n (row, i) => Math.sqrt(row.reduce(\n (acc, val) => acc + ((val - means[i]) * (val - means[i]))\n , 0) / (row.length - 1))\n );\n}\n\nfunction PCA(dataset, options = {}) {\n var {\n nComponents = 2,\n threshold = 1e-9,\n maxIterations = 100\n } = options;\n\n var eMatrix = _adjust(dataset, options);\n \n var r = eMatrix.rows;\n var c = eMatrix.columns;\n\n var T = Matrix.zeros(r, nComponents);\n var P = Matrix.zeros(c, nComponents);\n var eigenvalues = new Array(nComponents);\n \n for (let i = 0; i < nComponents; i++) {\n let tIndex = maxSumColIndex(eMatrix.clone().mulM(eMatrix));\n let t = eMatrix.getColumnVector(tIndex);\n \n let k = 0;\n let tNew = t.dot(t);\n for (let tOld = Number.MAX_SAFE_INTEGER; Math.abs(tOld - tNew) > threshold && k < maxIterations; k++) {\n var p = getLoading(eMatrix, t);\n t = eMatrix.mmul(p);\n tOld = tNew;\n tNew = t.dot(t);\n //console.log(t.dot(t), tNew,tOld)\n \n }\n eigenvalues[i] = tNew;\n T.setColumn(i, t);\n P.setColumn(i, p);\n eMatrix.sub(t.mmul(p.transpose()));\n }\n return {T, P};\n}\n\nfunction getLoading(e, t) {\n var m = e.columns;\n var n = e.rows;\n\n var result = new Matrix(m, 1);\n\n var Bcolj = new Array(n);\n for (var i = 0; i < m; i++) {\n var s = 0;\n for (let k = 0; k < n; k++) {\n s += e.get(k, i) * t[k][0];\n }\n result.set(i, 0, s);\n }\n return result.mul(1 / result.norm());\n}\n\nfunction maxSumColIndex(data) {\n return data.sum('column').maxIndex()[0];\n}\n\nfunction _adjust(dataset, options) {\n dataset = new Matrix(dataset);\n if (options.center) {\n const means = mean(dataset);\n const stdevs = stdev(dataset, means, true);\n // this.means = means;\n dataset.subRowVector(means);\n if (options.scale) {\n for (var i = 0; i < stdevs.length; i++) {\n if (stdevs[i] === 0) {\n throw new RangeError('Cannot scale the dataset (standard deviation is zero at index ' + i);\n }\n }\n // this.stdevs = stdevs;\n dataset.divRowVector(stdevs);\n }\n }\n return dataset;\n};\n\nfunction predictEllipse(x, y, n, alpha, nbPoints) {\n let variance = [computeVariance(x), computeVariance(y)];\n let means = [0,0];\n let elp = ellipse([0,0], variance, nbPoints)\n let c = 2 * (n-1)/n * (n+1)/(n-2);\n let F = Math.sqrt(c * 4.7374);\n elp = elp.map((point) => {\n return point.map((p, i) => F * p + means[i])\n })\n return elp;\n}\n\nfunction ellipse(center, std, nbPoints) {\n let vector = new Array(nbPoints);\n let jump = 2 * Math.PI / (nbPoints - 1);\n let t = 0;\n for (let i = 0; i < nbPoints; i++) {\n vector[i] = [center[0] + Math.sqrt(std[0]) * Math.cos(t), center[1] + Math.sqrt(std[1]) * Math.sin(t)];\n t += jump;\n }\n return vector;\n}\n\nfunction transpose(matrix) {\n return matrix[0].map((col, i) => matrix.map(row => row[i]));\n}\n"
]
}
],
"libs": [
[
{
"lib": "ML",
"alias": "ML"
},
{
"lib": "src/util/ui",
"alias": "UI"
},
{
"lib": "jszip",
"alias": "JSZip"
},
{
"lib": "components/papa-parse/papaparse.min",
"alias": "Papa"
},
{
"lib": "SD",
"alias": "SD"
},
{
"lib": "chroma",
"alias": "chroma"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 94
},
"size": {
"width": 60,
"height": 14
},
"zIndex": 0,
"display": true,
"title": "compute pca",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 16,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "PCA"
},
{
"rel": "execute",
"name": "plotResult"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "compute pca",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"PCA"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
null
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 74,
"top": 20
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 25
},
"size": {
"width": 17,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 130,
"top": 29
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 96,
"top": 37
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 96,
"top": 37
},
"size": {
"width": 8,
"height": 7
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 17,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "PCA"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 37
},
{
"url": "modules/types/edition/onde/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"hasButton": [
[]
],
"button_text": [
"Export"
],
"debouncing": [
0
],
"output": [
"modified"
],
"mode": [
"schema"
],
"schemaSource": [
"config"
],
"schema": [
"{\n \"type\":\"object\",\n \"properties\":{\n \"pcx\":{\n \"label\":\"PCX\",\n \"type\":\"number\",\n \"title\":\"Principal component in X axis\",\n \"default\": \"1\"\n },\n \"pcy\":{\n \"label\":\"PCY\",\n \"type\":\"number\",\n \"title\":\"Principal component in Y axis\",\n \"default\": \"2\"\n },\n \"numberOfEigenVectors\": {\n \"label\":\"EigenVectors\",\n \"type\":\"number\",\n \"title\":\"number of principal components to use\",\n \"default\": \"3\"\n }\n }\n}"
],
"onchangeFilter": [
null
]
}
],
"data": [
{
"saveInView": [
[]
],
"varname": [
""
],
"data": [
"{}"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 114,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 83,
"top": 12
},
"size": {
"width": 32,
"height": 19
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 103,
"top": 23
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 89,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 89,
"top": 23
},
"size": {
"width": 20,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 18,
"vars_in": [
{
"rel": "inputValue",
"name": "pcaPlot"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"xy"
],
"wheelAction": [
"none"
],
"wheelbaseline": [
0
],
"fullOut": [
"both"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[]
],
"selectScatter": [
[
"yes"
]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 53,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 116,
"top": 12
},
"size": {
"width": 29,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 39,
"height": 40
},
"zIndex": 0,
"display": true,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Scores",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 19,
"vars_in": [
{
"rel": "chart",
"name": "pcaResult"
},
{
"rel": "chart",
"name": "pcaResultellipse"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onSelectScatter",
"rel": "selectedData",
"jpath": [],
"name": "selectedMarkers"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Scores",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let selectedSampleIDs = API.getData('selectedSampleIDs')\nlet spec = API.getData('spec')\nlet invert = 1\n\nlet selectedSample = API.getData('selectedParallel')\nif (selectedSampleIDs.length > 0) {\n let F = selectedSampleIDs.map(x => x._highlight);\n console.log(F)\n var data = spec.filter((v, i, a) => F.includes(i+1));\n}\n\n//let data = spec.filter((e, i) => {\n// return (invert == 1 ? selectedSample[i] : !selectedSample[i]);\n//});\n\n//let data = selectedSampleIDs.map(x => x._highlight);\n//let data = spec.map(x=>x.dataMatrix);\n\n//let data = spec.filter(\n// (v, i, a) => selectedSample[i]\n//)\n\nlet x = data[0].dataMatrix.filter(function(value, index, Arr) {\n return index % 2 == 0\n})\n\nlet color = []\nlet col = []\nx.forEach( i => col.push({'_rgb':[0,0,255,1]}) )\n//color.forEach((ele, ind, arr) => arr[ind]._rgb[0] = 0)\n\n\nlet y = data.map( x => \n x.dataMatrix.filter((value, index, Arr) => \n index % 2 == 1\n )\n)\n\nlet spectra = data.map((e, i) => {\n let groupColor = e.color.split(\"(\")[1].split(\")\")[0].split(\",\").map(Number)\n color =[]\n x.forEach( () => color.push({'_rgb':groupColor}) )\n let s = (\n {'type': 'color',\n 'y': y[i],\n 'x': x,\n 'color': color\n })\n return s\n }\n)\n\nAPI.createData('filteredSpectra', {'data':spectra})\nconsole.log(\"executed: make chart spectra from parralel\")\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 109
},
"size": {
"width": 60,
"height": 20
},
"zIndex": 0,
"display": true,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 89,
"top": 38
},
"size": {
"width": 66,
"height": 55
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "make chart spectra from parralel",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 20,
"vars_in": [
{
"rel": "inputValue",
"name": "selectedSampleIDs"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "make chart spectra from parralel",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nif (this.variable==='currentLayer') {\n this.button=get('currentLayer')+'';\n}\n\nvar layers={\n 'default': {\n layer:'Default layer',\n info:`\n <h3>General overview of the sample</h3>\n Click on a button to change specific values and jump to the corresponding tab\n `\n },\n 'spectra': {\n layer: 'spectra',\n info: `<h3>Spectra view</h3> From selected sample, go back to the original data/spectra.`\n },\n 'help': {\n layer: 'help',\n info: `<h3>Help configuration:</h3> Configure and update help information.`\n },\n 'Upload': {\n layer: 'Upload',\n info: `<h3>Upload tool:</h3> Upload your data.`\n }\n\n}\n\nif (layers[this.button]) {\n for (var key of Object.keys(layers)) {\n this.enableButton(key);\n }\n API.switchToLayer(layers[this.button].layer)\n this.disableButton(this.button);\n API.createData('layerInfo',layers[this.button].info);\n window.localStorage.setItem('defaultSampleLayer', this.button);\n} else {\n switch (this.button) {\n case 'save':\n API.doAction('save');\n break;\n case 'help':\n API.doAction('Help');\n break;\n }\n}\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "default",
"label": "Browser",
"hide": [],
"disable": []
},
{
"name": "spectra",
"label": "Spectra",
"hide": [],
"disable": []
},
{
"name": "Upload",
"label": "Upload",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 115,
"top": 42
},
"size": {
"width": 32,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 11
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 6,
"top": 84
},
"size": {
"width": 32,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 1
},
"size": {
"width": 31,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 106,
"top": 24
},
"size": {
"width": 33,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
}
},
"id": 21,
"vars_in": [
{
"rel": "inputValue",
"name": "currentLayer"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 38
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"x"
],
"wheelAction": [
"zoomY"
],
"wheelbaseline": [
0
],
"fullOut": [
"none"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[
"track"
]
],
"selectScatter": [
[]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display",
"flip"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
""
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
1,
1,
255,
1
],
"strokewidth": "1",
"strokestyle": "1",
"plotcontinuous": "continuous",
"peakpicking": [],
"markers": [],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 40,
"top": 25
},
"size": {
"width": 121,
"height": 37
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 22,
"vars_in": [
{
"rel": "chart",
"name": "filteredSpectra"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"//let data = API.getData('data')\n//console.log(data[0].metadata.map(x=>x._highlight))\nlet currentID = API.getData('currentID')\n\nif (currentID != null) { \nlet score = JSON.parse(JSON.stringify(API.getData('pcaResult')))\n\nconsole.log(currentID._highlight)\n\nlet index = score.data[0].info.filter( val => val.id == currentID._highlight )\nconsole.log(index)\n\n//score.data[0].styles.unselected[index].fill = \"transparent\"\nscore.data[0].styles.unselected[index].r = 6\nscore.data[0].styles.unselected[index].stroke = \"red\"\n\nlet currentChart = ({\"title\": \"score plot\",\n \"data\": [{\n \"type\": \"scatter\",\n \"info\":[],\n \"x\":[score.data[0].x[1]],\n \"y\":[score.data[0].y[1]],\n \"styles\": {\n \"unselected\": [\n {\"fill\": \"transparent\",\n \"shape\": \"circle\",\n \"cx\": 0,\n \"cy\": 0,\n \"r\": 8,\n \"height\": \"5px\",\n \"width\": \"5px\",\n \"stroke\": \"red\"}]\n }\n }]\n})\n\nAPI.createData('currentChart', currentChart)\nAPI.createData('modifiedScores', score)\nAPI.createData('currentID', null)\nconsole.log('executed')\n}\n\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 61,
"top": 33
},
"size": {
"width": 54,
"height": 58
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 1,
"top": 48
},
"size": {
"width": 68,
"height": 44
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 23,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 18
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"// create empty help text\nlet selectedData = API.getData('selectedData');\nlet varNames = Object.keys(selectedData[0]);\n\nlet c = new Array();\nvarNames.forEach(e => c.push({ID: e, title: e, text: []}));\n//API.createData('helpText', c)\n"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 72
},
"size": {
"width": 54,
"height": 13
},
"zIndex": 0,
"display": true,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 77
},
"size": {
"width": 54,
"height": 13
},
"zIndex": 0,
"display": false,
"title": "create empty help text",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 24,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "create empty help text",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let action = this.action;\n\nlet help = API.getData('help').resurrect();\n\nlet selectedMetabolite = action.value.index.resurrect();\nlet index = help.map(x => x.ID);\n\nlet match = index.indexOf(selectedMetabolite);\nconsole.log(match)\n\nAPI.createData('helpText', help[match]);\n\nconsole.log(\"gethelp: executed\")\n"
]
}
],
"libs": [
[
{
"lib": "src/util/ui",
"alias": "UI"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": [
"disable"
]
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 54,
"height": 26
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 0
},
"size": {
"width": 54,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "getHelp executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 25,
"vars_in": [
{}
],
"actions_in": [
{
"rel": "execute",
"name": "getHelp"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/display/template-twig/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"selectable": [
[]
],
"template": [
"<font size=\"4\"><center><h2>{{helpText.title}}</h2></center>\n<br>\n\n{%for element in helpText.text %}\n<p align=\"justify\">{{element.p}}</p>\n{% endfor %}\n</font>"
],
"modifyInForm": [
[]
],
"debouncing": [
0
],
"formOptions": [
[
"keepFormValueIfDataUndefined"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 41
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 79,
"top": 0
},
"size": {
"width": 43,
"height": 46
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 27,
"vars_in": [
{
"rel": "value",
"name": "helpText"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onRendered",
"rel": "renderedHtml",
"jpath": [],
"name": "html"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/object_editor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
"view"
],
"expanded": [
[]
],
"storeObject": [
[
"expand"
]
],
"displayValue": [
[]
],
"searchBox": [
[
"search"
]
],
"sendButton": [
[]
],
"output": [
"new"
],
"storedObject": [
"[{\"ID\":\"Creatine\",\"title\":\"Creatine\",\"text\":[]},{\"ID\":\"Glucose\",\"title\":\"Glucose\",\"text\":[]},{\"ID\":\"D_Galactose_alpha\",\"title\":\"D_Galactose_alpha\",\"text\":[]},{\"ID\":\"D_Lactose\",\"title\":\"D_Lactose\",\"text\":[]},{\"ID\":\"Alanine\",\"title\":\"Alanine\",\"text\":[]},{\"ID\":\"Lactate\",\"title\":\"Lactate\",\"text\":[]},{\"ID\":\"Acetate\",\"title\":\"Acetate\",\"text\":[]},{\"ID\":\"Succinate\",\"title\":\"Succinate\",\"text\":[]},{\"ID\":\"Citrate\",\"title\":\"Citrate\",\"text\":[]},{\"ID\":\"Dimethylamine\",\"title\":\"Dimethylamine\",\"text\":[]},{\"ID\":\"Trimethylamine\",\"title\":\"Trimethylamine\",\"text\":[]},{\"ID\":\"Betaine\",\"title\":\"Betaine\",\"text\":[]},{\"ID\":\"Glycine\",\"title\":\"Glycine\",\"text\":[]},{\"ID\":\"Fumaric_acid\",\"title\":\"Fumaric_acid\",\"text\":[]},{\"ID\":\"Formate\",\"title\":\"Formate\",\"text\":[]},{\"ID\":\"X1_Methylnicotinamide\",\"title\":\"X1_Methylnicotinamide\",\"text\":[]},{\"ID\":\"Dimethylglycine\",\"title\":\"Dimethylglycine\",\"text\":[]},{\"ID\":\"Myo_Inositol\",\"title\":\"Myo_Inositol\",\"text\":[]},{\"ID\":\"Taurine\",\"title\":\"Taurine\",\"text\":[]},{\"ID\":\"Hippurate\",\"title\":\"Hippurate\",\"text\":[{\"p\":\"Hippurate is the glycine conjugate of benzoic acid and is synthesised in both the liver and renal cortex. Other minor routes of synthesis of benzoic acid in humans include basic metabolism of protein catabolism or from metabolism of quinic acid via the shikimate pathway in the gastrointestine (Pero et al 2010 D.O.I. 10.2174/157488410790410588) It is typically associated with bacterial metabolism of dietary phenolics. The absence of hippurate in the urine of new-born infants is consistent with the involvement of the gut bacteria in its synthesis. Hippurate was first identified in horse (hippos) urine in 1829 by Liebig and is one of the highest concentration aromatic compounds in human urine. It is associated with lean muscle mass, low body weight and is inversely associated with blood pressure. Excretion of hippurate has been found to be higher in both rodent models and man and typically increases with age.\"},{\"p\":\"In a rat model of response to laproscopic surgery urinary concentrations of hippurate were significantly increased post surgery (Kinross et al 2011 PMID: 21105667).\"},{\"p\":\"Consumption of black and green teas, apple cider, sweet potato, cranberries and other berries result in increased urinary excretion of hippurate.\"},{\"p\":\"Review on hippurate metabolism PMID: 23342949; DOI: 10.1021/pr300900b\"}]},{\"ID\":\"Acetone\",\"title\":\"Acetone\",\"text\":[]},{\"ID\":\"X3_Hydroxybutyric_acid\",\"title\":\"X3_Hydroxybutyric_acid\",\"text\":[]},{\"ID\":\"Acetoacetic_acid\",\"title\":\"Acetoacetic_acid\",\"text\":[]},{\"ID\":\"Valine\",\"title\":\"Valine\",\"text\":[]},{\"ID\":\"Methionine\",\"title\":\"Methionine\",\"text\":[]},{\"ID\":\"Arginine\",\"title\":\"Arginine\",\"text\":[]},{\"ID\":\"X1_Methylhistidine\",\"title\":\"X1_Methylhistidine\",\"text\":[]},{\"ID\":\"Sarcosine\",\"title\":\"Sarcosine\",\"text\":[]},{\"ID\":\"Trigonelline\",\"title\":\"Trigonelline\",\"text\":[]},{\"ID\":\"Benzoic_acid\",\"title\":\"Benzoic_acid\",\"text\":[]},{\"ID\":\"X4_Aminobutyric_acid\",\"title\":\"X4_Aminobutyric_acid\",\"text\":[]},{\"ID\":\"Pyruvic_acid\",\"title\":\"Pyruvic_acid\",\"text\":[]},{\"ID\":\"Oxaloacetic_acid\",\"title\":\"Oxaloacetic_acid\",\"text\":[]},{\"ID\":\"D_Mannitol\",\"title\":\"D_Mannitol\",\"text\":[]},{\"ID\":\"D_Mannose_alpha\",\"title\":\"D_Mannose_alpha\",\"text\":[]},{\"ID\":\"Adenosine\",\"title\":\"Adenosine\",\"text\":[]},{\"ID\":\"Allantoin\",\"title\":\"Allantoin\",\"text\":[]},{\"ID\":\"Caffeine\",\"title\":\"Caffeine\",\"text\":[]},{\"ID\":\"Imidazole\",\"title\":\"Imidazole\",\"text\":[]},{\"ID\":\"Inosine\",\"title\":\"Inosine\",\"text\":[]},{\"ID\":\"Allopurinol\",\"title\":\"Allopurinol\",\"text\":[]},{\"ID\":\"Tartrate\",\"title\":\"Tartrate\",\"text\":[]},{\"ID\":\"Proline_betaine\",\"title\":\"Proline_betaine\",\"text\":[]},{\"ID\":\"D_Mandelic_acid\",\"title\":\"D_Mandelic_acid\",\"text\":[]},{\"ID\":\"X2_Furoylglycine\",\"title\":\"X2_Furoylglycine\",\"text\":[]},{\"ID\":\"X2_Oxoglutaric_acid\",\"title\":\"X2_Oxoglutaric_acid\",\"text\":[]},{\"ID\":\"X2_Methylsuccinic_acid\",\"title\":\"X2_Methylsuccinic_acid\",\"text\":[]},{\"ID\":\"Guanidinoacetate\",\"title\":\"Guanidinoacetate\",\"text\":[]},{\"ID\":\"X1_Methyladenosine\",\"title\":\"X1_Methyladenosine\",\"text\":[]},{\"ID\":\"Propylene_glycol\",\"title\":\"Propylene_glycol\",\"text\":[]},{\"ID\":\"Glycerol\",\"title\":\"Glycerol\",\"text\":[]},{\"ID\":\"Isopropanol\",\"title\":\"Isopropanol\",\"text\":[]},{\"ID\":\"Ethanol\",\"title\":\"Ethanol\",\"text\":[]},{\"ID\":\"Methanol\",\"title\":\"Methanol\",\"text\":[]},{\"ID\":\"Paracetamol\",\"title\":\"Paracetamol\",\"text\":[]},{\"ID\":\"Paracetamol_glucuronide\",\"title\":\"Paracetamol_glucuronide\",\"text\":[]},{\"ID\":\"L_Ascorbic_acid\",\"title\":\"L_Ascorbic_acid\",\"text\":[]},{\"ID\":\"X1_Methylguanidine\",\"title\":\"X1_Methylguanidine\",\"text\":[]},{\"ID\":\"Orotic_acid\",\"title\":\"Orotic_acid\",\"text\":[]},{\"ID\":\"Methylmalonic_acid\",\"title\":\"Methylmalonic_acid\",\"text\":[]},{\"ID\":\"X2_Hydroxyisovalerate\",\"title\":\"X2_Hydroxyisovalerate\",\"text\":[]},{\"ID\":\"X3_Hydroxyisovalerate\",\"title\":\"X3_Hydroxyisovalerate\",\"text\":[]},{\"ID\":\"Ethylmalonic_acid\",\"title\":\"Ethylmalonic_acid\",\"text\":[]},{\"ID\":\"N_Acetylaspartic_acid\",\"title\":\"N_Acetylaspartic_acid\",\"text\":[]},{\"ID\":\"Glutaric_acid\",\"title\":\"Glutaric_acid\",\"text\":[]},{\"ID\":\"Uridine\",\"title\":\"Uridine\",\"text\":[]},{\"ID\":\"Propionic_acid\",\"title\":\"Propionic_acid\",\"text\":[]},{\"ID\":\"Isoleucine\",\"title\":\"Isoleucine\",\"text\":[]},{\"ID\":\"DL_Alloisoleucine\",\"title\":\"DL_Alloisoleucine\",\"text\":[]},{\"ID\":\"Leucine\",\"title\":\"Leucine\",\"text\":[]},{\"ID\":\"Citrulline\",\"title\":\"Citrulline\",\"text\":[]},{\"ID\":\"X3_Hydroxypropionic_acid\",\"title\":\"X3_Hydroxypropionic_acid\",\"text\":[]},{\"ID\":\"Phenylalanine\",\"title\":\"Phenylalanine\",\"text\":[]},{\"ID\":\"Phenylpyruvic_acid\",\"title\":\"Phenylpyruvic_acid\",\"text\":[]},{\"ID\":\"N_Acetylphenylalanine\",\"title\":\"N_Acetylphenylalanine\",\"text\":[]},{\"ID\":\"Neopterin\",\"title\":\"Neopterin\",\"text\":[]},{\"ID\":\"Phenylacetic_acid\",\"title\":\"Phenylacetic_acid\",\"text\":[]},{\"ID\":\"X2_Hydroxyphenylacetic_acid\",\"title\":\"X2_Hydroxyphenylacetic_acid\",\"text\":[]},{\"ID\":\"X3_Phenyllactic_acid\",\"title\":\"X3_Phenyllactic_acid\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenyllactic_acid\",\"title\":\"X4_Hydroxyphenyllactic_acid\",\"text\":[]},{\"ID\":\"X2_Oxoisocaproic_acid\",\"title\":\"X2_Oxoisocaproic_acid\",\"text\":[]},{\"ID\":\"X2_Oxoisovaleric_acid\",\"title\":\"X2_Oxoisovaleric_acid\",\"text\":[]},{\"ID\":\"X3_Methyl_2_oxovaleric_acid\",\"title\":\"X3_Methyl_2_oxovaleric_acid\",\"text\":[]},{\"ID\":\"X3_Methylcrotonylglycine\",\"title\":\"X3_Methylcrotonylglycine\",\"text\":[]},{\"ID\":\"Uracil\",\"title\":\"Uracil\",\"text\":[]},{\"ID\":\"X2_Hydroxy_4_methylvaleric_acid\",\"title\":\"X2_Hydroxy_4_methylvaleric_acid\",\"text\":[]},{\"ID\":\"D_Galactonic_acid\",\"title\":\"D_Galactonic_acid\",\"text\":[]},{\"ID\":\"Galactitol\",\"title\":\"Galactitol\",\"text\":[]},{\"ID\":\"N_Isovaleroylglycine\",\"title\":\"N_Isovaleroylglycine\",\"text\":[]},{\"ID\":\"X5_Aminolevulinic_acid\",\"title\":\"X5_Aminolevulinic_acid\",\"text\":[]},{\"ID\":\"Propionylglycine\",\"title\":\"Propionylglycine\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenylacetate\",\"title\":\"X4_Hydroxyphenylacetate\",\"text\":[]},{\"ID\":\"X3_Hydroxyvaleric_acid\",\"title\":\"X3_Hydroxyvaleric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxyglutaric_acid\",\"title\":\"X3_Hydroxyglutaric_acid\",\"text\":[]},{\"ID\":\"E_Glutaconic_acid\",\"title\":\"E_Glutaconic_acid\",\"text\":[]},{\"ID\":\"L_Pyroglutamic_acid\",\"title\":\"L_Pyroglutamic_acid\",\"text\":[]},{\"ID\":\"Tiglylglycine\",\"title\":\"Tiglylglycine\",\"text\":[]},{\"ID\":\"Cystine\",\"title\":\"Cystine\",\"text\":[]},{\"ID\":\"X4_Hydroxyphenylpyruvic_acid\",\"title\":\"X4_Hydroxyphenylpyruvic_acid\",\"text\":[]},{\"ID\":\"Glutamic_acid\",\"title\":\"Glutamic_acid\",\"text\":[]},{\"ID\":\"Glutamine\",\"title\":\"Glutamine\",\"text\":[]},{\"ID\":\"Glycolate\",\"title\":\"Glycolate\",\"text\":[]},{\"ID\":\"Cytosine\",\"title\":\"Cytosine\",\"text\":[]},{\"ID\":\"Adenine\",\"title\":\"Adenine\",\"text\":[]},{\"ID\":\"D_Gluconic_acid\",\"title\":\"D_Gluconic_acid\",\"text\":[]},{\"ID\":\"N_Acetyltyrosine\",\"title\":\"N_Acetyltyrosine\",\"text\":[]},{\"ID\":\"X3_Aminoisobutyrate\",\"title\":\"X3_Aminoisobutyrate\",\"text\":[]},{\"ID\":\"Choline\",\"title\":\"Choline\",\"text\":[]},{\"ID\":\"Tyrosine\",\"title\":\"Tyrosine\",\"text\":[]},{\"ID\":\"Butyric_acid\",\"title\":\"Butyric_acid\",\"text\":[]},{\"ID\":\"Succinylacetone\",\"title\":\"Succinylacetone\",\"text\":[]},{\"ID\":\"Oxypurinol\",\"title\":\"Oxypurinol\",\"text\":[]},{\"ID\":\"Pantothenic_acid\",\"title\":\"Pantothenic_acid\",\"text\":[]},{\"ID\":\"Tyramine\",\"title\":\"Tyramine\",\"text\":[]},{\"ID\":\"L_Tryptophan\",\"title\":\"L_Tryptophan\",\"text\":[]},{\"ID\":\"Dihydrothymine\",\"title\":\"Dihydrothymine\",\"text\":[]},{\"ID\":\"Dihydrouracil\",\"title\":\"Dihydrouracil\",\"text\":[]},{\"ID\":\"Thymine\",\"title\":\"Thymine\",\"text\":[]},{\"ID\":\"Xanthurenic_acid\",\"title\":\"Xanthurenic_acid\",\"text\":[]},{\"ID\":\"Argininosuccinic_acid\",\"title\":\"Argininosuccinic_acid\",\"text\":[]},{\"ID\":\"Acetoine\",\"title\":\"Acetoine\",\"text\":[]},{\"ID\":\"Maleic_acid\",\"title\":\"Maleic_acid\",\"text\":[]},{\"ID\":\"Malic_acid\",\"title\":\"Malic_acid\",\"text\":[]},{\"ID\":\"N_Acetylglutamate\",\"title\":\"N_Acetylglutamate\",\"text\":[]},{\"ID\":\"L_Homocystine\",\"title\":\"L_Homocystine\",\"text\":[]},{\"ID\":\"Isobutyrylglycine\",\"title\":\"Isobutyrylglycine\",\"text\":[]},{\"ID\":\"D_Panthenol\",\"title\":\"D_Panthenol\",\"text\":[]},{\"ID\":\"X4_Aminohippuric_acid\",\"title\":\"X4_Aminohippuric_acid\",\"text\":[]},{\"ID\":\"X3_Methylglutaconic_acid\",\"title\":\"X3_Methylglutaconic_acid\",\"text\":[]},{\"ID\":\"X1_Methylhydantoin\",\"title\":\"X1_Methylhydantoin\",\"text\":[]},{\"ID\":\"Citraconic_acid\",\"title\":\"Citraconic_acid\",\"text\":[]},{\"ID\":\"Quinolinic_acid\",\"title\":\"Quinolinic_acid\",\"text\":[]},{\"ID\":\"DL_Kynurenin\",\"title\":\"DL_Kynurenin\",\"text\":[]},{\"ID\":\"X2_Ketobutyric_acid\",\"title\":\"X2_Ketobutyric_acid\",\"text\":[]},{\"ID\":\"Pimelic_acid\",\"title\":\"Pimelic_acid\",\"text\":[]},{\"ID\":\"Syringic_acid\",\"title\":\"Syringic_acid\",\"text\":[]},{\"ID\":\"X4_Hydroxyhippuric_acid\",\"title\":\"X4_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X4_Pyridoxic_acid\",\"title\":\"X4_Pyridoxic_acid\",\"text\":[]},{\"ID\":\"L_Threonic_acid\",\"title\":\"L_Threonic_acid\",\"text\":[]},{\"ID\":\"L_Citramalic_acid\",\"title\":\"L_Citramalic_acid\",\"text\":[]},{\"ID\":\"X5_Aminopentanoic_acid\",\"title\":\"X5_Aminopentanoic_acid\",\"text\":[]},{\"ID\":\"X4_Ethylphenol\",\"title\":\"X4_Ethylphenol\",\"text\":[]},{\"ID\":\"X1_3_Dimethyluric_acid\",\"title\":\"X1_3_Dimethyluric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxy_3_methylglutaric_acid\",\"title\":\"X3_Hydroxy_3_methylglutaric_acid\",\"text\":[]},{\"ID\":\"Thymol\",\"title\":\"Thymol\",\"text\":[]},{\"ID\":\"Theobromine\",\"title\":\"Theobromine\",\"text\":[]},{\"ID\":\"L_Fucose_alpha\",\"title\":\"L_Fucose_alpha\",\"text\":[]},{\"ID\":\"Pyrocatechol\",\"title\":\"Pyrocatechol\",\"text\":[]},{\"ID\":\"L_Carnosine\",\"title\":\"L_Carnosine\",\"text\":[]},{\"ID\":\"Phenylacetylglutamine\",\"title\":\"Phenylacetylglutamine\",\"text\":[]},{\"ID\":\"X4_Cresylsulfate\",\"title\":\"X4_Cresylsulfate\",\"text\":[]},{\"ID\":\"Lysine\",\"title\":\"Lysine\",\"text\":[]},{\"ID\":\"NAc_S_propenyl_Cys_SO\",\"title\":\"NAc_S_propenyl_Cys_SO\",\"text\":[]},{\"ID\":\"O_Acetylcarnitine\",\"title\":\"O_Acetylcarnitine\",\"text\":[]},{\"ID\":\"N_Acetyl_S_Methyl_cysteine_sulfoxide\",\"title\":\"N_Acetyl_S_Methyl_cysteine_sulfoxide\",\"text\":[]},{\"ID\":\"Trimethylamine_N_oxide\",\"title\":\"Trimethylamine_N_oxide\",\"text\":[]},{\"ID\":\"Rhamnitol\",\"title\":\"Rhamnitol\",\"text\":[]},{\"ID\":\"Carnitine\",\"title\":\"Carnitine\",\"text\":[]},{\"ID\":\"N_Methyl_2_pyridone_5_carboxamide\",\"title\":\"N_Methyl_2_pyridone_5_carboxamide\",\"text\":[]},{\"ID\":\"N_Acetylneuraminate\",\"title\":\"N_Acetylneuraminate\",\"text\":[]},{\"ID\":\"X2_Hydroxyhippuric_acid\",\"title\":\"X2_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X3_Hydroxyhippuric_acid\",\"title\":\"X3_Hydroxyhippuric_acid\",\"text\":[]},{\"ID\":\"X3_Methylhistidine\",\"title\":\"X3_Methylhistidine\",\"text\":[]},{\"ID\":\"trans_Aconitate\",\"title\":\"trans_Aconitate\",\"text\":[]},{\"ID\":\"Methylamine\",\"title\":\"Methylamine\",\"text\":[]},{\"ID\":\"Histidine\",\"title\":\"Histidine\",\"text\":[]},{\"ID\":\"Paracetamol_sulfate\",\"title\":\"Paracetamol_sulfate\",\"text\":[]},{\"ID\":\"Carboxyibuprofen\",\"title\":\"Carboxyibuprofen\",\"text\":[]},{\"ID\":\"Ibuprofen\",\"title\":\"Ibuprofen\",\"text\":[]},{\"ID\":\"_highlight\",\"title\":\"_highlight\",\"text\":[]},{\"ID\":\"_row\",\"title\":\"_row\",\"text\":[]}]"
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 42
},
"size": {
"width": 43,
"height": 29
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 42
},
"size": {
"width": 54,
"height": 19
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 28,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onObjectChange",
"rel": "output",
"jpath": [],
"name": "help"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[]
],
"script": [
"let html = API.getData('html');\nlet helpText = API.getData('helpText');\n\nif(helpText == null) {\n html = `\n <h2>TEAMMATE - A simple urinary metabolite reference database and toolbox\n for analysing urine composition based on 1H NMR spectral \n profiles</h2><br>\n Authors: Torben Kimhofer<sup>1</sup>, Alejandro Bolaños<sup>2</sup>,\n Luc Patiny<sup>3</sup>, Julien Wist<sup>2</sup>, Elaine Holmes<sup>1</sup>\n <br><br><sup>1</sup>Division of Computational and Systems Medicine, Imperial College, London, UK.\n <br><sup>2</sup>Chemistry Department, Universidad del Valle, Cali, Valle, Colombia.\n <br><sup>3</sup>Institute of Chemical Sciences and Engineering, Ecole Polytechnique Fédérale de Lausanne (EPFL), Lausanne, CH-1015, Switzerland.\n `\n}\n\nUI.dialog(String(html), {'width': '600px'});\nconsole.log(\"display html help: executed\")"
]
}
],
"libs": [
[
{
"lib": "src/util/ui",
"alias": "UI"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": [
"disable"
]
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 24,
"top": 27
},
"size": {
"width": 54,
"height": 44
},
"zIndex": 0,
"display": true,
"title": "display html help",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 24,
"top": 62
},
"size": {
"width": 54,
"height": 14
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 29,
"vars_in": [
{
"rel": "inputValue",
"name": "html"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "display html help",
"zindex": 0
},
{
"url": "modules/types/client_interaction/dragdrop/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"label": [
"Drop your file here"
],
"dragoverlabel": [
null
],
"hoverlabel": [
"Drag'n drop or paste here"
],
"fileSelectLabel": [
"Select file"
],
"labelFontSize": [
26
],
"checkOptions": [
[
"promptAmbiguous"
]
],
"inputOptions": [
[
"allowDrop",
"allowPaste",
"allowFileInput"
]
]
}
],
"vars": [
[
{
"filter": "ext",
"extension": "zip",
"filetype": "buffer",
"type": "",
"variable": "file"
},
{
"filter": "ext",
"extension": "xlsx",
"filetype": "buffer",
"type": "",
"variable": "xlsxFile"
},
{
"filter": "ext",
"extension": "csv",
"filetype": "text",
"type": "",
"variable": "csvFile"
}
]
],
"string_general": [
{
"askFilename": [
[]
]
}
],
"string": [
[
{
"filter": "ext",
"extension": "*",
"type": "",
"variable": "str"
}
]
],
"photo": [
[
{
"variable": "photo"
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 92,
"top": 36
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 123,
"top": 23
},
"size": {
"width": 24,
"height": 23
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 58,
"top": 18
},
"size": {
"width": 24,
"height": 23
},
"zIndex": 0,
"display": true,
"title": "Upload your data",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 30,
"vars_out": [
{
"event": "onRead",
"rel": "data",
"jpath": [],
"name": "droppedData"
}
],
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Upload your data",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"\nlet actionName, actionValue;\nlet data = [];\nlet customMethod;\n\nswitch(this.variable) {\n case 'droppedData':\n actionName = 'droppedData';\n actionValue = API.getData(actionName).resurrect();\n break\n default:\n actionName = this.action.name;\n actionValue = this.action.value;\n}\n\nswitch(actionName) {\n case 'droppedData':\n \n //var zipFile = actionValue;\n //var jsZip = new JSZip();\n //let zip = await jsZip.loadAsync(actionValue.content);\n //let res = await zip.files['rangesExplorer.data.json'].async('string');\n \n //API.createData('res', JSON.parse(res));\n //console.log('zip executed');\n \n switch (String(Object.keys(actionValue))) {\n case 'parseXlsx':\n var metadata = [];\n xlsxParser.fromDataAsync(actionValue.content).then((result) => {\n var sheets = result.sheets();\n var template = {}, temp = {};\n for (let sheet of sheets) {\n let name = sheet.name().toLowerCase().replace(/\\s/g, '');\n template[name] = {};\n temp[name] = sheet;\n let currentSheet = template[name];\n let minCol = sheet.row(1).minUsedColumnNumber();\n let maxCol = sheet.row(1).maxUsedColumnNumber() + 1;\n let headers = sheet.row(1)._cells.map((cell) => cell._value.replace(/\\s/g, ''));\n for (let i = minCol; i < maxCol; i++) {\n currentSheet[headers[i]] = null;\n }\n }\n temp.main.forEachExistingRow((_, i) => {\n metadata[i] = JSON.parse(JSON.stringify(template));\n for (let key in template) {\n let sheet = temp[key];\n let currentMetadata = metadata[i];\n let currentSheet = currentMetadata[key];\n let column = 1;\n if (sheet.row(i)._cells.length === 0) return;\n for (let header in currentSheet) {\n currentSheet[header] = sheet.row(i)._cells[column++]._value;\n }\n }\n })\n metadata = metadata.slice(2);\n var metadataList = {};\n metadata.forEach((m, i, array) => {\n let highlight = Math.random();\n let key = m.main.SampleID.replace(/\\./g, '_').toLowerCase();\n m._highlight = highlight;\n metadataList[key] = {\n index: i,\n _highlight: highlight\n }\n return;\n });\n \n API.createData('metadataList', metadataList);\n API.createData('metadata', metadata);\n });\n break;\n \n case 'csvFile':\n customMethod = Papa.parse(actionValue.csvFile.content, {\n header: true,\n delimiter: \",\"\n });\n \n //API.createData('customMethod', data);\n extractCSV(customMethod);\n break;\n }\n \n case 'download':\n var string = \",Creatinine,Creatine,Glucose,Alanine,Lactate,Acetate,Succinate,Citrate,Dimethylamine,Trimethylamine\\nAirwave_1_10_1Custom,10.77096162,0.149213248,0.219200053,,,0.114529688,0.107564026,2.809720562,0.290457802,0.001393114\\nAirwave_1_100_1Custom,2.316093057,0.01303475,0.054474036,,,0.031174903,0.039852373,1.039391475,0.073301503,0.001408082\\nAirwave_6_30_1Custom,13.30611001,0.191876443,0.231654052,,,0.060562254,0.052609127,1.318416998,0.441306889,0.008132261\\nAirwave_38_90_1Custom,11.85137551,0.13781424,0.208870282,,,0.05917576,0.033497749,3.370650175,0.257927047,0.001422446\";\n var toDownload = new Blob([string], {type: 'text/plain'});\n fileSaver(toDownload, 'ExampleFile.csv');\n break;\n \n case 'downloadTemplate':\n var string = \",Creatinine,Creatine,Glucose,Alanine,Lactate,Acetate,Succinate,Citrate,Dimethylamine,Trimethylamine,Betaine,Glycine,Formate,Methylnicotinamide,Dimethylglycine,Taurine,Hippurate,Hydroxybutyric_acid,Valine,Methylhistidine,Sarcosine,Trigonelline,Tartrate,Guanidinoacetate,Ethanol,Paracetamol,Paracetamol_glucuronide,X1_Hydroxyisovalerate,X3_Hydroxyisovalerate,Isoleucine,Leucine,X4_Hydroxyphenylacetate,Glutamine,Glycolate,X3_Aminoisobutyrate,Tyrosine,Pantothenic_acid,X4_Hydroxyhippuric_acid\\nAirwave_1_10_1,10.77096162,0.149213248,0.219200053,0.46928622,0.151093488,0.114529688,0.107564026,2.809720562,0.290457802,0.001393114,0.157630721,0.85743617,0.117838248,0.08022949,0.050912889,1.631998796,0.801086358,0,0.054591478,0,0,0.12843978,0.056903813,0.561631098,0,0,0,0.001524958,0.08380798,0.012319695,0.054196726,0.079207377,0,0.62164627,0.166112223,0,0.096905673,0\";\n var toDownload = new Blob([string], {type: 'text/plain'});\n fileSaver(toDownload, 'TemplateFile.csv');\n break;\n \n}\n\nconsole.log('parse csv executed with action: ' + actionName);\n\n\nfunction extractCSV(customMethod) {\n //var customMethod = API.getData('customMethod').resurrect();\n var customDescriptors = getDescriptors(customMethod);\n console.log(customDescriptors)\n var customData = cleanData(customMethod);\n console.log(customData)\n var customName = customData.map(d => d.sampleid);\n console.log(customName)\n let custom = ({customName: customName, customData: customData});\n API.createData('customData', custom);\n \n let data = API.getData('selectedData');\n let metadata = API.getData('selectedMetadata');\n \n //let customData = API.getData('customData').customData;\n //let customName = API.getData('customData').customName;\n \n customData.map((x, i) => data.push(completeCustomData(data, x, customName[i])));\n API.createData('selectedData', data);\n console.log(data.length);\n \n customData.map((x, i) => metadata.push(completeCustomMetadata(metadata, customName[i])));\n API.createData('selectedMetadata', metadata);\n console.log(metadata.length);\n \n API.switchToLayer(\"Default layer\");\n\n}\n\nfunction getDescriptors(input) {\n let result = [];\n for (let i of input.meta.fields) {\n if (i === '') continue;\n let name = i.replace(/\\./g, '_').toLowerCase();\n result.push({\n name,\n jpath: 'element.' + name,\n });\n }\n return result;\n}\n\nfunction cleanData(input, factor = 1) {\n var data = JSON.parse(JSON.stringify(input.data));\n if (input.errors.length > 0) {\n let errors = input.errors.filter((a) => a.row !== undefined);\n errors.sort((a, b) => a.row + b.row).forEach((e) => {\n data.splice(e.row, 1);\n });\n }\n \n return data.map((e, index) => {\n let result = {}\n let keys = Object.keys(e);\n for (let i = 1; i < keys.length; i++) {\n let name = keys[i].replace(/\\./g, '_').toLowerCase();\n result[name] = Number(e[keys[i]]) * factor;\n };\n result['sampleid'] = e[''].replace(/\\./g, '_').toLowerCase();;\n return result;\n })\n}\n\nfunction clone(input) {\n return JSON.parse(JSON.stringify(input));\n}\n\nfunction completeCustomData(data, custom, customName) {\n let result = {};\n let labels = Object.keys(data[0]);\n let customKeys = Object.keys(custom).map(x => x.toLowerCase());\n let labelsLC = labels.map(x => x.toLowerCase());\n labelsLC.map((x, i) => (customKeys.indexOf(x) != -1) ? result[labels[i]] = custom[x] : result[labels[i]] = 0);\n result[\"_highlight\"] = data.length + 1;\n result[\"_row\"] = customName;\n return result;\n}\n\nfunction completeCustomMetadata(metadata, customName) {\n let result = {};\n let labels = Object.keys(metadata[0]);\n labels.map((x, i) => result[labels[i]] = null);\n result[\"SampleID\"] = customName;\n result[\"_highlight\"] = metadata.length + 1;\n result[\"_row\"] = customName;\n return result;\n}\n\nfunction clone(input) {\n return JSON.parse(JSON.stringify(input));\n}\n\n"
]
}
],
"libs": [
[
{
"lib": "jszip",
"alias": "JSZip"
},
{
"lib": "xlsxParser",
"alias": "xlsxParser"
},
{
"lib": "Papa-parser",
"alias": "Papa"
},
{
"lib": "file-saver",
"alias": "fileSaver"
}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 130
},
"size": {
"width": 60,
"height": 16
},
"zIndex": 0,
"display": true,
"title": "Download / upload executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 79,
"top": 47
},
"size": {
"width": 68,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 79,
"top": 26
},
"size": {
"width": 68,
"height": 22
},
"zIndex": 0,
"display": false,
"title": "Download / upload executor",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
}
},
"id": 31,
"vars_in": [
{
"rel": "inputValue",
"name": "droppedData"
}
],
"actions_in": [
{
"rel": "execute",
"name": "download"
},
{
"rel": "execute",
"name": "extractCSV"
},
{
"rel": "execute",
"name": "downloadTemplate"
}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences",
"Show fullscreen"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download / upload executor",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Download example file"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"download"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 5
},
"size": {
"width": 20,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 15,
"top": 18
},
"size": {
"width": 20,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Download example file",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 32,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "download"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download example file",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 109,
"top": 47
},
"size": {
"width": 25,
"height": 37
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 33,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;3</span></p>\n\n<p><span style=\"font-size:12px\">It may take a while to read and extract your data. If successful you will be redirected to the main panel of this application that is &quot;Browser&quot;.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">You can use the following button to navigate into the application.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Browser allows to browse the data and is the default or landing layer.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Spectra allows you to select samples and see the original spectra.</span></p>\n\n<p>&nbsp;</p>\n\n<p><span style=\"font-size:12px\">Upload allows you to upload your custom data.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 9,
"top": 48
},
"size": {
"width": 26,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 34,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;1</span></p>\n\n<p><span style=\"font-size:12px\">First, download the example file (CSV format). Open it with MS Excel or LibreOffice and add the values corresponding to the metabolites. Add as many rows as necessary but, please, do not alter the column names. Columns can be deleted if unnecessary, except the first one that should contain a unique identifier for each sample.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/edition/rich_text/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"editable": [
[
"isEditable"
]
],
"debouncing": [
0
],
"modifyInVariable": [
[]
],
"storeInView": [
[
"yes"
]
],
"autoHeight": [
[]
],
"bgColor": [
[
255,
255,
255,
1
]
],
"postit": [
[]
],
"html": [
[
"yes"
]
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 57,
"top": 48
},
"size": {
"width": 26,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Upload"
}
},
"id": 35,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"richtext": "<p><span style=\"font-size:104px\">&nbsp; &nbsp;2</span></p>\n\n<p><span style=\"font-size:12px\">Once done, save the file in CSV format and drop it into the area for that purpose. You can also click in the area to display the file selector tool of your OS.</span></p>\n",
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Download template file"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"downloadTemplate"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 124,
"top": 5
},
"size": {
"width": 20,
"height": 15
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 15,
"top": 27
},
"size": {
"width": 20,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "Download example file",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "help"
}
},
"id": 36,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "downloadTemplate"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Download example file",
"zindex": 0
},
{
"url": "modules/types/client_interaction/code_executor/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"display": [
[
"editor",
"buttons"
]
],
"execOnLoad": [
[]
],
"asyncAwait": [
[
"top"
]
],
"script": [
"let a = API.getData('data');\nfunction test(){\n let errorMessage = \"3dd\";\n console.log(errorMessage);\n API.createData('errorMessage', errorMessage);\n}\nsetTimeout(test, 100);"
]
}
],
"libs": [
[
{}
]
],
"buttons": [
[
{
"name": "button1",
"label": "Execute",
"hide": [],
"disable": []
}
]
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 65,
"top": 101
},
"size": {
"width": 54,
"height": 26
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Upload"
}
},
"id": 37,
"vars_in": [
{}
],
"actions_in": [
{}
],
"vars_out": [
{
"jpath": []
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 0
},
{
"url": "modules/types/client_interaction/button_action/",
"configuration": {
"sections": {},
"groups": {
"group": [
{
"toggle": [
"click"
],
"label": [
"Reset Selection"
],
"onLabel": [
"Toggle action off"
],
"offLabel": [
"Toggle action on"
],
"title": [
""
],
"onColor": [
[
0,
0,
0,
1
]
],
"offColor": [
[
0,
0,
0,
1
]
],
"startState": [
"off"
],
"text": [
"reset"
],
"askConfirm": [
[]
],
"confirmText": [
"Are you sure?"
],
"okLabel": [
"Ok"
],
"cancelLabel": [
"Cancel"
],
"content": [
""
],
"contentType": [
"content"
],
"maskOpacity": [
0.6
]
}
]
}
},
"layers": {
"Default layer": {
"position": {
"left": 131,
"top": 49
},
"size": {
"width": 12,
"height": 6
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": false,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 30,
"top": 86
},
"size": {
"width": 16,
"height": 7
},
"zIndex": 0,
"display": true,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "spectra"
},
"help": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "help"
},
"Upload": {
"position": {
"left": 0,
"top": 0
},
"size": {
"width": 20,
"height": 20
},
"zIndex": 0,
"display": false,
"title": "",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Upload"
}
},
"id": 38,
"vars_in": [],
"actions_in": [
{}
],
"actions_out": [
{
"event": "onClick",
"rel": "actionText",
"jpath": [],
"name": "resetSelectionButton"
}
],
"vars_out": [],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "",
"zindex": 35
},
{
"url": "modules/types/science/spectra/spectra_displayer/",
"configuration": {
"sections": {
"graph": [
{
"sections": {},
"groups": {
"graph": [
{
"url": [
""
],
"zoom": [
"xy"
],
"wheelAction": [
"none"
],
"wheelbaseline": [
0
],
"fullOut": [
"both"
],
"legend": [
null
],
"legendOptions": [
[
"isSerieHideable",
"isSerieSelectable"
]
],
"mouseTracking": [
[]
],
"selectScatter": [
[
"yes"
]
],
"independantYZoom": [
[]
]
}
]
}
}
],
"axis": [
{
"sections": {},
"groups": {
"xAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
"Loading X"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"axismodification": [
"none"
]
}
],
"yAxis": [
{
"checkboxes": [
[
"display"
]
],
"label": [
"Loading Y"
],
"beforeSpacing": [
"0"
],
"afterSpacing": [
0
],
"min": [
""
],
"max": [
""
],
"nbTicksPrimary": [
5
],
"fitToAxisOnFromTo": [
[]
]
}
]
}
}
],
"series": [
{
"sections": {},
"groups": {
"series": [
{
"overflow": [
[]
],
"stackVerticalSpacing": [
0
]
}
]
}
}
],
"variables": [
{
"sections": {},
"groups": {
"variables": [
[
{
"variable": "pcaResult",
"axis": "0",
"adaptTo": "none",
"plotcolor": [
255,
1,
12,
1
],
"strokewidth": "2",
"strokestyle": "2",
"plotcontinuous": "discrete",
"peakpicking": [],
"markers": [
"markers"
],
"markerShape": "1",
"markerSize": 2,
"normalize": "none",
"optimizeSlots": [],
"tracking": []
}
]
]
}
}
],
"misc": [
{
"sections": {},
"groups": {
"misc": [
{
"highlightOptions": [
"{}"
]
}
]
}
}
]
},
"groups": {}
},
"layers": {
"Default layer": {
"position": {
"left": 83,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"admin": {
"position": {
"left": 116,
"top": 38
},
"size": {
"width": 29,
"height": 24
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "admin"
},
"spectra": {
"position": {
"left": 0,
"top": 41
},
"size": {
"width": 39,
"height": 40
},
"zIndex": 0,
"display": true,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"help": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
},
"Upload": {
"position": {
"left": 57,
"top": 23
},
"size": {
"width": 29,
"height": 27
},
"zIndex": 0,
"display": false,
"title": "Loadings",
"bgColor": [
255,
255,
255,
0
],
"wrapper": true,
"created": true,
"name": "Default layer"
}
},
"id": 39,
"vars_in": [
{
"rel": "chart",
"name": "pcaResultLoadings"
}
],
"actions_in": [
{}
],
"vars_out": [
{
"event": "onSelectScatter",
"rel": "selectedData",
"jpath": [],
"name": "selectedMarkers"
}
],
"actions_out": [
{
"jpath": []
}
],
"toolbar": {
"custom": [
[
{
"title": "",
"icon": "",
"action": "",
"position": "begin",
"color": [
100,
100,
100,
1
]
}
]
],
"common": [
{
"toolbar": [
[
"Open Preferences"
]
]
}
]
},
"css": [
{
"fontSize": [
""
],
"fontFamily": [
""
]
}
],
"title": "Loadings",
"zindex": 0
}
],
"variables": [
{
"varname": "data",
"jpath": [
"data"
]
},
{
"varname": "spec",
"jpath": [
"spec"
]
}
],
"aliases": [
{
"path": "https://www.lactame.com/lib/spectra-data/3.2.4/spectra-data.min",
"alias": "SD"
},
{
"path": "https://www.lactame.com/lib/nmr-predictor/1.0.8/nmr-predictor.min",
"alias": "Predictor"
},
{
"path": "https://www.lactame.com/lib/openchemlib/4.6.2/openchemlib-full",
"alias": "OCL"
},
{
"path": "https://www.lactame.com/lib/ml/HEAD/ml",
"alias": "ML"
},
{
"path": "https://www.lactame.com/github/cheminfo-js/visualizer-helper/3ffac8f5646dd4231c1cb33cebae970e5ee0d503/",
"alias": "vh"
},
{
"path": "https://www.lactame.com/lib/image-js/0.9.5/image.min",
"alias": "IJS"
},
{
"path": "components/papa-parse/papaparse.min",
"alias": "Papa-parser"
},
{
"path": "https://dl.dropboxusercontent.com/s/ky06573iww07wnd/jerzy.js?dl=0",
"alias": "jerzy"
},
{
"path": "https://dl.dropboxusercontent.com/s/7npg0288cesrmhu/timsort.js?dl=0",
"alias": "timsort"
},
{
"path": "https://dl.dropboxusercontent.com/s/100bq1kwk27yvyj/xlsx-populate.js?dl=0",
"alias": "xlsxParser"
}
],
"configuration": {
"title": "ranges explorer 0.5.0"
},
"actionscripts": [
{
"sections": {},
"groups": {
"action": [
{
"name": [
null
],
"script": [
null
]
}
]
}
}
],
"init_script": [
{
"sections": {},
"groups": {
"general": [
{
"script": [
"\nAPI.loading('load','Please wait while we compute basic statistics for the chosen data');\n\n// you need to leave some time to display the message\n// we use setImmediate to achieve this\n\nsetImmediate(loadData);\n\nasync function loadData() {\n \n setTimeout(selectDataSets, 100);\n setTimeout(selectData, 10000);\n API.stopLoading('load');\n}\n\nAPI.createData('pcaPlot', {'pcx': 1, 'pcy': 2, 'numberOfEigenVectors': 3})\n\nfunction selectDataSets() {\n let data = API.getData('data');\n API.createData('selectedMetadata', data[0].metadata);\n API.createData('selectedDataSets', data[0].data);\n}\n\nfunction selectData() {\n let data = API.getData('selectedDataSets');\n API.createData('selectedData', data[0].data);\n}\n\n\n\n\n\n"
]
}
]
}
}
],
"custom_filters": [
{
"sections": {
"modules": [
{
"sections": {},
"groups": {
"modules": [
[
{}
]
]
}
}
],
"filtersLib": [
{
"sections": {},
"groups": {
"filters": [
[
{}
]
]
}
}
],
"filters": [
{
"sections": {},
"groups": {
"filter": [
{
"name": [
null
],
"script": [
null
]
}
],
"libs": [
[
{}
]
]
}
}
]
},
"groups": {}
}
],
"actionfiles": [
{
"sections": {},
"groups": {
"action": [
[
{}
]
]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment