Skip to content
Snippets Groups Projects
Commit 07f79b94 authored by AndiMajore's avatar AndiMajore
Browse files

fixed issue where big networks were not rendered

parent 10f9dad1
No related branches found
No related tags found
No related merge requests found
...@@ -178,10 +178,8 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit ...@@ -178,10 +178,8 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
await this.createNetwork(this.result).then(nw => { await this.createNetwork(this.result).then(nw => {
return new Promise<any>((resolve, reject) => { return new Promise<any>((resolve, reject) => {
const nodes = nw.nodes; const nodes = nw.nodes;
const edges = nw.edges; const edges = nw.edges;
this.networkHandler.activeNetwork.inputNetwork = {nodes: nodes, edges: edges}; this.networkHandler.activeNetwork.inputNetwork = {nodes: nodes, edges: edges};
this.nodeData.nodes = new vis.DataSet(nodes); this.nodeData.nodes = new vis.DataSet(nodes);
this.nodeData.edges = new vis.DataSet(edges); this.nodeData.edges = new vis.DataSet(edges);
...@@ -200,6 +198,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit ...@@ -200,6 +198,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
} }
this.networkHandler.activeNetwork.networkInternal = new vis.Network(container, this.nodeData, options); this.networkHandler.activeNetwork.networkInternal = new vis.Network(container, this.nodeData, options);
if (isBig) {
resolve(nodes);
}
this.networkHandler.activeNetwork.networkInternal.once('stabilizationIterationsDone', async () => { this.networkHandler.activeNetwork.networkInternal.once('stabilizationIterationsDone', async () => {
if (!this.drugstoneConfig.config.physicsOn || this.networkHandler.activeNetwork.isBig()) { if (!this.drugstoneConfig.config.physicsOn || this.networkHandler.activeNetwork.isBig()) {
this.networkHandler.activeNetwork.updatePhysicsEnabled(false); this.networkHandler.activeNetwork.updatePhysicsEnabled(false);
...@@ -444,7 +445,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit ...@@ -444,7 +445,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
this.effects = []; this.effects = [];
const network = result.network; const network = result.network;
network.nodes = [...new Set<string>(network.nodes)]; network.nodes = [...new Set<string>(network.nodes)];
const details = attributes.details || {}; const details = attributes.details || {};
const nodeIdMap = {}; const nodeIdMap = {};
// @ts-ignore // @ts-ignore
......
...@@ -135,9 +135,9 @@ menu<br> ...@@ -135,9 +135,9 @@ menu<br>
<!-- </drugst-one>--> <!-- </drugst-one>-->
<drugst-one id="netexp1" <drugst-one id="netexp1"
pluginId="2" 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}' 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> </drugst-one>
</div> </div>
<br> <br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment