diff --git a/Dockerfile.dev b/Dockerfile.dev index 92f94e58693701446d1472a5d669f90513d4fdf9..b7be260b872c65073a68c4828ac9fd0e078a9b8f 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -16,9 +16,14 @@ RUN npm install COPY . /app/ -RUN npm run build -- --prod --base-href=/covex_dev/ +RUN npm run -- bundle -RUN cp -r dist/covid19/* /usr/share/nginx/html/ +RUN cp -r website/* /usr/share/nginx/html/ + +RUN mkdir /usr/share/nginx/html/lib +RUN cp dist/covid19/bundle-es2015.js /usr/share/nginx/html/lib/ +RUN cp dist/covid19/bundle-es5.js /usr/share/nginx/html/lib/ +RUN cp dist/covid19/styles.scss /usr/share/nginx/html/lib/ COPY nginx/default.conf /etc/nginx/conf.d/ COPY nginx/htpasswd /etc/nginx/htpasswd diff --git a/package.json b/package.json index aaac7c835f13e5c69cf6b2f7e3a5426ee315c97d..6a6ede4229c2471c6e171a1ecbdea9a93bb861f8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,11 @@ "build": "ng build", "test": "ng test", "lint": "ng lint && htmlhint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "build-prod": "ng build --prod --output-hashing=none", + "package-es5": "cd dist/covid19 && cat runtime-es5.js polyfills-es5.js main-es5.js > bundle-es5.js", + "package-es2015": "cd dist/covid19 && cat runtime-es2015.js polyfills-es2015.js main-es2015.js > bundle-es2015.js", + "bundle": "npm run build-prod covid19 && npm run package-es5 && npm run package-es2015" }, "private": true, "dependencies": { diff --git a/src/app/analysis.service.ts b/src/app/analysis.service.ts index 780307fdced4f8c610a95acc253f7656aa13922c..23ce8084a92007881179f8b55fc341b98426f564 100644 --- a/src/app/analysis.service.ts +++ b/src/app/analysis.service.ts @@ -160,7 +160,7 @@ export class AnalysisService { const newSelection = []; nodes.forEach((node) => { const wrapper: Wrapper = node.wrapper; - if (wrapper.type === 'host' || wrapper.type === 'virus') { + if (wrapper.type === 'protein') { if (!this.inSelection(wrapper)) { newSelection.push(wrapper); } @@ -204,15 +204,7 @@ export class AnalysisService { } public removeAllHostProteins() { - const items: Wrapper[] = Array.from(this.selectedItems.values()).filter(p => p.type === 'host'); - for (const wrapper of items) { - this.selectedItems.delete(wrapper.nodeId); - } - this.selectListSubject.next({items, selected: false}); - } - - public removeAllViralProteins() { - const items: Wrapper[] = Array.from(this.selectedItems.values()).filter(p => p.type === 'virus'); + const items: Wrapper[] = Array.from(this.selectedItems.values()).filter(p => p.type === 'protein'); for (const wrapper of items) { this.selectedItems.delete(wrapper.nodeId); } diff --git a/src/app/components/analysis-panel/analysis-panel.component.html b/src/app/components/analysis-panel/analysis-panel.component.html index e5dd42fb96387cfe095cf42914a9da1c97105367..6ff2bde3fd65f98e35fcf9711bb3bcf912679fd3 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -71,13 +71,6 @@ <i *ngIf="!task.info.parameters.includeNonApprovedDrugs" class="fa fa-times"></i> </td> </tr> - <tr *ngIf="task.info.parameters.ignoreNonSeedBaits !== undefined && task.info.target === 'drug-target'"> - <td>Include non-seed viral proteins</td> - <td> - <i *ngIf="!task.info.parameters.ignoreNonSeedBaits" class="fa fa-check"></i> - <i *ngIf="task.info.parameters.ignoreNonSeedBaits" class="fa fa-times"></i> - </td> - </tr> </tbody> </table> </div> @@ -287,13 +280,6 @@ </button> <p-sortIcon [field]="'score'"></p-sortIcon> </th> - <th> - Closest viral proteins - </th> - <th [pSortableColumn]="'closestDistance'"> - Viral protein distance - <p-sortIcon [field]="'closestDistance'"></p-sortIcon> - </th> </tr> </ng-template> <ng-template pTemplate="body" let-e> @@ -328,12 +314,6 @@ </span> </td> <td *ngIf="tableHasScores">{{e.score | number}}</td> - <td title="{{previewStringArray(e.closestViralProteins, 100)}}"> - {{previewStringArray(e.closestViralProteins, 3)}} - </td> - <td> - {{e.closestDistance}} - </td> </tr> </ng-template> </p-table> @@ -380,13 +360,6 @@ Seed <p-sortIcon [field]="'isSeed'"></p-sortIcon> </th> - <th> - Closest viral proteins - </th> - <th [pSortableColumn]="'closestDistance'"> - Closest distance - <p-sortIcon [field]="'closestDistance'"></p-sortIcon> - </th> </tr> </ng-template> <ng-template pTemplate="body" let-e> @@ -407,12 +380,6 @@ <i class="fa fa-times"></i> </span> </td> - <td title="{{previewStringArray(e.closestViralProteins, 100)}}"> - {{previewStringArray(e.closestViralProteins, 3)}} - </td> - <td> - {{e.closestDistance}} - </td> </tr> </ng-template> </p-table> diff --git a/src/app/components/analysis-panel/analysis-panel.component.ts b/src/app/components/analysis-panel/analysis-panel.component.ts index db25357172167037310a3b4d0ce5255ec855e1a5..ca204933f123933c33135b994e4ac9593b7a7808 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.ts +++ b/src/app/components/analysis-panel/analysis-panel.component.ts @@ -255,7 +255,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { const proteinSelection = this.tableSelectedProteins; const viralProteinSelection = this.tableSelectedViralProteins; for (const item of items) { - if (item.type === 'host') { + if (item.type === 'protein') { // TODO: Refactor! const found = proteinSelection.findIndex((i) => getProteinNodeId(i) === item.nodeId); const tableItem = this.tableProteins.find((i) => getProteinNodeId(i) === item.nodeId); @@ -293,7 +293,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { const proteinSelection = []; const viralProteinSelection = []; for (const item of items) { - if (item.type === 'host') { + if (item.type === 'protein') { const tableItem = this.tableProteins.find((i) => getProteinNodeId(i) === item.nodeId); if (tableItem) { proteinSelection.push(tableItem); @@ -369,12 +369,10 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { } public inferNodeType(nodeId: string): WrapperType { - if (nodeId.indexOf('-') !== -1 || nodeId.indexOf('_') !== -1) { - return 'virus'; - } else if (nodeId.startsWith('DB')) { + if (nodeId.startsWith('DB')) { return 'drug'; } - return 'host'; + return 'protein'; } public createNetwork(result: any): { edges: any[], nodes: any[] } { @@ -393,7 +391,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { const details = attributes.details || {}; const wrappers: { [key: string]: Wrapper } = {}; for (const node of network.nodes) { - if (nodeTypes[node] === 'host') { + if (nodeTypes[node] === 'protein') { this.proteins.push(details[node]); wrappers[node] = getWrapperFromProtein(details[node]); } else if (nodeTypes[node] === 'drug') { @@ -417,7 +415,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges { let wrapper: Wrapper; let drugType; let drugInTrial; - if (nodeType === 'host') { + if (nodeType === 'protein') { const protein = details as Protein; wrapper = getWrapperFromProtein(protein); nodeLabel = protein.name; diff --git a/src/app/components/info-tile/info-tile.component.html b/src/app/components/info-tile/info-tile.component.html index 26cbec22bff0cf7012848e520ad7c7d1dfe3f40a..9d64bd448f771879cbb64f320225984bfe51196f 100644 --- a/src/app/components/info-tile/info-tile.component.html +++ b/src/app/components/info-tile/info-tile.component.html @@ -1,5 +1,5 @@ <div *ngIf="wrapper"> - <div *ngIf="wrapper.type === 'host'"> + <div *ngIf="wrapper.type === 'protein'"> <p> <b><span>Gene Name: </span></b> {{ wrapper.data.name }} @@ -20,17 +20,6 @@ {{ wrapper.data.expressionLevel|number }} </p> </div> - <div *ngIf="wrapper.type === 'virus'"> - <p> - <b><span>Virus:</span></b> - {{ wrapper.data.virusName.replace('V', 'V-') }} - <span class="icon is-small"><i class="fas fa-virus"></i></span> - </p> - <p> - <b><span>Effect: </span></b> - {{ wrapper.data.effectName }} - </p> - </div> <div *ngIf="wrapper.type === 'drug'"> <p> <b><span>Name: </span></b> diff --git a/src/app/components/query-tile/query-tile.component.html b/src/app/components/query-tile/query-tile.component.html index 93bdd6289e73db3b68f390e7be664827dfd8bbd9..b053d67c0db4c7941b5446c139eb92f0c76dc82e 100644 --- a/src/app/components/query-tile/query-tile.component.html +++ b/src/app/components/query-tile/query-tile.component.html @@ -2,11 +2,9 @@ <ng-select [items]="queryItems" bindLabel="backendId" bindValue="data" [virtualScroll]="true" class="custom" placeholder="Search..." [hideSelected]="true" [searchFn]="querySearch" (change)="select($event)" data-tooltip="Find proteins in the network."> <ng-template ng-option-tmp let-item="item"> - <b *ngIf="item.type == 'host'"> {{item.data.name}}</b> - <b *ngIf="item.type == 'virus'"> {{item.data.effectName}}</b> <br/> - <span><small *ngIf="item.type === 'virus'">Viral Protein</small><small *ngIf="item.type === 'host'">Host Protein</small> | </span> - <span *ngIf="item.type == 'host'"><small>AC: <b>{{item.data.proteinAc}}</b></small> </span> - <span *ngIf="item.type == 'virus'"><small><b>{{item.data.virusName.replace('V', 'V-')}}</b></small></span> + <b *ngIf="item.type == 'protein'"> {{item.data.name}}</b> + <span><small *ngIf="item.type === 'protein'">Host Protein</small> | </span> + <span *ngIf="item.type == 'protein'"><small>AC: <b>{{item.data.proteinAc}}</b></small> </span> </ng-template> </ng-select> </div> diff --git a/src/app/config.ts b/src/app/config.ts index f6d3e60372cc6f473e8975223b4224e7877ae38c..34a5a918cbbb1de0c39d47bc9d762a7bb4b4651f 100644 --- a/src/app/config.ts +++ b/src/app/config.ts @@ -5,7 +5,6 @@ export interface IConfig { showLeftSidebar: boolean; showOverview: boolean; showQuery: boolean; - showFilter: boolean; showItemSelector: boolean; showSimpleAnalysis: boolean; showAdvAnalysis: boolean; @@ -21,7 +20,6 @@ export const defaultConfig: IConfig = { showLeftSidebar: true, showOverview: true, showQuery: true, - showFilter: true, showItemSelector: true, showSimpleAnalysis: false, showAdvAnalysis: true, diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.html b/src/app/dialogs/launch-analysis/launch-analysis.component.html index 3fee026fc4f868ca4af6eed60d03058abe28fab1..9133d7867a755f960a20b53d8c9d9d538d23db5e 100644 --- a/src/app/dialogs/launch-analysis/launch-analysis.component.html +++ b/src/app/dialogs/launch-analysis/launch-analysis.component.html @@ -13,13 +13,6 @@ <button (click)="close()" class="delete" aria-label="close"></button> </header> <section class="modal-card-body"> - <div *ngIf="target === 'drug' && hasBaits"> - <div class="notification is-warning warning"> - You have selected <i class="fa fa-virus"></i> viral proteins. - When finding drugs, make sure you have selected <i class="fa fa-dna"></i> host proteins only. - </div> - </div> - <div *ngIf="!analysis.canLaunchTask()"> <div class="notification is-warning warning"> You can only run {{maxTasks}} tasks at once. Please wait for one of them to finish or delete it from the task @@ -97,15 +90,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="trustrankIncludeViralNonSeeds"> - </app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -181,14 +165,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="closenessIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -236,14 +212,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="degreeIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -353,14 +321,6 @@ </p> </div> - <div class="field"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="betweennessIncludeViralNonSeeds"></app-toggle> - </div> - <div class="box"> <article class="media"> <div class="media-left"> @@ -381,13 +341,6 @@ </div> <div *ngIf="algorithm==='keypathwayminer'"> - <div *ngIf="hasBaits"> - <div class="notification is-warning warning"> - You have selected <i class="fa fa-virus"></i> viral proteins. - If you want to use KeyPathwayMiner, please remove them because it cannot process them. - </div> - </div> - <div class="field"> <label class="label" for="keypathwayminer-k">Additional proteins</label> <div class="control"> @@ -491,14 +444,6 @@ </p> </div> - <div class="field" *ngIf="target === 'drug-target'"> - <label class="label">Include non-seed viral proteins</label> - <app-toggle textOn="Include" textOff="Ignore" - tooltipOn="Include viral proteins that are not seeds." - tooltipOff="Exclude viral proteins that are not seeds." - [(value)]="multisteinerIncludeViralNonSeeds"></app-toggle> - </div> - </div> <p class="doc-link"> @@ -511,7 +456,7 @@ <footer class="modal-card-foot"> <button (click)="startTask(); close()" class="button is-success is-rounded has-tooltip" data-tooltip="Run the analysis." - [disabled]="(target === 'drug' && hasBaits) || !analysis.canLaunchTask() || (algorithm === 'keypathwayminer' && hasBaits)"> + [disabled]="!analysis.canLaunchTask()"> <span class="icon"> <i class="fa fa-rocket"></i> </span> diff --git a/src/app/dialogs/launch-analysis/launch-analysis.component.ts b/src/app/dialogs/launch-analysis/launch-analysis.component.ts index 077516b76de0e1894f1fee0009df9b1a186e1e88..9026cdaf2d6bcbcfe745d0d2c35a4055ebbd1cac 100644 --- a/src/app/dialogs/launch-analysis/launch-analysis.component.ts +++ b/src/app/dialogs/launch-analysis/launch-analysis.component.ts @@ -9,7 +9,6 @@ import { QuickAlgorithmType, TRUSTRANK } from '../../analysis.service'; -import {Dataset} from '../../interfaces'; @Component({ selector: 'app-launch-analysis', @@ -74,15 +73,9 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges { public multisteinerMaxDeg = 0; public multisteinerHubPenalty = 0.0; - public hasBaits; - public maxTasks = MAX_TASKS; constructor(public analysis: AnalysisService) { - this.hasBaits = !!analysis.getSelection().find((i) => i.type === 'virus'); - analysis.subscribeList(() => { - this.hasBaits = !!analysis.getSelection().find((i) => i.type === 'virus'); - }); } ngOnInit(): void { @@ -108,7 +101,7 @@ export class LaunchAnalysisComponent implements OnInit, OnChanges { seeds: this.analysis.getSelection().map((item) => item.backendId), }; - parameters.target_or_drugs = this.target === 'drug' ? 'drugs' : 'PPI'; + parameters.target_or_drugs = this.target === 'drug' ? 'PPDr' : 'PPI'; if (this.algorithm === 'trustrank') { parameters.damping_factor = this.trustrankDampingFactor; diff --git a/src/app/interfaces.ts b/src/app/interfaces.ts index 3e5bcc41c8cf6792d983f324d79456e72fb995f2..230bb223c1acbabf0ec1b368f7574b048d317332 100644 --- a/src/app/interfaces.ts +++ b/src/app/interfaces.ts @@ -92,7 +92,7 @@ export function getWrapperFromProtein(protein: Protein): Wrapper { return { backendId: getProteinBackendId(protein), nodeId: getProteinNodeId(protein), - type: 'host', + type: 'protein', data: protein, }; } @@ -106,7 +106,7 @@ export function getWrapperFromDrug(drug: Drug): Wrapper { }; } -export type WrapperType = 'host' | 'virus' | 'drug'; +export type WrapperType = 'protein' | 'drug'; export interface Wrapper { backendId: string; diff --git a/src/app/network-settings.ts b/src/app/network-settings.ts index e74902c237f2f299cdaeaa8d8018904f2845dd03..83a622c31f9e00db24565e2b8091288f24b93490 100644 --- a/src/app/network-settings.ts +++ b/src/app/network-settings.ts @@ -80,20 +80,16 @@ export class NetworkSettings { private static drugInTrialShape = 'triangle'; static getNodeSize(wrapperType: WrapperType) { - if (wrapperType === 'host') { + if (wrapperType === 'protein') { return this.hostSize; - } else if (wrapperType === 'virus') { - return this.virusSize; } else if (wrapperType === 'drug') { return this.drugSize; } } static getNodeShape(wrapperType: WrapperType, drugInTrial?: boolean) { - if (wrapperType === 'host') { + if (wrapperType === 'protein') { return this.hostShape; - } else if (wrapperType === 'virus') { - return this.virusShape; } else if (wrapperType === 'drug') { if (drugInTrial) { return this.drugInTrialShape; @@ -125,13 +121,11 @@ export class NetworkSettings { } } - static getColor(color: 'host' | 'virus' | 'approvedDrug' | 'unapprovedDrug' | 'hostFont' | 'virusFont' | 'drugFont' | + static getColor(color: 'protein' | 'approvedDrug' | 'unapprovedDrug' | 'hostFont' | 'virusFont' | 'drugFont' | 'nonSeedHost' | 'nonSeedVirus' | 'selectedForAnalysis' | 'selectedForAnalysisText' | 'edgeHostVirus' | 'edgeHostVirusHighlight' | 'edgeHostDrug' | 'edgeHostDrugHighlight') { - if (color === 'host') { + if (color === 'protein') { return this.hostColor; - } else if (color === 'virus') { - return this.virusColor; } else if (color === 'approvedDrug') { return this.approvedDrugColor; } else if (color === 'unapprovedDrug') { @@ -158,10 +152,8 @@ export class NetworkSettings { } static getFont(wrapperType: WrapperType, drugInTrial?: boolean) { - if (wrapperType === 'host') { + if (wrapperType === 'protein') { return {color: this.hostFontColor, size: this.hostFontSize}; - } else if (wrapperType === 'virus') { - return {color: this.virusFontColor, size: this.virusFontSize}; } else if (wrapperType === 'drug') { if (!drugInTrial) { return {color: this.drugFontColor, size: this.drugFontSize}; @@ -188,20 +180,12 @@ export class NetworkSettings { nodeShape = NetworkSettings.getNodeShape(nodeType); nodeSize = NetworkSettings.getNodeSize(nodeType); nodeFont = NetworkSettings.getFont(nodeType); - if (nodeType === 'host') { + if (nodeType === 'protein') { nodeColor = NetworkSettings.getColor(nodeType); - nodeFont = NetworkSettings.getFont('host'); + nodeFont = NetworkSettings.getFont('protein'); if (!isSeed) { nodeColor = NetworkSettings.getColor('nonSeedHost'); } - } else if (nodeType === 'virus') { - nodeColor = NetworkSettings.getColor(nodeType); - if (nodeType === 'virus') { - nodeFont = NetworkSettings.getFont('virus'); - if (!isSeed) { - nodeColor = NetworkSettings.getColor('nonSeedVirus'); - } - } } else if (nodeType === 'drug') { if (drugType === 'approved') { nodeColor = NetworkSettings.getColor('approvedDrug'); diff --git a/src/app/pages/explorer-page/explorer-page.component.html b/src/app/pages/explorer-page/explorer-page.component.html index 443f47dc311f19ec176a5e78d0eb54dd1d31a6fd..ba67fd3595ffd55b8e65c618cb2e4437d2d54e23 100644 --- a/src/app/pages/explorer-page/explorer-page.component.html +++ b/src/app/pages/explorer-page/explorer-page.component.html @@ -171,14 +171,13 @@ <p class="card-header-title"> <span class="icon"> <i *ngIf="!selectedWrapper" class="fas fa-info" aria-hidden="true"></i> - <i *ngIf="selectedWrapper && selectedWrapper.type === 'host'" class="fas fa-dna" aria-hidden="true"></i> - <i *ngIf="selectedWrapper && selectedWrapper.type === 'virus'" class="fas fa-virus" aria-hidden="true"></i> + <i *ngIf="selectedWrapper && selectedWrapper.type === 'protein'" class="fas fa-dna" aria-hidden="true"></i> <i *ngIf="selectedWrapper && selectedWrapper.type === 'drug'" class="fas fa-capsules" aria-hidden="true"></i> </span> <span *ngIf="!selectedWrapper">No item selected</span> <span *ngIf="selectedWrapper"> - <span *ngIf="selectedWrapper.type === 'host'">Protein</span> + <span *ngIf="selectedWrapper.type === 'protein'">Host Protein</span> <span *ngIf="selectedWrapper.type === 'drug'">Drug</span> </span> </p> @@ -274,7 +273,7 @@ <span class="icon"> <i class="fas fa-flask" aria-hidden="true"></i> </span> - Advanced Analysis + Analysis </p> <a (click)="collapseAnalysis = !collapseAnalysis" data-action="collapse" class="card-header-icon is-hidden-fullscreen" aria-label="more options"> @@ -407,12 +406,10 @@ <tr *ngFor="let p of analysis.getSelection()"> <td> <span class="icon"> - <i class="fa fa-dna" *ngIf="p.type == 'host'"></i> - <i class="fa fa-virus" *ngIf="p.type =='virus'"></i> + <i class="fa fa-dna" *ngIf="p.type == 'protein'"></i> </span> </td> - <td *ngIf="p.type == 'virus'">{{p.data.effectName}}</td> - <td *ngIf="p.type == 'host'">{{p.data.name}}</td> + <td *ngIf="p.type == 'protein'">{{p.data.name}}</td> <td> <button (click)="analysis.removeItems([p])" class="button is-small is-danger is-outlined has-tooltip" data-tooltip="Remove from selection."> diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index d42cf73363857a219f66f76adcddd40d255a11fe..66f901e69948b935e55fae5fb6e4e76465bd78bf 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -67,7 +67,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { public selectedWrapper: Wrapper | null = null; public collapseAnalysisQuick = true; - public collapseAnalysis = false; + public collapseAnalysis = true; public collapseDetails = true; public collapseTask = true; public collapseSelection = true; @@ -299,7 +299,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { private mapHostProteinToNode(hostProtein: Protein): any { const wrapper = getWrapperFromProtein(hostProtein); - const node = NetworkSettings.getNodeStyle('host', true, this.analysis.inSelection(wrapper)); + const node = NetworkSettings.getNodeStyle('protein', true, this.analysis.inSelection(wrapper)); let nodeLabel = hostProtein.name; if (hostProtein.name.length === 0) { nodeLabel = hostProtein.proteinAc; @@ -365,7 +365,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { gProfilerLink(): string { const queryString = this.analysis.getSelection() - .filter(wrapper => wrapper.type === 'host') + .filter(wrapper => wrapper.type === 'protein') .map(wrapper => wrapper.data.proteinAc) .join('%0A'); return 'http://biit.cs.ut.ee/gprofiler/gost?' + diff --git a/src/index.html b/src/index.html index 870537e3d928c752e812a4aa81673f4160416ce4..5fc741c8cbffb2c5b2794657dd5615369ae5de72 100644 --- a/src/index.html +++ b/src/index.html @@ -1,14 +1,6 @@ <!doctype html> <html lang="en"> <head> -<style> - .my-legend-1{ - width: 10%; - } -</style> - - - <meta charset="utf-8"> <title>Network Expander</title> <base href="/"> @@ -25,16 +17,14 @@ <input type="checkbox" onclick=changeConfigStr('{"showOverview":'+this.checked+'}') checked /> Show overview<br> <input type="checkbox" onclick=changeConfigStr('{"showQuery":'+this.checked+'}') /> Show query<br> -<input type="checkbox" onclick=changeConfigStr('{"showFilter":'+this.checked+'}') /> Show filter<br> <input type="checkbox" onclick=changeConfigStr('{"showLeftSidebar":'+this.checked+'}') checked /> Show sidebar<br> <br> -<button onclick="changeConfig()">Hide sidebar</button> <button onclick="setNetwork('netexp1')">Add proteins</button> -<div style="border: 3px solid red"> - <network-expander id="netexp1" config='{"legendClass": "my-legend-1", "showQuery": false, "showFilter": false}' onload="init1()" style="height: 100vh"></network-expander> +<div> + <network-expander id="netexp1" config='{"legendClass": "my-legend-1", "showQuery": false}' onload="init1()" style="height: 100vh"></network-expander> </div> <!-- @@ -43,8 +33,6 @@ </div> --> - - <script> function init1() { document.getElementsByClassName('my-legend-1')[0].onclick = function() {this.remove()}; diff --git a/src/styles.scss b/src/styles.scss index 1cfb339b6a2df523957dff31b50a61aea0d7d8d2..11392e29ad65977d98c76561e268299213bde206 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -16,6 +16,8 @@ $info: $primary; @import "~primeng/resources/primeng.min.css"; @import "~primeicons/primeicons.css"; +$height: '1000px'; + nav.navbar { height: 60px; } @@ -53,7 +55,7 @@ input.checkbox { } div.covex.sidebar { - height: calc(100% - 70px); + height: calc(#{$height} - 70px); overflow-y: auto; overflow-x: hidden; width: 340px; @@ -109,7 +111,7 @@ div.card.network { } div.network { - height: calc(100% - 200px); + height: calc(#{$height} - 200px); } div.parent { @@ -134,7 +136,7 @@ div.center { div.covex.explorer { - height: calc(100% - 70px); + height: calc(#{$height} - 70px); margin-left: 10px; margin-right: 10px; } diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000000000000000000000000000000000000..0ccf46fa801aad83232e5c543f9f967687f44662 --- /dev/null +++ b/website/index.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>DrugsToNe</title> +</head> +<body> + +DrugsToNe! + +</body> +</html>