From 237d274c6a3ccecd6846a3523a8f8054f10a6323 Mon Sep 17 00:00:00 2001 From: Michael Hartung <michi@Michaels-MacBook-Pro.local> Date: Mon, 23 Aug 2021 18:31:41 +0200 Subject: [PATCH] Versioning of datasets --- .../analysis-panel/analysis-panel.component.html | 8 ++++++++ .../analysis-panel/analysis-panel.component.ts | 9 +++++---- src/index.html | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/app/components/analysis-panel/analysis-panel.component.html b/src/app/components/analysis-panel/analysis-panel.component.html index cde8b7b4..f282961b 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -29,6 +29,14 @@ <div> <table class="table is-narrow"> <tbody> + <tr *ngIf="result && result.geneInteractionDataset !== undefined"> + <td>Protein-Protein Interaction Dataset</td> + <td>{{result.geneInteractionDataset.name}} (Version {{result.geneInteractionDataset.version}})</td> + </tr> + <tr *ngIf="result && result.drugInteractionDataset !== undefined"> + <td>Protein-Drug Interaction Dataset</td> + <td>{{result.drugInteractionDataset.name}} (Version {{result.drugInteractionDataset.version}})</td> + </tr> <tr *ngIf="task.info.parameters.resultSize !== undefined"> <td>Result Size</td> <td>{{task.info.parameters.resultSize}}</td> diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index f12a9090..504919c7 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -77,9 +77,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { @Output() visibleItems = new EventEmitter<[any[], [Node[], Tissue], NodeInteraction[]]>(); public task: Task | null = null; + public result: any = null; public myConfig: IConfig = JSON.parse(JSON.stringify(defaultConfig)); - public network: any; private nodeData: { nodes: any, edges: any } = {nodes: null, edges: null}; private drugNodes: any[] = []; @@ -165,8 +165,9 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { } if (this.task && this.task.info.done) { - const result = await this.netex.getTaskResult(this.token); - const nodeAttributes = result.nodeAttributes || {}; + this.result = await this.netex.getTaskResult(this.token); + console.log(this.result) + const nodeAttributes = this.result.nodeAttributes || {}; this.seedMap = nodeAttributes.isSeed || {}; @@ -177,7 +178,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { this.showDrugs = false; // Create - const {nodes, edges} = this.createNetwork(result); + const {nodes, edges} = this.createNetwork(this.result); this.nodeData.nodes = new vis.DataSet(nodes); this.nodeData.edges = new vis.DataSet(edges); diff --git a/src/index.html b/src/index.html index 4d49895b..ea00bbd9 100644 --- a/src/index.html +++ b/src/index.html @@ -44,6 +44,7 @@ "identifier": "symbol", "nodeShadow": true, "edgeShadow": true, + "interactionDrugProtein": "ChEMBL", "legendUrl": "https://exbio.wzw.tum.de/covex/assets/leg1.png" }' network='{ -- GitLab