From b16a25edc78ecb8688c35b5c72fddf1b4bd49119 Mon Sep 17 00:00:00 2001
From: "Hartung, Michael" <michael.hartung@uni-hamburg.de>
Date: Thu, 15 Dec 2022 15:10:41 +0100
Subject: [PATCH] set licensed flag in quick analysis

---
 .../components/analysis-panel/analysis-panel.component.ts | 8 +-------
 .../dialogs/launch-analysis/launch-analysis.component.ts  | 2 --
 src/app/services/analysis/analysis.service.ts             | 2 +-
 src/index.html                                            | 2 +-
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts
index b278a0b2..5ef84d3e 100644
--- a/src/app/components/analysis-panel/analysis-panel.component.ts
+++ b/src/app/components/analysis-panel/analysis-panel.component.ts
@@ -11,13 +11,10 @@ import {
   ViewChild,
 } from '@angular/core';
 import { HttpClient } from '@angular/common/http';
-import { environment } from '../../../environments/environment';
 import { algorithmNames, AnalysisService } from '../../services/analysis/analysis.service';
 import {
   Drug,
-  EdgeType,
   NodeAttributeMap,
-  getDrugNodeId,
   getProteinNodeId,
   getWrapperFromNode,
   LegendContext,
@@ -27,12 +24,9 @@ import {
   Wrapper,
   NodeInteraction,
 } from '../../interfaces';
-import domtoimage from 'dom-to-image';
 import { NetworkSettings } from '../../network-settings';
 import { NetexControllerService } from 'src/app/services/netex-controller/netex-controller.service';
-import { defaultConfig, IConfig } from 'src/app/config';
-import { mapCustomEdge, mapCustomNode } from 'src/app/main-network';
-import { downLoadFile, pieChartContextRenderer, removeDuplicateObjectsFromList } from 'src/app/utils';
+import { mapCustomEdge } from 'src/app/main-network';
 import { DrugstoneConfigService } from 'src/app/services/drugstone-config/drugstone-config.service';
 import { NetworkHandlerService } from 'src/app/services/network-handler/network-handler.service';
 import { LegendService } from 'src/app/services/legend-service/legend-service.service';
diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.ts b/src/app/dialogs/launch-analysis/launch-analysis.component.ts
index 9099770f..138fabad 100644
--- a/src/app/dialogs/launch-analysis/launch-analysis.component.ts
+++ b/src/app/dialogs/launch-analysis/launch-analysis.component.ts
@@ -119,8 +119,6 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges {
     parameters.ppi_dataset = this.drugstoneConfig.config.interactionProteinProtein;
     parameters.pdi_dataset = this.drugstoneConfig.config.interactionDrugProtein;
     parameters.licenced = this.drugstoneConfig.config.licensedDatasets;
-
-
     parameters.target = this.target === 'drug' ? 'drug' : 'drug-target';
     // pass network data to reconstruct network in analysis result to connect non-proteins to results
     // drop interactions in nodes beforehand to no cause cyclic error, information is contained in edges
diff --git a/src/app/services/analysis/analysis.service.ts b/src/app/services/analysis/analysis.service.ts
index 38ff9a90..a479a1cc 100644
--- a/src/app/services/analysis/analysis.service.ts
+++ b/src/app/services/analysis/analysis.service.ts
@@ -279,9 +279,9 @@ export class AnalysisService {
       num_trees: 5,
       tolerance: 10,
       custom_edges: this.drugstoneConfig.currentConfig().customEdges.default,
+      licenced: this.drugstoneConfig.config.licensedDatasets
     };
 
-
     const resp = await this.http.post<any>(`${this.netex.getBackend()}task/`, {
       algorithm: algorithm,
       target: target,
diff --git a/src/index.html b/src/index.html
index fae85b8a..c7069c4f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -113,7 +113,7 @@ menu<br>
 <div style="max-width: 80vw; width: 1276px; height: 500px">
 
   <drugst-one id="netexp1"
-              config="{'activateNetworkMenuButtonAdjacentDisorders':false,'activateNetworkMenuButtonAdjacentDrugs':false, 'activateNetworkMenuButtonAdjacentDisordersDrugs': false, 'licensedDatasets':true}"
+              config="{'activateNetworkMenuButtonAdjacentDisorders':false,'activateNetworkMenuButtonAdjacentDrugs':false, 'activateNetworkMenuButtonAdjacentDisordersDrugs': false, 'licensedDatasets':false, 'interactionDrugProtein': 'DrugBank'}"
               groups='{"nodeGroups":{"protein":{"type":"protein","color":"#00008b","font":{"color":"#f0f0f0"},"groupName":"Protein","shape":"circle"},"foundDrug":{"type":"drug","color":"#F12590","font":{"color":"#000000"},"groupName":"Drug","shape":"diamond"},"connectorNode":{"type":"protein","color":"#d29034","font":{"color":"#f0f0f0"},"groupName":"Connector Proteins","shape":"circle"}},"edgeGroups":{"default":{"color":"#000000","groupName":"default edge"}}}'
               network='{"nodes":[{"id":"TGFB1","group":"protein","label":"TGFB1"},{"id":"TNFRSF1A","group":"protein","label":"TNFRSF1A"},{"id":"FCGR2A","group":"protein","label":"FCGR2A"},{"id":"ENG","group":"protein","label":"ENG"},{"id":"DCTN4","group":"protein","label":"DCTN4"},{"id":"CLCA4","group":"protein","label":"CLCA4"},{"id":"STX1A","group":"protein","label":"STX1A"},{"id":"SCNN1G","group":"protein","label":"SCNN1G"},{"id":"SCNN1A","group":"protein","label":"SCNN1A"},{"id":"SCNN1B","group":"protein","label":"SCNN1B"}],"edges":[{"from":"DCTN4","to":"CFTR", "weight": "5"},{"from":"STX1A","to":"SCNN1B","group":"default"},{"from":"SCNN1A","to":"SCNN1G","group":"default"},{"from":"SCNN1B","to":"SCNN1G","group":"default"}]}'>
     ></drugst-one>
-- 
GitLab