Skip to content
Snippets Groups Projects
Commit 3f94e4d8 authored by AndiMajore's avatar AndiMajore
Browse files

added doc structure

parent fa8e0e25
Branches
Tags
No related merge requests found
<html lang="en"> <html lang="en">
<head> <head>
<link rel="stylesheet" type="text/css" href="src/stylesheets/theme.css"> <link rel="stylesheet" type="text/css" href="src/stylesheets/theme.css">
<script src="https://cdn.jsdelivr.net/gh/AndiMajore/drugstone-releases/uhh/drugsTone.js"></script> <script src="https://cdn.jsdelivr.net/gh/AndiMajore/drugstone-releases@0.8.2-rc1/remote/drugsTone.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AndiMajore/drugstone-releases@0.8.1-rc3/uhh/styles.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AndiMajore/drugstone-releases@0.8.2-rc1/remote/styles.css">
<!-- <link rel="stylesheet" type="text/css" href="./drugsTone-build/styles.css">--> <!-- <link rel="stylesheet" type="text/css" href="./drugsTone-build/styles.css">-->
</head> </head>
<body> <body>
<div style="height: 700px; width: 1300px;"> <div style="height: 700px; width: 1300px;">
<network-expander <network-expander
id='example-drugst.one' id='drugstOne'
config='{"nodeGroups":{"patient":{"type":"patient","color":"#000000","font":{"color":"#f0f0f0"},"groupName":"Patient","shape":"image","image":"https://static.thenounproject.com/png/22780-200.png","shadow":true},"condition":{"type":"condition","color":"#000000","font":{"color":"#f0f0f0"},"groupName":"Condition","shape":"text","shadow":false},"important":{"type":"gene","color":"#ff881f","font":{"color":"#f0f0f0"},"groupName":"Important Gene","shape":"star","shadow":true},"gene":{"type":"gene","color":"#4da300","font":{"color":"#f0f0f0"},"groupName":"Gene","shape":"circle","shadow":true}},"edgeGroups":{"genotype":{"color":"white","groupName":"Relevant Gene","shadow":false},"has-condition":{"color":"white","groupName":"Has Condition","dashes":[2,2],"shadow":false},"ggi":{"color":"#ffffff","groupName":"Interaction","dashes":[3,2],"shadow":false}},"identifier":"symbol","title":"Breast cancer example network","nodeShadow":false,"edgeShadow":false,"showLegend":true}' config='{"nodeGroups":{"patient":{"type":"patient","color":"#000000","font":{"color":"#f0f0f0"},"groupName":"Patient","shape":"image","image":"https://static.thenounproject.com/png/22780-200.png","shadow":true},"condition":{"type":"condition","color":"#000000","font":{"color":"#f0f0f0"},"groupName":"Condition","shape":"text","shadow":false},"important":{"type":"gene","color":"#ff881f","font":{"color":"#f0f0f0"},"groupName":"Important Gene","shape":"star","shadow":true},"gene":{"type":"gene","color":"#4da300","font":{"color":"#f0f0f0"},"groupName":"Gene","shape":"circle","shadow":true}},"edgeGroups":{"genotype":{"color":"white","groupName":"Relevant Gene","shadow":false},"has-condition":{"color":"white","groupName":"Has Condition","dashes":[2,2],"shadow":false},"ggi":{"color":"#ffffff","groupName":"Interaction","dashes":[3,2],"shadow":false}},"identifier":"symbol","title":"Breast cancer example network","nodeShadow":false,"edgeShadow":false,"showLegend":true}'
network='{"nodes":[{"id":"patient-1","group":"patient","x":592,"y":446},{"id":"patient-2","group":"patient","x":235,"y":87},{"id":"patient-3","group":"patient","x":105,"y":369},{"id":"ATM","label":"ATM","group":"gene","x":289,"y":242},{"id":"BARD1","label":"BARD1","group":"gene","x":44,"y":250},{"id":"BRCA1","label":"BRCA1","group":"gene","x":466,"y":576},{"id":"BRCA2","label":"BRCA2","group":"gene","x":507,"y":285},{"id":"BRIP1","label":"BRIP1","group":"gene","x":54,"y":474},{"id":"CHEK2","label":"CHEK2","group":"gene","x":216,"y":590},{"id":"CDH1","label":"CDH1","group":"gene","x":320,"y":-57},{"id":"NF1","label":"NF1","group":"gene","x":481,"y":111},{"id":"NBN","label":"NBN","group":"gene","x":-57,"y":314},{"id":"PALB2","label":"PALB2","group":"gene","x":450,"y":190},{"id":"PTEN","label":"PTEN","group":"important","x":305,"y":494},{"id":"RAD51C","label":"RAD51C","group":"gene","x":182,"y":-90},{"id":"RAD51D","label":"RAD51D","group":"gene","x":368,"y":73},{"id":"STK11","label":"STK11","group":"gene","x":686,"y":330},{"id":"TP53","label":"TP53","group":"important","x":333,"y":316},{"id":"subtype-1","label":"Subtype 1","group":"condition","x":556,"y":171},{"id":"subtype-2","label":"Subtype 2","group":"condition","x":-87,"y":221}],"edges":[{"from":"BRCA1","to":"BRCA2","group":"ggi"},{"from":"ATM","to":"BARD1","group":"ggi"},{"from":"BRCA1","to":"CHEK2","group":"ggi"},{"from":"RAD51C","to":"RAD51D","group":"ggi"},{"from":"STK11","to":"TP53","group":"ggi"},{"from":"TP53","to":"PALB2","group":"ggi"},{"from":"TP53","to":"RAD51D","group":"ggi"},{"from":"TP53","to":"NF1","group":"ggi"},{"from":"TP53","to":"BRCA1","group":"ggi"},{"from":"TP53","to":"BRCA2","group":"ggi"},{"from":"PTEN","to":"BRCA1","group":"ggi"},{"from":"PTEN","to":"BRCA2","group":"ggi"},{"from":"TP53","to":"PTEN","group":"ggi"},{"from":"ATM","to":"PTEN","group":"ggi"},{"from":"CDH1","to":"RAD51D","group":"ggi"},{"from":"CDH1","to":"PALB2","group":"ggi"},{"from":"NBN","to":"BRIP1","group":"ggi"},{"from":"BRIP1","to":"PTEN","group":"ggi"},{"from":"patient-1","to":"BRCA1","group":"genotype"},{"from":"patient-1","to":"TP53","group":"genotype"},{"from":"patient-1","to":"BRCA2","group":"genotype"},{"from":"patient-1","to":"PTEN","group":"genotype"},{"from":"patient-2","to":"TP53","group":"genotype"},{"from":"patient-2","to":"NF1","group":"genotype"},{"from":"patient-2","to":"BARD1","group":"genotype"},{"from":"patient-3","to":"TP53","group":"genotype"},{"from":"patient-3","to":"PTEN","group":"genotype"},{"from":"patient-3","to":"NBN","group":"genotype"},{"from":"patient-1","to":"subtype-1","group":"has-condition"},{"from":"patient-2","to":"subtype-1","group":"has-condition"},{"from":"patient-3","to":"subtype-2","group":"has-condition"}]}'> network='{"nodes":[{"id":"patient-1","group":"patient","x":592,"y":446},{"id":"patient-2","group":"patient","x":235,"y":87},{"id":"patient-3","group":"patient","x":105,"y":369},{"id":"ATM","label":"ATM","group":"gene","x":289,"y":242},{"id":"BARD1","label":"BARD1","group":"gene","x":44,"y":250},{"id":"BRCA1","label":"BRCA1","group":"gene","x":466,"y":576},{"id":"BRCA2","label":"BRCA2","group":"gene","x":507,"y":285},{"id":"BRIP1","label":"BRIP1","group":"gene","x":54,"y":474},{"id":"CHEK2","label":"CHEK2","group":"gene","x":216,"y":590},{"id":"CDH1","label":"CDH1","group":"gene","x":320,"y":-57},{"id":"NF1","label":"NF1","group":"gene","x":481,"y":111},{"id":"NBN","label":"NBN","group":"gene","x":-57,"y":314},{"id":"PALB2","label":"PALB2","group":"gene","x":450,"y":190},{"id":"PTEN","label":"PTEN","group":"important","x":305,"y":494},{"id":"RAD51C","label":"RAD51C","group":"gene","x":182,"y":-90},{"id":"RAD51D","label":"RAD51D","group":"gene","x":368,"y":73},{"id":"STK11","label":"STK11","group":"gene","x":686,"y":330},{"id":"TP53","label":"TP53","group":"important","x":333,"y":316},{"id":"subtype-1","label":"Subtype 1","group":"condition","x":556,"y":171},{"id":"subtype-2","label":"Subtype 2","group":"condition","x":-87,"y":221}],"edges":[{"from":"BRCA1","to":"BRCA2","group":"ggi"},{"from":"ATM","to":"BARD1","group":"ggi"},{"from":"BRCA1","to":"CHEK2","group":"ggi"},{"from":"RAD51C","to":"RAD51D","group":"ggi"},{"from":"STK11","to":"TP53","group":"ggi"},{"from":"TP53","to":"PALB2","group":"ggi"},{"from":"TP53","to":"RAD51D","group":"ggi"},{"from":"TP53","to":"NF1","group":"ggi"},{"from":"TP53","to":"BRCA1","group":"ggi"},{"from":"TP53","to":"BRCA2","group":"ggi"},{"from":"PTEN","to":"BRCA1","group":"ggi"},{"from":"PTEN","to":"BRCA2","group":"ggi"},{"from":"TP53","to":"PTEN","group":"ggi"},{"from":"ATM","to":"PTEN","group":"ggi"},{"from":"CDH1","to":"RAD51D","group":"ggi"},{"from":"CDH1","to":"PALB2","group":"ggi"},{"from":"NBN","to":"BRIP1","group":"ggi"},{"from":"BRIP1","to":"PTEN","group":"ggi"},{"from":"patient-1","to":"BRCA1","group":"genotype"},{"from":"patient-1","to":"TP53","group":"genotype"},{"from":"patient-1","to":"BRCA2","group":"genotype"},{"from":"patient-1","to":"PTEN","group":"genotype"},{"from":"patient-2","to":"TP53","group":"genotype"},{"from":"patient-2","to":"NF1","group":"genotype"},{"from":"patient-2","to":"BARD1","group":"genotype"},{"from":"patient-3","to":"TP53","group":"genotype"},{"from":"patient-3","to":"PTEN","group":"genotype"},{"from":"patient-3","to":"NBN","group":"genotype"},{"from":"patient-1","to":"subtype-1","group":"has-condition"},{"from":"patient-2","to":"subtype-1","group":"has-condition"},{"from":"patient-3","to":"subtype-2","group":"has-condition"}]}'>
</network-expander> </network-expander>
<script type="text/javascript">
document.getElementById("drugstOne").addEventListener("taskEvent",(event)=>{console.log(event.detail)})
</script>
</div> </div>
</body> </body>
</html> </html>
...@@ -33,11 +33,11 @@ echo "Updating Repo..." ...@@ -33,11 +33,11 @@ echo "Updating Repo..."
#cd ../ #cd ../
#cp frontend/drugsTone-build/* drugstone-releases/dev/ #cp frontend/drugsTone-build/* drugstone-releases/dev/
# #
#echo "Building remote..." echo "Building remote..."
#cd frontend || exit cd frontend || exit
#npm run build:netex-remote npm run build:netex-remote
#cd ../ cd ../
#cp frontend/drugsTone-build/* drugstone-releases/remote/ cp frontend/drugsTone-build/* drugstone-releases/remote/
echo "Building v-server..." echo "Building v-server..."
......
...@@ -70,7 +70,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { ...@@ -70,7 +70,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
for (const key of Object.keys(config)) { for (const key of Object.keys(config)) {
this.myConfig[key] = config[key]; this.myConfig[key] = config[key];
} }
console.log(this.myConfig)
} }
@Output() tokenChange = new EventEmitter<string | null>(); @Output() tokenChange = new EventEmitter<string | null>();
@Output() showDetailsChange = new EventEmitter<Wrapper>(); @Output() showDetailsChange = new EventEmitter<Wrapper>();
...@@ -166,7 +165,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { ...@@ -166,7 +165,6 @@ export class AnalysisPanelComponent implements OnInit, OnChanges {
if (this.task && this.task.info.done) { if (this.task && this.task.info.done) {
this.result = await this.netex.getTaskResult(this.token); this.result = await this.netex.getTaskResult(this.token);
console.log(this.result)
const nodeAttributes = this.result.nodeAttributes || {}; const nodeAttributes = this.result.nodeAttributes || {};
this.seedMap = nodeAttributes.isSeed || {}; this.seedMap = nodeAttributes.isSeed || {};
......
...@@ -28,6 +28,8 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges { ...@@ -28,6 +28,8 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges {
public config: IConfig; public config: IConfig;
@Output() @Output()
public showChange = new EventEmitter<boolean>(); public showChange = new EventEmitter<boolean>();
@Output()
public taskEvent = new EventEmitter<object>();
public algorithm: AlgorithmType | QuickAlgorithmType; public algorithm: AlgorithmType | QuickAlgorithmType;
...@@ -173,7 +175,9 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges { ...@@ -173,7 +175,9 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges {
} }
parameters.hub_penalty = this.multisteinerHubPenalty; parameters.hub_penalty = this.multisteinerHubPenalty;
} }
await this.analysis.startAnalysis(this.algorithm, this.target, parameters); const token = await this.analysis.startAnalysis(this.algorithm, this.target, parameters);
const object = {taskId: token, algorithm: this.algorithm, target: this.target, params: parameters};
this.taskEvent.emit(object);
} }
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
[target]="analysisDialogTarget" [target]="analysisDialogTarget"
[config]="myConfig" [config]="myConfig"
[inputNetwork]="{ nodes: proteins, edges: edges }" [inputNetwork]="{ nodes: proteins, edges: edges }"
(taskEvent)="emitTaskEvent($event)"
> >
</app-launch-analysis> </app-launch-analysis>
......
...@@ -4,8 +4,9 @@ import { ...@@ -4,8 +4,9 @@ import {
ElementRef, ElementRef,
HostListener, HostListener,
Input, Input,
OnInit, OnInit, Output,
ViewChild, ViewChild,
EventEmitter,
ViewEncapsulation ViewEncapsulation
} from '@angular/core'; } from '@angular/core';
import { import {
...@@ -115,6 +116,9 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -115,6 +116,9 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
this.createNetwork(); this.createNetwork();
} }
@Output()
public taskEvent = new EventEmitter<object>();
public get network() { public get network() {
return this.networkJSON; return this.networkJSON;
} }
...@@ -314,6 +318,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -314,6 +318,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
this.smallStyle = this.windowWidth < 1250; this.smallStyle = this.windowWidth < 1250;
} }
private zoomToNode(id: string) { private zoomToNode(id: string) {
// get network object, depending on whether analysis is open or not // get network object, depending on whether analysis is open or not
const network = this.selectedAnalysisToken ? this.analysisPanel.network : this.networkInternal; const network = this.selectedAnalysisToken ? this.analysisPanel.network : this.networkInternal;
...@@ -700,4 +705,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -700,4 +705,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
this.currentViewSelectedTissue = this.selectedTissue; this.currentViewSelectedTissue = this.selectedTissue;
} }
emitTaskEvent(eventObject: object) {
this.taskEvent.emit(eventObject);
}
} }
...@@ -289,7 +289,7 @@ export class AnalysisService { ...@@ -289,7 +289,7 @@ export class AnalysisService {
position: 'top-center', position: 'top-center',
animate: {in: 'fadeIn', out: 'fadeOut'} animate: {in: 'fadeIn', out: 'fadeOut'}
}); });
return; return '';
} }
const resp = await this.http.post<any>(`${environment.backend}task/`, { const resp = await this.http.post<any>(`${environment.backend}task/`, {
algorithm, algorithm,
...@@ -300,6 +300,7 @@ export class AnalysisService { ...@@ -300,6 +300,7 @@ export class AnalysisService {
this.tokens.push(resp.token); this.tokens.push(resp.token);
localStorage.setItem(`netex-tokens-${window.location.host}`, JSON.stringify(this.tokens)); localStorage.setItem(`netex-tokens-${window.location.host}`, JSON.stringify(this.tokens));
this.startWatching(); this.startWatching();
return resp.token;
} }
public isLaunchingQuick(): boolean { public isLaunchingQuick(): boolean {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<button onclick=changeConfigStr('{"legendPos":"left"}') > Legend to Left </button> <br> <button onclick=changeConfigStr('{"legendPos":"left"}') > Legend to Left </button> <br>
<button onclick=changeConfigStr('{"legendPos":"right"}') > Legend to Right </button> <br> <button onclick=changeConfigStr('{"legendPos":"right"}') > Legend to Right </button> <br>
<button onclick=changeConfigStr('{"interactions":"omnipath"}') >Get Omnipath Interactions </button> <br> <button onclick=changeConfigStr('{"interactions":"omnipath"}') >Get Omnipath Interactions </button> <br>
<button onclick="initTaskEventListener()">Init Task-Eventlistener</button> <br>
<!--<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') checked /> Show SimpleAnalysis<br>--> <!--<input type="checkbox" onclick=changeConfigStr('{"showSimpleAnalysis":'+this.checked+'}') checked /> Show SimpleAnalysis<br>-->
...@@ -95,6 +96,11 @@ ...@@ -95,6 +96,11 @@
netexp.setAttribute('config', config); netexp.setAttribute('config', config);
} }
function initTaskEventListener(){
document.getElementsByTagName("network-expander")[0].addEventListener("taskEvent",(event)=>{console.log(event.detail)})
}
function setNetwork(nw) { function setNetwork(nw) {
const netexp = document.getElementById(nw); const netexp = document.getElementById(nw);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment