diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index b8b551a58f21b69b8ee0857e7b08e71711b29022..68f411883b97a8a1d98e9d7da925d85aa854c260 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -190,8 +190,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit // Create const {nodes, edges} = this.createNetwork(this.result); - console.log(nodes) - console.log(edges) this.setInputNetwork.emit({nodes: nodes, edges: edges}); this.nodeData.nodes = new vis.DataSet(nodes); this.nodeData.edges = new vis.DataSet(edges); @@ -447,11 +445,12 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit }) for (const nodeId of Object.keys(details)) { const nodeDetails = details[nodeId] + console.log(nodeId) nodeDetails.id = nodeDetails.id ? nodeDetails.id : (typeof nodeDetails.drugstoneId === 'string' ? nodeDetails.drugstoneId : nodeDetails.drugstoneId[0]); if (nodeDetails.drugstoneId && nodeDetails.drugstoneType === 'protein') { // node is protein from database, has been mapped on init to backend protein from backend // or was found during analysis - nodeDetails.group = nodeDetails.group ? nodeDetails.group : 'foundNode'; + nodeDetails.group = result.targetNodes && result.targetNodes.indexOf(nodeId) !== -1 ? 'foundNode' : (nodeDetails.group ? nodeDetails.group : 'default' ); nodeDetails.label = nodeDetails.label ? nodeDetails.label : nodeDetails[identifier]; nodeDetails.id = nodeDetails[identifier][0] ? nodeDetails[identifier][0] : nodeDetails.id; this.proteins.push(nodeDetails); @@ -466,6 +465,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit } // further analysis and the button function can be used to highlight seeds // option to use scores[node] as gradient, but sccores are very small + console.log(nodeDetails) nodes.push(NetworkSettings.getNodeStyle(nodeDetails as Node, config, false, false, 1)) } @@ -477,7 +477,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit e.to = e.to[0] === 'p' ? nodeIdMap[e.to] : e.to edges.push(e); } - console.log(edges) return { nodes, edges, diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.ts b/src/app/dialogs/launch-analysis/launch-analysis.component.ts index 7d1474f8bade65e7d86a193580b0dd77cb50a69c..90f8701d52772e8d218840ae80b2d75d35523a26 100644 --- a/src/app/dialogs/launch-analysis/launch-analysis.component.ts +++ b/src/app/dialogs/launch-analysis/launch-analysis.component.ts @@ -105,7 +105,7 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges { public async startTask() { // all nodes in selection have drugstoneId, hence exist in the backend - const seeds = this.analysis.getSelection().map((item) => item.data.drugstoneId).flatMap(l => l) + const seeds = this.analysis.getSelection().map((item) => item.id); const seedsFiltered = seeds.filter(el => el != null); const parameters: any = { seeds: seedsFiltered, diff --git a/src/app/services/analysis/analysis.service.ts b/src/app/services/analysis/analysis.service.ts index 14c7938e0ecae2756e4b5cd9c264e25a98595bc9..07e5dbf9c82c8288983b3598a04c426ff8a7de31 100644 --- a/src/app/services/analysis/analysis.service.ts +++ b/src/app/services/analysis/analysis.service.ts @@ -232,7 +232,7 @@ export class AnalysisService { licenced: config.licencedDatasets, config: config, input_network: network, - seeds: isSuper ? network.nodes.filter(n => n.drugstoneId && n.drugstoneId[0] === 'p').map(n => n.drugstoneId) : this.getSelection().map((i) => i.id), + seeds: isSuper ? network.nodes.filter(n => n.drugstoneId && n.drugstoneId[0] === 'p').map(n => n.id) : this.getSelection().map((i) => i.id), }; const resp = await this.http.post<any>(`${environment.backend}task/`, { algorithm: isSuper ? 'super' : 'quick', diff --git a/src/index.html b/src/index.html index 28222a51d25e176e67e7058ad71e8d9a209d5ccd..48802835e845f8da9581ebc72c1f9e539e0a61a2 100644 --- a/src/index.html +++ b/src/index.html @@ -45,8 +45,8 @@ <div> <i>Protein-Protein Interactions</i> <select name="Protein-Protein Interactions" onchange="applyDataset()" id="ppi-dataset"> - <option value="STRING">STRING</option> <option value="NeDRex">NeDRex</option> + <option value="STRING">STRING</option> <option value="biogrid">BioGRID</option> <option value="iid">IID</option> <option value="IntAct">IntAct</option>