diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 401d17e4e0f46ca3c6987e5613f442119672b53c..2eb67893e0029b37a7baf377284d16613cf608b9 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -34,7 +34,7 @@ import { faRulerVertical, faDna, faMicroscope, faBook, faPause, faTrash, faSpinner, faExclamationTriangle, faPlus, faExpand, faInfo, faRocket, faAngleDown, faSearch, faFastForward, faExternalLinkAlt, faTasks, faFilter, faMinus, faUpload, faAngleDoubleDown, faSync, faBroom, faAngleDoubleUp, faChild, faHeadSideMask, faBiohazard, - faBullseye, faSeedling, faSyncAlt, faCompress, faKey, faInfoCircle + faBullseye, faSeedling, faSyncAlt, faCompress, faKey, faInfoCircle, faWrench } from '@fortawesome/free-solid-svg-icons'; import { TooltipModule } from 'primeng/tooltip'; import { NetworkMenuComponent } from './components/network/network-menu/network-menu.component'; @@ -100,7 +100,7 @@ export class AppModule { faSpinner, faExclamationTriangle, faPlus, faExpand, faInfo, faRocket, faAngleDown, faSearch, faFastForward, faExternalLinkAlt, faTasks, faFilter, faMinus, faUpload, faAngleDoubleDown, faSync, faBroom, faAngleDoubleUp, faChild, faHeadSideMask, faBiohazard, faBullseye, faSeedling, - faSyncAlt, faExpand, faCompress, faKey, faInfoCircle); + faSyncAlt, faExpand, faCompress, faKey, faInfoCircle,faWrench); const NetworkExpander = createCustomElement(ExplorerPageComponent, { injector }); // Register the custom element with the browser. customElements.define('drugst-one', NetworkExpander); diff --git a/src/app/components/analysis-panel/analysis-panel.component.html b/src/app/components/analysis-panel/analysis-panel.component.html index 76655a32d9336c81deb5bbaf55f5b67324685b39..d5b7d5223c667b5718bfb84ba28825494089d77c 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -47,103 +47,116 @@ [class.is-visible]="tab === 'meta'" > <div *ngIf="task"> - <p - *ngIf=" - task.info.algorithm !== 'quick' && task.info.algorithm !== 'super' - " - > - Algorithm: - <strong class="has-text-normal">{{ - algorithmNames[task.info.algorithm] - }}</strong> - </p> - <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> - </tr> - <tr *ngIf="task.info.parameters.k !== undefined"> - <td>K</td> - <td>{{ task.info.parameters.k }}</td> - </tr> - <tr *ngIf="task.info.parameters.numTrees !== undefined"> - <td>Number of trees</td> - <td>{{ task.info.parameters.numTrees }}</td> - </tr> - <tr *ngIf="task.info.parameters.tolerance !== undefined"> - <td>Tolerance</td> - <td>{{ task.info.parameters.tolerance }}</td> - </tr> - <tr *ngIf="task.info.parameters.dampingFactor !== undefined"> - <td>Damping Factor</td> - <td>{{ task.info.parameters.dampingFactor }}</td> - </tr> - <tr *ngIf="task.info.parameters.maxDeg !== undefined"> - <td>Maximum Degree</td> - <td>{{ task.info.parameters.maxDeg }}</td> - </tr> - <tr *ngIf="task.info.parameters.hubPenalty !== undefined"> - <td>Hub Penality</td> - <td>{{ task.info.parameters.hubPenalty }}</td> - </tr> - <tr - *ngIf=" - task.info.parameters.includeIndirectDrugs !== undefined && - task.info.target === 'drug' - " - > - <td>Include indirect drugs</td> - <td> - <i - *ngIf="task.info.parameters.includeIndirectDrugs" - class="fa fa-check" - ></i> - <i - *ngIf="!task.info.parameters.includeIndirectDrugs" - class="fa fa-times" - ></i> - </td> - </tr> - <tr - *ngIf=" - task.info.parameters.includeNonApprovedDrugs !== - undefined && task.info.target === 'drug' - " - > - <td>Include non-approved drugs</td> - <td> - <i - *ngIf="task.info.parameters.includeNonApprovedDrugs" - class="fa fa-check" - ></i> - <i - *ngIf="!task.info.parameters.includeNonApprovedDrugs" - class="fa fa-times" - ></i> - </td> - </tr> - </tbody> - </table> + <div class="columns m-1"> + <div class="column content"> + <h4 + class="is-4 has-text-weight-bold" + *ngIf=" + task.info.algorithm !== 'quick' && + task.info.algorithm !== 'super' + " + > + <span class="icon"> + <i class="fas fa-wrench" aria-hidden="true"></i> + </span> + Algorithm: + {{ algorithmNames[task.info.algorithm] }} + </h4> + </div> + </div> + <div class="columns m-1"> + <div class="column"> + <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> + </tr> + <tr *ngIf="task.info.parameters.k !== undefined"> + <td>K</td> + <td>{{ task.info.parameters.k }}</td> + </tr> + <tr *ngIf="task.info.parameters.numTrees !== undefined"> + <td>Number of trees</td> + <td>{{ task.info.parameters.numTrees }}</td> + </tr> + <tr *ngIf="task.info.parameters.tolerance !== undefined"> + <td>Tolerance</td> + <td>{{ task.info.parameters.tolerance }}</td> + </tr> + <tr *ngIf="task.info.parameters.dampingFactor !== undefined"> + <td>Damping Factor</td> + <td>{{ task.info.parameters.dampingFactor }}</td> + </tr> + <tr *ngIf="task.info.parameters.maxDeg !== undefined"> + <td>Maximum Degree</td> + <td>{{ task.info.parameters.maxDeg }}</td> + </tr> + <tr *ngIf="task.info.parameters.hubPenalty !== undefined"> + <td>Hub Penality</td> + <td>{{ task.info.parameters.hubPenalty }}</td> + </tr> + <tr + *ngIf=" + task.info.parameters.includeIndirectDrugs !== undefined && + task.info.target === 'drug' + " + > + <td>Include indirect drugs</td> + <td> + <i + *ngIf="task.info.parameters.includeIndirectDrugs" + class="fa fa-check" + ></i> + <i + *ngIf="!task.info.parameters.includeIndirectDrugs" + class="fa fa-times" + ></i> + </td> + </tr> + <tr + *ngIf=" + task.info.parameters.includeNonApprovedDrugs !== + undefined && task.info.target === 'drug' + " + > + <td>Include non-approved drugs</td> + <td> + <i + *ngIf="task.info.parameters.includeNonApprovedDrugs" + class="fa fa-check" + ></i> + <i + *ngIf="!task.info.parameters.includeNonApprovedDrugs" + class="fa fa-times" + ></i> + </td> + </tr> + </tbody> + </table> + </div> </div> <div *ngIf=" @@ -241,7 +254,9 @@ <button class="button is-rounded has-tooltip is-small" pTooltip="Normalize the scores" - [tooltipStyleClass]="'drgstn drgstn-tooltip drgstn-tooltip-top'" + [tooltipStyleClass]=" + 'drgstn drgstn-tooltip drgstn-tooltip-top' + " tooltipPosition="top" [class.is-primary]="tableNormalize" (click)="toggleNormalization(true)" @@ -257,7 +272,9 @@ <button class="button is-rounded has-tooltip is-small" pTooltip="Disable normalization of the scores." - [tooltipStyleClass]="'drgstn drgstn-tooltip drgstn-tooltip-top'" + [tooltipStyleClass]=" + 'drgstn drgstn-tooltip drgstn-tooltip-top' + " tooltipPosition="top" [class.is-primary]="!tableNormalize" (click)="toggleNormalization(false)" @@ -311,15 +328,14 @@ <div class="columns m-1"> <div class="column"> <app-prot-table - [tableHasScores]="tableHasScores" - [tableProteins]="tableProteins" - [tableProteinScoreTooltip]="tableDrugScoreTooltip" - [tableProteinSelection]="tableProteinSelection" - [tableSelectedProteins]="tableSelectedProteins" - ></app-prot-table> + [tableHasScores]="tableHasScores" + [tableProteins]="tableProteins" + [tableProteinScoreTooltip]="tableDrugScoreTooltip" + [tableProteinSelection]="tableProteinSelection" + [tableSelectedProteins]="tableSelectedProteins" + ></app-prot-table> </div> </div> - </div> </div> </div> diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index a47f0aa7af3bd1152374407e6c2c7ee8341d931c..6112dc2cf5567f4f3f4113adee749496ca7b2b53 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -175,6 +175,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit if (this.task && this.task.info.done) { this.result = await this.netex.getTaskResult(this.token); + console.log(this.result) const nodeAttributes = this.result.nodeAttributes || {}; this.networkHandler.activeNetwork.seedMap = nodeAttributes.isSeed || {}; diff --git a/src/app/main-network.ts b/src/app/main-network.ts index 9cc7908913068955f30891a4a377cc21e3ddfb74..d5b94fa780b174a520a79f8ced7e246359368979 100644 --- a/src/app/main-network.ts +++ b/src/app/main-network.ts @@ -57,7 +57,6 @@ export class ProteinNetwork { } for (const edge of this.edges) { - console.log(edge) edges.push(mapCustomEdge(edge, config)); }