lynxkite / examples /Bio Cypher demo.lynxkite.json
darabos's picture
Preserve order of inputs, outputs, and params.
05891f5
{
"edges": [
{
"id": "Import CSV 1 Parse SMILES 1",
"source": "Import CSV 1",
"sourceHandle": "output",
"target": "Parse SMILES 1",
"targetHandle": "bundle"
},
{
"id": "Parse SMILES 1 Graph from molecule similarity 1",
"source": "Parse SMILES 1",
"sourceHandle": "output",
"target": "Graph from molecule similarity 1",
"targetHandle": "bundle"
},
{
"id": "Graph from molecule similarity 1 Visualize graph 1",
"source": "Graph from molecule similarity 1",
"sourceHandle": "output",
"target": "Visualize graph 1",
"targetHandle": "graph"
},
{
"id": "Graph from molecule similarity 1 Cypher 1",
"source": "Graph from molecule similarity 1",
"sourceHandle": "output",
"target": "Cypher 1",
"targetHandle": "bundle"
},
{
"id": "Cypher 1 View tables 1",
"source": "Cypher 1",
"sourceHandle": "output",
"target": "View tables 1",
"targetHandle": "bundle"
}
],
"env": "LynxKite Graph Analytics",
"nodes": [
{
"data": {
"__execution_delay": 0.0,
"collapsed": null,
"display": null,
"error": null,
"input_metadata": [],
"meta": {
"color": "orange",
"inputs": [],
"name": "Import CSV",
"outputs": [
{
"name": "output",
"position": "right",
"type": {
"type": "None"
}
}
],
"params": [
{
"default": null,
"name": "filename",
"type": {
"type": "<class 'str'>"
}
},
{
"default": "<from file>",
"name": "columns",
"type": {
"type": "<class 'str'>"
}
},
{
"default": "<auto>",
"name": "separator",
"type": {
"type": "<class 'str'>"
}
}
],
"type": "basic"
},
"params": {
"columns": "<from file>",
"filename": "uploads/drug_target_data_sample.csv",
"separator": "<auto>"
},
"status": "done",
"title": "Import CSV"
},
"dragHandle": ".bg-primary",
"height": 200.0,
"id": "Import CSV 1",
"position": {
"x": 300.92214591096035,
"y": 1018.8292637889027
},
"type": "basic",
"width": 200.0
},
{
"data": {
"display": null,
"error": null,
"input_metadata": [
{
"dataframes": {
"df": {
"columns": [
"ACCESSION",
"ACTION_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"ACT_SOURCE_URL",
"ACT_TYPE",
"ACT_UNIT",
"ACT_VALUE",
"DRUG_NAME",
"GENE",
"INN",
"InChI",
"InChIKey",
"MOA",
"MOA_SOURCE",
"MOA_SOURCE_URL",
"ORGANISM",
"RELATION",
"SMILES",
"STRUCT_ID",
"SWISSPROT",
"TARGET_CLASS",
"TARGET_NAME",
"TDL",
"Unnamed: 0"
]
}
},
"other": {},
"relations": []
}
],
"meta": {
"color": "orange",
"inputs": [
{
"name": "bundle",
"position": "left",
"type": {
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
}
}
],
"name": "Parse SMILES",
"outputs": [
{
"name": "output",
"position": "right",
"type": {
"type": "None"
}
}
],
"params": [
{
"default": "df",
"name": "table",
"type": {
"type": "<class 'str'>"
}
},
{
"default": "SMILES",
"name": "smiles_column",
"type": {
"type": "<class 'str'>"
}
},
{
"default": "mols",
"name": "save_as",
"type": {
"type": "<class 'str'>"
}
}
],
"type": "basic"
},
"params": {
"save_as": "mols",
"smiles_column": "SMILES",
"table": "df"
},
"status": "done",
"title": "Parse SMILES"
},
"dragHandle": ".bg-primary",
"height": 200.0,
"id": "Parse SMILES 1",
"position": {
"x": 580.5892989328847,
"y": 1012.8823965480503
},
"type": "basic",
"width": 200.0
},
{
"data": {
"__execution_delay": 0.0,
"collapsed": null,
"display": null,
"error": null,
"input_metadata": [
{
"dataframes": {
"df": {
"columns": [
"ACCESSION",
"ACTION_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"ACT_SOURCE_URL",
"ACT_TYPE",
"ACT_UNIT",
"ACT_VALUE",
"DRUG_NAME",
"GENE",
"INN",
"InChI",
"InChIKey",
"MOA",
"MOA_SOURCE",
"MOA_SOURCE_URL",
"ORGANISM",
"RELATION",
"SMILES",
"STRUCT_ID",
"SWISSPROT",
"TARGET_CLASS",
"TARGET_NAME",
"TDL",
"Unnamed: 0",
"mols"
]
}
},
"other": {},
"relations": []
}
],
"meta": {
"color": "orange",
"inputs": [
{
"name": "bundle",
"position": "left",
"type": {
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
}
}
],
"name": "Graph from molecule similarity",
"outputs": [
{
"name": "output",
"position": "right",
"type": {
"type": "None"
}
}
],
"params": [
{
"default": "df",
"name": "table",
"type": {
"type": "<class 'str'>"
}
},
{
"default": "mols",
"name": "mols_column",
"type": {
"type": "<class 'str'>"
}
},
{
"default": 10,
"name": "average_degree",
"type": {
"type": "<class 'int'>"
}
}
],
"type": "basic"
},
"params": {
"average_degree": "3",
"mols_column": "mols",
"table": "df"
},
"status": "done",
"title": "Graph from molecule similarity"
},
"dragHandle": ".bg-primary",
"height": 200.0,
"id": "Graph from molecule similarity 1",
"position": {
"x": 926.4337192214458,
"y": 1014.4451876264845
},
"type": "basic",
"width": 200.0
},
{
"data": {
"__execution_delay": 0.0,
"collapsed": null,
"display": {
"animationDuration": 500,
"animationEasingUpdate": "quinticInOut",
"series": [
{
"data": [
{
"id": "0",
"itemStyle": {
"color": "#a6cee3"
},
"label": {
"show": true
},
"name": "phencyclidine",
"symbolSize": 22.360679774997894,
"value": "Torpedo californica",
"x": 0.10782539581500938,
"y": -0.23839701129914528
},
{
"id": "1",
"itemStyle": {
"color": "#1f78b4"
},
"label": {
"show": true
},
"name": "triazolam",
"symbolSize": 22.360679774997894,
"value": "Homo sapiens",
"x": -0.10748868396434766,
"y": 0.19422487376381423
},
{
"id": "2",
"itemStyle": {
"color": "#1f78b4"
},
"label": {
"show": true
},
"name": "gentian violet",
"symbolSize": 22.360679774997894,
"value": "Homo sapiens",
"x": 0.32091925175898867,
"y": 0.37711363327258846
},
{
"id": "3",
"itemStyle": {
"color": "#1f78b4"
},
"label": {
"show": true
},
"name": "ipratropium",
"symbolSize": 22.360679774997894,
"value": "Homo sapiens",
"x": 0.6787440363904107,
"y": -0.24483461144842011
},
{
"id": "4",
"itemStyle": {
"color": "#1f78b4"
},
"label": {
"show": true
},
"name": "deoxycholic acid",
"symbolSize": 22.360679774997894,
"value": "Homo sapiens",
"x": -1.0,
"y": -0.08810688428883728
}
],
"emphasis": {
"focus": "adjacency",
"lineStyle": {
"width": 10
}
},
"label": {
"formatter": "{b}",
"position": "top"
},
"lineStyle": {
"color": "gray",
"curveness": 0.3
},
"links": [
{
"lineStyle": {
"color": "#440154"
},
"source": "3",
"target": "4",
"value": "0.8481012658227848"
},
{
"lineStyle": {
"color": "#3a538b"
},
"source": "0",
"target": "1",
"value": "0.8813559322033898"
},
{
"lineStyle": {
"color": "#3a538b"
},
"source": "0",
"target": "4",
"value": "0.8813559322033898"
},
{
"lineStyle": {
"color": "#26818e"
},
"source": "0",
"target": "3",
"value": "0.9047619047619048"
},
{
"lineStyle": {
"color": "#23898d"
},
"source": "1",
"target": "2",
"value": "0.9090909090909091"
},
{
"lineStyle": {
"color": "#1ea087"
},
"source": "1",
"target": "3",
"value": "0.921875"
},
{
"lineStyle": {
"color": "#3ebc73"
},
"source": "0",
"target": "2",
"value": "0.9375"
},
{
"lineStyle": {
"color": "#4fc369"
},
"source": "1",
"target": "4",
"value": "0.9420289855072463"
},
{
"lineStyle": {
"color": "#9fd938"
},
"source": "2",
"target": "4",
"value": "0.9589041095890412"
},
{
"lineStyle": {
"color": "#fde724"
},
"source": "2",
"target": "3",
"value": "0.9775280898876404"
}
],
"type": "graph"
}
],
"tooltip": {
"show": true
}
},
"error": null,
"input_metadata": [
{
"dataframes": {
"edges": {
"columns": [
"similarity",
"source",
"target"
]
},
"nodes": {
"columns": [
"ACCESSION",
"ACTION_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"ACT_SOURCE_URL",
"ACT_TYPE",
"ACT_UNIT",
"ACT_VALUE",
"DRUG_NAME",
"GENE",
"INN",
"InChI",
"InChIKey",
"MOA",
"MOA_SOURCE",
"MOA_SOURCE_URL",
"ORGANISM",
"RELATION",
"SMILES",
"STRUCT_ID",
"SWISSPROT",
"TARGET_CLASS",
"TARGET_NAME",
"TDL",
"Unnamed: 0",
"mols"
]
}
},
"other": {},
"relations": [
{
"df": "edges",
"name": null,
"source_column": "source",
"source_key": "id",
"source_table": "nodes",
"target_column": "target",
"target_key": "id",
"target_table": "nodes"
}
]
}
],
"meta": {
"color": "orange",
"inputs": [
{
"name": "graph",
"position": "left",
"type": {
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
}
}
],
"name": "Visualize graph",
"outputs": [],
"params": [
{
"default": null,
"name": "color_nodes_by",
"type": {
"format": "node attribute"
}
},
{
"default": null,
"name": "label_by",
"type": {
"format": "node attribute"
}
},
{
"default": null,
"name": "color_edges_by",
"type": {
"format": "edge attribute"
}
}
],
"type": "visualization"
},
"params": {
"color_edges_by": "similarity",
"color_nodes_by": "ORGANISM",
"label_by": "DRUG_NAME"
},
"status": "done",
"title": "Visualize graph"
},
"dragHandle": ".bg-primary",
"height": 314.0,
"id": "Visualize graph 1",
"position": {
"x": 1254.2277640235457,
"y": 931.9705991370125
},
"type": "visualization",
"width": 407.0
},
{
"data": {
"__execution_delay": 0.0,
"collapsed": null,
"display": null,
"error": null,
"input_metadata": [
{
"dataframes": {
"edges": {
"columns": [
"similarity",
"source",
"target"
]
},
"nodes": {
"columns": [
"ACCESSION",
"ACTION_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"ACT_SOURCE_URL",
"ACT_TYPE",
"ACT_UNIT",
"ACT_VALUE",
"DRUG_NAME",
"GENE",
"INN",
"InChI",
"InChIKey",
"MOA",
"MOA_SOURCE",
"MOA_SOURCE_URL",
"ORGANISM",
"RELATION",
"SMILES",
"STRUCT_ID",
"SWISSPROT",
"TARGET_CLASS",
"TARGET_NAME",
"TDL",
"Unnamed: 0",
"mols"
]
}
},
"other": {},
"relations": [
{
"df": "edges",
"name": null,
"source_column": "source",
"source_key": "id",
"source_table": "nodes",
"target_column": "target",
"target_key": "id",
"target_table": "nodes"
}
]
}
],
"meta": {
"color": "orange",
"inputs": [
{
"name": "bundle",
"position": "left",
"type": {
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
}
}
],
"name": "Cypher",
"outputs": [
{
"name": "output",
"position": "right",
"type": {
"type": "None"
}
}
],
"params": [
{
"default": null,
"name": "query",
"type": {
"format": "textarea"
}
},
{
"default": "result",
"name": "save_as",
"type": {
"type": "<class 'str'>"
}
}
],
"type": "basic"
},
"params": {
"query": "MATCH\n (a {ORGANISM: \"Homo sapiens\"})\n -[r]->\n (b {ORGANISM: \"Homo sapiens\"})\nWHERE\n r.similarity > 0.9\nRETURN a.DRUG_NAME, b.DRUG_NAME",
"save_as": "result"
},
"status": "done",
"title": "Cypher"
},
"dragHandle": ".bg-primary",
"height": 267.0,
"id": "Cypher 1",
"position": {
"x": 1209.2024653849007,
"y": 1567.9825632648467
},
"type": "basic",
"width": 434.0
},
{
"data": {
"__execution_delay": null,
"collapsed": null,
"display": {
"dataframes": {
"edges": {
"columns": [
"source",
"target",
"similarity"
],
"data": [
[
3.0,
4.0,
0.8481012658227848
],
[
0.0,
1.0,
0.8813559322033898
],
[
0.0,
4.0,
0.8813559322033898
],
[
0.0,
3.0,
0.9047619047619048
],
[
1.0,
2.0,
0.9090909090909091
],
[
1.0,
3.0,
0.921875
],
[
0.0,
2.0,
0.9375
],
[
1.0,
4.0,
0.9420289855072463
],
[
2.0,
4.0,
0.9589041095890412
],
[
2.0,
3.0,
0.9775280898876404
]
]
},
"nodes": {
"columns": [
"Unnamed: 0",
"DRUG_NAME",
"STRUCT_ID",
"TARGET_NAME",
"TARGET_CLASS",
"ACCESSION",
"GENE",
"SWISSPROT",
"ACT_VALUE",
"ACT_UNIT",
"ACT_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"RELATION",
"MOA",
"MOA_SOURCE",
"ACT_SOURCE_URL",
"MOA_SOURCE_URL",
"ACTION_TYPE",
"TDL",
"ORGANISM",
"SMILES",
"InChI",
"InChIKey",
"INN",
"mols"
],
"data": [
[
9737,
"phencyclidine",
2121,
"Acetylcholine receptor subunit alpha",
"Ion channel",
"P02710",
"CHRNA1",
"ACHA_TORCA",
6.66,
NaN,
"IC50",
"Displacement of [3H]PCP from nAChR in Torpedo nobiliana electric organs membranes in presence of 100 uM carbachol by scintillation counting method",
"CHEMBL",
"=",
NaN,
"nan",
NaN,
"nan",
"nan",
"nan",
"Torpedo californica",
"C1CCN(CC1)C1(CCCCC1)C1=CC=CC=C1",
"InChI=1S/C17H25N/c1-4-10-16(11-5-1)17(12-6-2-7-13-17)18-14-8-3-9-15-18/h1,4-5,10-11H,2-3,6-9,12-15H2",
"JTJMJGYZQZDUJJ-UHFFFAOYSA-N",
"phencyclidine",
"<rdkit.Chem.rdchem.Mol object at 0x70fb3f748120>"
],
[
12934,
"triazolam",
2729,
"GABA A receptor alpha-3/beta-2/gamma-2",
"Ion channel",
"P18507|P34903|P47870",
"GABRG2|GABRA3|GABRB2",
"GBRG2_HUMAN|GBRA3_HUMAN|GBRB2_HUMAN",
8.876,
NaN,
"Ki",
"nan",
"WOMBAT-PK",
"=",
1.0,
"CHEMBL",
NaN,
"https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL646",
"POSITIVE ALLOSTERIC MODULATOR",
"Tclin|Tclin|Tclin|Tclin|Tclin|Tclin|Tclin|Tclin|Tclin",
"Homo sapiens",
"CC1=NN=C2CN=C(C3=CC(Cl)=CC=C3N12)C1=C(Cl)C=CC=C1",
"InChI=1S/C17H12Cl2N4/c1-10-21-22-16-9-20-17(12-4-2-3-5-14(12)19)13-8-11(18)6-7-15(13)23(10)16/h2-8H,9H2,1H3",
"JOFWLTCLBGQGBO-UHFFFAOYSA-N",
"triazolam",
"<rdkit.Chem.rdchem.Mol object at 0x70fb3f748430>"
],
[
15266,
"gentian violet",
4138,
"D(2) dopamine receptor",
"GPCR",
"P14416",
"DRD2",
"DRD2_HUMAN",
5.975,
NaN,
"Ki",
"DRUGMATRIX: Dopamine D2L radioligand binding (ligand: [3H] Spiperone)",
"DRUG MATRIX",
"=",
NaN,
"nan",
NaN,
"nan",
"nan",
"Tclin",
"Homo sapiens",
"CN(C)C1=CC=C(C=C1)C(C1=CC=C(C=C1)N(C)C)=C1C=CC(C=C1)=[N+](C)C",
"InChI=1S/C25H30N3/c1-26(2)22-13-7-19(8-14-22)25(20-9-15-23(16-10-20)27(3)4)21-11-17-24(18-12-21)28(5)6/h7-18H,1-6H3/q+1",
"LGLFFNDHMLKUMI-UHFFFAOYSA-N",
"gentian violet",
"<rdkit.Chem.rdchem.Mol object at 0x70fb3f7483c0>"
],
[
6488,
"ipratropium",
1475,
"Muscarinic acetylcholine receptor M1",
"GPCR",
"P11229",
"CHRM1",
"ACM1_HUMAN",
9.31,
NaN,
"Ki",
"nan",
"WOMBAT-PK",
"=",
NaN,
"nan",
NaN,
"nan",
"nan",
"Tclin",
"Homo sapiens",
"CC(C)[N+]1(C)[C@H]2CC[C@@H]1C[C@@H](C2)OC(=O)C(CO)C1=CC=CC=C1",
"InChI=1S/C20H30NO3/c1-14(2)21(3)16-9-10-17(21)12-18(11-16)24-20(23)19(13-22)15-7-5-4-6-8-15/h4-8,14,16-19,22H,9-13H2,1-3H3/q+1/t16-,17+,18+,19?,21?",
"OEXHQOGQTVQTAT-BHIXFJMTSA-N",
"ipratropium",
"<rdkit.Chem.rdchem.Mol object at 0x70fb3f7484a0>"
],
[
17453,
"deoxycholic acid",
4988,
"G-protein coupled bile acid receptor 1",
"GPCR",
"Q8TDU6",
"GPBAR1",
"GPBAR_HUMAN",
6.2,
NaN,
"EC50",
"nan",
"IUPHAR",
"=",
NaN,
"nan",
NaN,
"nan",
"AGONIST",
"Tchem",
"Homo sapiens",
"C[C@H](CCC(O)=O)[C@H]1CC[C@H]2[C@@H]3CC[C@@H]4C[C@H](O)CC[C@]4(C)[C@H]3C[C@H](O)[C@]12C",
"InChI=1S/C24H40O4/c1-14(4-9-22(27)28)18-7-8-19-17-6-5-15-12-16(25)10-11-23(15,2)20(17)13-21(26)24(18,19)3/h14-21,25-26H,4-13H2,1-3H3,(H,27,28)/t14-,15-,16-,17+,18-,19+,20+,21+,23+,24-/m1/s1",
"KXGVEGMKQFWNSR-LLQZFEROSA-N",
"deoxycholic acid",
"<rdkit.Chem.rdchem.Mol object at 0x70fb3f748510>"
]
]
},
"result": {
"columns": [
"a.DRUG_NAME",
"b.DRUG_NAME"
],
"data": [
[
"triazolam",
"gentian violet"
],
[
"triazolam",
"ipratropium"
],
[
"triazolam",
"deoxycholic acid"
],
[
"gentian violet",
"deoxycholic acid"
],
[
"gentian violet",
"ipratropium"
]
]
}
},
"other": {},
"relations": [
{
"df": "edges",
"name": null,
"source_column": "source",
"source_key": "id",
"source_table": "nodes",
"target_column": "target",
"target_key": "id",
"target_table": "nodes"
}
]
},
"error": null,
"input_metadata": [
{
"dataframes": {
"edges": {
"columns": [
"similarity",
"source",
"target"
]
},
"nodes": {
"columns": [
"ACCESSION",
"ACTION_TYPE",
"ACT_COMMENT",
"ACT_SOURCE",
"ACT_SOURCE_URL",
"ACT_TYPE",
"ACT_UNIT",
"ACT_VALUE",
"DRUG_NAME",
"GENE",
"INN",
"InChI",
"InChIKey",
"MOA",
"MOA_SOURCE",
"MOA_SOURCE_URL",
"ORGANISM",
"RELATION",
"SMILES",
"STRUCT_ID",
"SWISSPROT",
"TARGET_CLASS",
"TARGET_NAME",
"TDL",
"Unnamed: 0",
"mols"
]
},
"result": {
"columns": [
"a.DRUG_NAME",
"b.DRUG_NAME"
]
}
},
"other": {},
"relations": [
{
"df": "edges",
"name": null,
"source_column": "source",
"source_key": "id",
"source_table": "nodes",
"target_column": "target",
"target_key": "id",
"target_table": "nodes"
}
]
}
],
"meta": {
"color": "orange",
"inputs": [
{
"name": "bundle",
"position": "left",
"type": {
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
}
}
],
"name": "View tables",
"outputs": [],
"params": [
{
"default": 100,
"name": "limit",
"type": {
"type": "<class 'int'>"
}
}
],
"type": "table_view"
},
"params": {
"_tables_open": {
"result": true
},
"limit": 100.0
},
"status": "done",
"title": "View tables"
},
"dragHandle": ".bg-primary",
"height": 295.0,
"id": "View tables 1",
"position": {
"x": 1817.1767094971015,
"y": 1459.025582190881
},
"type": "table_view",
"width": 322.0
}
]
}