From 9333b8964ea2a66fd3c943bd4ad59903f30e110a Mon Sep 17 00:00:00 2001
From: AndiMajore <andi.majore@googlemail.com>
Date: Thu, 25 Aug 2022 16:14:05 +0200
Subject: [PATCH] fixed dataset selection in dev index; fixed licensedDataset
 internal variable

---
 .../components/network/network.component.ts   |  6 +--
 src/app/config.ts                             |  1 -
 .../launch-analysis.component.ts              |  2 +-
 .../explorer-page.component.html              | 44 -------------------
 .../explorer-page/explorer-page.component.ts  |  2 +-
 src/index.html                                |  4 +-
 src/index_static.html                         |  4 +-
 7 files changed, 9 insertions(+), 54 deletions(-)

diff --git a/src/app/components/network/network.component.ts b/src/app/components/network/network.component.ts
index c24c4ac1..d15cf243 100644
--- a/src/app/components/network/network.component.ts
+++ b/src/app/components/network/network.component.ts
@@ -117,7 +117,7 @@ export class NetworkComponent implements OnInit {
     this.adjacentDisordersProtein = bool;
     if (this.adjacentDisordersProtein) {
 
-      this.netex.adjacentDisorders(this.nodeData.nodes.get(), 'proteins', this.drugstoneConfig.config.associatedProteinDisorder, this.drugstoneConfig.config.licencedDatasets).subscribe(response => {
+      this.netex.adjacentDisorders(this.nodeData.nodes.get(), 'proteins', this.drugstoneConfig.config.associatedProteinDisorder, this.drugstoneConfig.config.licensedDatasets).subscribe(response => {
         const proteinMap = this.getProteinMap()
         const addedEdge = {}
         for (const interaction of response.edges) {
@@ -160,7 +160,7 @@ export class NetworkComponent implements OnInit {
   public updateAdjacentDrugDisorders(bool: boolean) {
     this.adjacentDisordersDrug = bool;
     if (this.adjacentDisordersDrug) {
-      this.netex.adjacentDisorders(this.nodeData.nodes.get(), 'drugs', this.drugstoneConfig.config.indicationDrugDisorder, this.drugstoneConfig.config.licencedDatasets).subscribe(response => {
+      this.netex.adjacentDisorders(this.nodeData.nodes.get(), 'drugs', this.drugstoneConfig.config.indicationDrugDisorder, this.drugstoneConfig.config.licensedDatasets).subscribe(response => {
         for (const interaction of response.edges) {
           const edge = {from: interaction.drug, to: interaction.disorder};
           this.adjacentDrugDisorderEdgesList.push(mapCustomEdge(edge, this.drugstoneConfig.config));
@@ -214,7 +214,7 @@ export class NetworkComponent implements OnInit {
     if (this.adjacentDrugs) {
       const addedEdge = {}
       const proteinMap = this.getProteinMap()
-      this.netex.adjacentDrugs(this.drugstoneConfig.config.interactionDrugProtein, this.drugstoneConfig.config.licencedDatasets, this.nodeData.nodes.get()).subscribe(response => {
+      this.netex.adjacentDrugs(this.drugstoneConfig.config.interactionDrugProtein, this.drugstoneConfig.config.licensedDatasets, this.nodeData.nodes.get()).subscribe(response => {
         const existingDrugIDs = this.nodeData.nodes.get().filter(n => n.drugstoneId && n.drugstoneType === 'drug').map(n => n.drugstoneId);
         for (const interaction of response.pdis) {
           const edge = mapCustomEdge({from: interaction.protein, to: interaction.drug}, this.drugstoneConfig.config)
diff --git a/src/app/config.ts b/src/app/config.ts
index cdf776f9..bd6112e2 100644
--- a/src/app/config.ts
+++ b/src/app/config.ts
@@ -74,7 +74,6 @@ export interface IConfig {
   interactionDrugProtein: InteractionDrugProteinDB;
   interactionProteinProtein: InteractionProteinProteinDB;
   indicationDrugDisorder: IndicationDrugDisorderDB;
-  licencedDatasets?: boolean;
   associatedProteinDisorder: AssociatedProteinDisorderDB;
   autofillEdges: boolean;
   interactions?: InteractionDatabase;
diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.ts b/src/app/dialogs/launch-analysis/launch-analysis.component.ts
index dc8c975a..273822d5 100644
--- a/src/app/dialogs/launch-analysis/launch-analysis.component.ts
+++ b/src/app/dialogs/launch-analysis/launch-analysis.component.ts
@@ -117,7 +117,7 @@ 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.licencedDatasets;
+    parameters.licenced = this.drugstoneConfig.config.licensedDatasets;
 
 
     parameters.target = this.target === 'drug' ? 'drug' : 'drug-target';
diff --git a/src/app/pages/explorer-page/explorer-page.component.html b/src/app/pages/explorer-page/explorer-page.component.html
index 16ad5120..788dfcab 100644
--- a/src/app/pages/explorer-page/explorer-page.component.html
+++ b/src/app/pages/explorer-page/explorer-page.component.html
@@ -465,50 +465,6 @@
               </i>
             </div>
 
-            <!-- <footer class="card-footer" *ngIf="selectedAnalysisToken">
-                  <a (click)="analysis.addSeeds(currentViewNodes)"
-                    class="card-footer-item has-text-success" tooltipPosition="top" pTooltip="Add all visible seeds.">
-
-                <span class="icon">
-                  <i class="fa fa-plus"></i>
-                </span>
-                    <span>
-                  Add seeds
-                </span>
-                  </a>
-                  <a (click)="analysis.removeSeeds(currentViewNodes)"
-                    class="card-footer-item has-text-danger" tooltipPosition="top" pTooltip="Remove all seeds.">
-                <span class="icon">
-                  <i class="fa fa-minus"></i>
-                </span>
-                    <span>
-                  Remove seeds
-                </span>
-                  </a>
-                </footer>
-
-                <footer class="card-footer">
-                  <a (click)="showCustomProteinsDialog = true"
-                    class="card-footer-item text-primary"
-                    tooltipPosition="top" pTooltip="Add a custom list of proteins.">
-                <span class="icon">
-                  <i class="fa fa-upload"></i>
-                </span>
-                    <span>
-                  Custom proteins
-                </span>
-                  </a>
-                  <a (click)="showThresholdDialog = true"
-                    class="card-footer-item text-primary"
-                    pTooltip="Add proteins expressed in the tissue." tooltipPosition="top">
-                <span class="icon">
-                  <i class="fas fa-angle-double-up"></i>
-                </span>
-                    <span>
-                  Tissue proteins
-                </span>
-                </a>
-                </footer> -->
 
             <footer class="card-footer">
               <!-- <a (click)="analysis.invertSelection(currentViewNodes)" class="card-footer-item text-primary"
diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts
index 7aeea735..f43a78c2 100644
--- a/src/app/pages/explorer-page/explorer-page.component.ts
+++ b/src/app/pages/explorer-page/explorer-page.component.ts
@@ -284,7 +284,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
           })
         }
       })
-      const netexEdges = await this.netex.fetchEdges(nodes, this.drugstoneConfig.config.interactionProteinProtein, this.drugstoneConfig.config.licencedDatasets);
+      const netexEdges = await this.netex.fetchEdges(nodes, this.drugstoneConfig.config.interactionProteinProtein, this.drugstoneConfig.config.licensedDatasets);
       edges.push(...netexEdges.map(netexEdge => mapNetexEdge(netexEdge, this.drugstoneConfig.config, node_map)).flatMap(e => e));
     }
 
diff --git a/src/index.html b/src/index.html
index 7569b4e2..c6a928f3 100644
--- a/src/index.html
+++ b/src/index.html
@@ -77,8 +77,8 @@
         <i>Protein-Disorder Associations</i>
   <select name="Protein-Disorder Associations" onchange="applyDataset()" id="pdis-dataset">
     <option value="NeDRex">NeDRex</option>
-    <option value="DisGeNET">CTD</option>
-    <option value="OMIM">Drug Central</option>
+    <option value="DisGeNET">DisGeNET</option>
+    <option value="omim">OMIM</option>
   </select>
 </div>
 
diff --git a/src/index_static.html b/src/index_static.html
index 79f219a2..b75da7c0 100644
--- a/src/index_static.html
+++ b/src/index_static.html
@@ -78,8 +78,8 @@
         <i>Protein-Disorder Associations</i>
   <select name="Protein-Disorder Associations" onchange="applyDataset()" id="pdis-dataset">
     <option value="NeDRex">NeDRex</option>
-    <option value="DisGeNET">CTD</option>
-    <option value="OMIM">Drug Central</option>
+    <option value="DisGeNET">DisGeNET</option>
+    <option value="omim">OMIM</option>
   </select>
 </div>
 
-- 
GitLab