diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index dad3e9f8b53ea0ef485fb99bcdfdeb42a173d7fd..f5fabf86897a5932f73b68fe9ea18ead88f5e984 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -178,10 +178,8 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit await this.createNetwork(this.result).then(nw => { return new Promise<any>((resolve, reject) => { - const nodes = nw.nodes; const edges = nw.edges; - this.networkHandler.activeNetwork.inputNetwork = {nodes: nodes, edges: edges}; this.nodeData.nodes = new vis.DataSet(nodes); this.nodeData.edges = new vis.DataSet(edges); @@ -200,6 +198,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit } this.networkHandler.activeNetwork.networkInternal = new vis.Network(container, this.nodeData, options); + if (isBig) { + resolve(nodes); + } this.networkHandler.activeNetwork.networkInternal.once('stabilizationIterationsDone', async () => { if (!this.drugstoneConfig.config.physicsOn || this.networkHandler.activeNetwork.isBig()) { this.networkHandler.activeNetwork.updatePhysicsEnabled(false); @@ -444,7 +445,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit this.effects = []; const network = result.network; network.nodes = [...new Set<string>(network.nodes)]; - const details = attributes.details || {}; const nodeIdMap = {}; // @ts-ignore diff --git a/src/index.html b/src/index.html index daf754857032d21c9915a72b85ff4ddef4828a40..250c64d3fc666c323d06ebbae9ca3bd85566acf8 100644 --- a/src/index.html +++ b/src/index.html @@ -135,9 +135,9 @@ menu<br> <!-- </drugst-one>--> <drugst-one id="netexp1" pluginId="2" - groups='{"nodeGroups":{"node":{"type":"Gene","color":"#0000FF","font":{"color":"#ffffff"},"groupName":"Node","shape":"ellipse"}, "gene":{"type":"Gene","color":"#CD5C5C","font":{"color":"#000000"},"groupName":"Gene","shape":"ellipse"}}}' + groups='{"nodeGroups":{"node":{"type":"Gene","color":"#0000FF","font":{"color":"#ffffff"},"groupName":"Node","shape":"ellipse"}, "protein":{"type":"Gene","color":"#CD5C5C","font":{"color":"#000000"},"groupName":"Gene","shape":"ellipse"}}}' config='{"showSimpleAnalysis": true, "selfReferences": false, "licensedDatasets": false,"physicsOn":false,"identifier":"uniprot","title":"Breast cancer example network","nodeShadow":true,"edgeShadow":false,"autofillEdges":true,"showLegend":true}' - network='{"nodes":[{"id":"P01137", "group": "gene", "label":"P01137"},{"id":"Q13873","group":"gene","label":"Q13873"},{"id":"P37023","group":"gene","label":"P37023"},{"id":"J9PH39","group":"gene","label":"J9PH39"},{"id":"P51168","group":"gene","label":"P51168"},{"id":"P27037","group":"gene","label":"P27037"},{"id":"P17813","group":"gene","label":"P17813"}],"edges":[]}'> + network='{"nodes":[{"id":"P01137","group":"protein","label":"P01137"},{"id":"A0A499FJK2","group":"protein","label":"A0A499FJK2"},{"id":"Q9Y6G5","group":"protein","label":"Q9Y6G5"},{"id":"Q13873","group":"protein","label":"Q13873"},{"id":"P37023","group":"protein","label":"P37023"},{"id":"B7Z6Y5","group":"protein","label":"B7Z6Y5"},{"id":"J9PH39","group":"protein","label":"J9PH39"},{"id":"P51168","group":"protein","label":"P51168"},{"id":"P27037","group":"protein","label":"P27037"},{"id":"P17813","group":"protein","label":"P17813"},{"id":"Q9NSJ5","group":"protein","label":"Q9NSJ5"},{"id":"Q9UK05","group":"protein","label":"Q9UK05"},{"id":"B2R812","group":"protein","label":"B2R812"},{"id":"Q14CN2","group":"protein","label":"Q14CN2"},{"id":"B2RC63","group":"protein","label":"B2RC63"},{"id":"Q13705","group":"protein","label":"Q13705"},{"id":"D3DPA4","group":"protein","label":"D3DPA4"},{"id":"F5GX88","group":"protein","label":"F5GX88"},{"id":"Q9UJW0","group":"protein","label":"Q9UJW0"},{"id":"P12318","group":"protein","label":"P12318"},{"id":"P12643","group":"protein","label":"P12643"},{"id":"Q5T9B9","group":"protein","label":"Q5T9B9"},{"id":"P37088","group":"protein","label":"P37088"},{"id":"A0A0S2Z5D4","group":"protein","label":"A0A0S2Z5D4"},{"id":"A0A024R730","group":"protein","label":"A0A024R730"},{"id":"P13569","group":"protein","label":"P13569"},{"id":"Q75ME0","group":"protein","label":"Q75ME0"},{"id":"P51170","group":"protein","label":"P51170"},{"id":"Q04771","group":"protein","label":"Q04771"},{"id":"P19438","group":"protein","label":"P19438"},{"id":"A0A024R878","group":"protein","label":"A0A024R878"},{"id":"A5X2V1","group":"protein","label":"A5X2V1"},{"id":"Q96CG0","group":"protein","label":"Q96CG0"},{"id":"Q16623","group":"protein","label":"Q16623"}],"edges":[{"from":"DCTN4","to":"CFTR"},{"from":"STX1A","to":"SCNN1B","group":"default"},{"from":"SCNN1A","to":"SCNN1G","group":"default"},{"from":"SCNN1B","to":"SCNN1G","group":"default"}]}'> </drugst-one> </div> <br>