Skip to content
Snippets Groups Projects
Commit 54f5b88b authored by Julian Späth's avatar Julian Späth
Browse files

Merge branch 'extend-analysis-windows' into 'master'

Extend analysis windows

See merge request covid-19/frontend!110
parents 210274c1 4bdb82a1
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,9 @@
<li [class.is-active]="tab === 'meta'"><a (click)="tab = 'meta'">Parameters</a></li>
</ul>
</div>
<div class="content tab-content" *ngIf="task && task.info.done" [class.is-visible]="tab === 'meta'">
<div class="content tab-content meta" *ngIf="task && task.info.done" [class.is-visible]="tab === 'meta'">
<div *ngIf="task">
<p>
<p *ngIf="task.info.algorithm !== 'quick' && task.info.algorithm !== 'super'">
Algorithm: <strong>{{algorithmNames[task.info.algorithm]}}</strong>
</p>
<div>
......@@ -37,6 +37,10 @@
<td>Number of trees</td>
<td>{{task.info.parameters.numTrees}}</td>
</tr>
<tr *ngIf="task.info.parameters.tolerance || task.info.parameters.tolerance === 0">
<td>Tolerance</td>
<td>{{task.info.parameters.tolerance}}</td>
</tr>
<tr *ngIf="task.info.parameters.dampingFactor">
<td>Damping Factor</td>
<td>{{task.info.parameters.dampingFactor}}</td>
......@@ -62,6 +66,50 @@
</tbody>
</table>
</div>
<div *ngIf="task.info.algorithm === 'quick' || task.info.algorithm === 'super'">
<p>
Algorithm: <strong>{{algorithmNames['multisteiner']}}</strong>
</p>
<table class="table is-narrow">
<tbody>
<tr>
<td>Number of Trees</td>
<td>5</td>
</tr>
<tr>
<td>Tolerance</td>
<td>10</td>
</tr>
</tbody>
</table>
<p>
Algorithm: <strong>{{algorithmNames['trustrank']}}</strong>
</p>
<table class="table is-narrow">
<tbody>
<tr>
<td>Damping Factor</td>
<td>0.85</td>
</tr>
<tr>
<td>Include indirect drugs</td>
<td>
<i class="fa fa-times"></i>
</td>
</tr>
<tr>
<td>Include non-approved drugs</td>
<td>
<i class="fa fa-times"></i>
</td>
</tr>
<tr>
<td>Result Size</td>
<td>30</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="content tab-content" *ngIf="task && task.info.done" [class.is-visible]="tab === 'network'">
......
......@@ -35,3 +35,14 @@ div.network {
.checkbox-col {
width: 50px;
}
.meta {
table {
width: 500px;
td {
width: 50px;
}
}
}
......@@ -171,6 +171,23 @@
</div>
</div>
</div>
<div class="field">
<label class="label" for="multisteiner-numtrees">Tolerance for trees</label>
<div class="control">
<div class="select">
<select id="multisteiner-tolerance" [(ngModel)]="multisteinerTolerance">
<option [ngValue]="0">0</option>
<option [ngValue]="1">1</option>
<option [ngValue]="2">2</option>
<option [ngValue]="3">3</option>
<option [ngValue]="5">5</option>
<option [ngValue]="10">10</option>
<option [ngValue]="15">15</option>
<option [ngValue]="20">20</option>
</select>
</div>
</div>
</div>
</div>
</section>
......
......@@ -50,6 +50,7 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges {
// Multisteiner Parameters
public multisteinerNumTrees = 5;
public multisteinerTolerance = 10;
public hasBaits;
......@@ -106,6 +107,7 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges {
} else if (this.algorithm === 'multisteiner') {
parameters.strain_or_drugs = this.dataset;
parameters.num_trees = this.multisteinerNumTrees;
parameters.tolerance = this.multisteinerTolerance;
}
await this.analysis.startAnalysis(this.algorithm, this.target, parameters);
......
import {AlgorithmType, QuickAlgorithmType} from './analysis.service';
export type NodeType = 'host' | 'virus' | 'drug';
export interface Protein {
......@@ -34,7 +36,7 @@ export interface Task {
token: string;
info: {
target: 'drug' | 'drug-target',
algorithm: 'trustrank' | 'multisteiner' | 'keypathwayminer' | 'quick';
algorithm: AlgorithmType | QuickAlgorithmType;
parameters?: { [key: string]: any };
workerId?: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment