Skip to content
Snippets Groups Projects
Commit 340e9c08 authored by AndiMajore's avatar AndiMajore
Browse files

added config for activating adjacent drugs and disorders

parent 48fde5fc
No related branches found
No related tags found
No related merge requests found
...@@ -204,6 +204,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit ...@@ -204,6 +204,7 @@ export class AnalysisPanelComponent implements OnInit, OnChanges, AfterViewInit
if (!this.drugstoneConfig.config.physicsOn) { if (!this.drugstoneConfig.config.physicsOn) {
this.networkHandler.activeNetwork.updatePhysicsEnabled(false); this.networkHandler.activeNetwork.updatePhysicsEnabled(false);
} }
this.networkHandler.updateAdjacentNodes();
}); });
this.tableDrugs = nodes.filter(e => e.drugstoneId && e.drugstoneType === 'drug'); this.tableDrugs = nodes.filter(e => e.drugstoneId && e.drugstoneType === 'drug');
this.tableDrugs.forEach((r) => { this.tableDrugs.forEach((r) => {
......
...@@ -21,7 +21,7 @@ import {NetworkSettings} from 'src/app/network-settings'; ...@@ -21,7 +21,7 @@ import {NetworkSettings} from 'src/app/network-settings';
import {pieChartContextRenderer} from 'src/app/utils'; import {pieChartContextRenderer} from 'src/app/utils';
import {NetworkHandlerService} from 'src/app/services/network-handler/network-handler.service'; import {NetworkHandlerService} from 'src/app/services/network-handler/network-handler.service';
import {LegendService} from 'src/app/services/legend-service/legend-service.service'; import {LegendService} from 'src/app/services/legend-service/legend-service.service';
import { LoadingScreenService } from 'src/app/services/loading-screen/loading-screen.service'; import {LoadingScreenService} from 'src/app/services/loading-screen/loading-screen.service';
@Component({ @Component({
...@@ -81,7 +81,7 @@ export class NetworkComponent implements OnInit { ...@@ -81,7 +81,7 @@ export class NetworkComponent implements OnInit {
public nodeRenderer = null; public nodeRenderer = null;
public loading = false public loading = false;
constructor( constructor(
public configService: DrugstoneConfigService, public configService: DrugstoneConfigService,
...@@ -91,8 +91,8 @@ export class NetworkComponent implements OnInit { ...@@ -91,8 +91,8 @@ export class NetworkComponent implements OnInit {
public drugstoneConfig: DrugstoneConfigService, public drugstoneConfig: DrugstoneConfigService,
public netex: NetexControllerService, public netex: NetexControllerService,
public omnipath: OmnipathControllerService, public omnipath: OmnipathControllerService,
public loadingScreen: LoadingScreenService) public loadingScreen: LoadingScreenService) {
{} }
ngOnInit(): void { ngOnInit(): void {
this.networkHandler.networks[this.networkType] = this; this.networkHandler.networks[this.networkType] = this;
...@@ -116,15 +116,16 @@ export class NetworkComponent implements OnInit { ...@@ -116,15 +116,16 @@ export class NetworkComponent implements OnInit {
updateQueryItems() { updateQueryItems() {
this.queryItems = []; this.queryItems = [];
if (this.currentViewNodes) if (this.currentViewNodes) {
this.currentViewNodes.forEach((protein) => { this.currentViewNodes.forEach((protein) => {
this.queryItems.push(getWrapperFromNode(protein)); this.queryItems.push(getWrapperFromNode(protein));
}); });
}
} }
public saveAddNodes(nodeList: Node[]) { public saveAddNodes(nodeList: Node[]) {
const existing = this.nodeData.nodes.get().map(n => n.id); const existing = this.nodeData.nodes.get().map(n => n.id);
const toAdd = nodeList.filter(n => existing.indexOf(n.id) === -1) const toAdd = nodeList.filter(n => existing.indexOf(n.id) === -1);
this.nodeData.nodes.add(toAdd); this.nodeData.nodes.add(toAdd);
} }
...@@ -132,31 +133,33 @@ export class NetworkComponent implements OnInit { ...@@ -132,31 +133,33 @@ export class NetworkComponent implements OnInit {
this.loadingScreen.stateUpdate(true); this.loadingScreen.stateUpdate(true);
this.adjacentDisordersProtein = bool; this.adjacentDisordersProtein = bool;
if (this.adjacentDisordersProtein) { if (this.adjacentDisordersProtein) {
this.legendService.add_to_context('adjacentDisorders') this.legendService.add_to_context('adjacentDisorders');
this.netex.adjacentDisorders(this.nodeData.nodes.get(), 'proteins', this.drugstoneConfig.config.associatedProteinDisorder, this.drugstoneConfig.config.licensedDatasets).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 proteinMap = this.getProteinMap();
const addedEdge = {} const addedEdge = {};
for (const interaction of response.edges) { for (const interaction of response.edges) {
const edge = mapCustomEdge({from: interaction.protein, to: interaction.disorder}, this.drugstoneConfig.config) const edge = mapCustomEdge({from: interaction.protein, to: interaction.disorder}, this.drugstoneConfig.config);
if (proteinMap[edge.from]) { if (proteinMap[edge.from]) {
proteinMap[edge.from].forEach(from => { proteinMap[edge.from].forEach(from => {
if (addedEdge[from] && addedEdge[from].indexOf(edge.to) !== -1) if (addedEdge[from] && addedEdge[from].indexOf(edge.to) !== -1) {
return return;
const e = JSON.parse(JSON.stringify(edge)) }
e.from = from const e = JSON.parse(JSON.stringify(edge));
e.to = edge.to e.from = from;
e.to = edge.to;
this.adjacentProteinDisorderEdgesList.push(e); this.adjacentProteinDisorderEdgesList.push(e);
if (!addedEdge[from]) if (!addedEdge[from]) {
addedEdge[from] = [edge.to] addedEdge[from] = [edge.to];
else } else {
addedEdge[from].push(edge.to) addedEdge[from].push(edge.to);
}) }
});
} }
} }
for (const disorder of response.disorders) { for (const disorder of response.disorders) {
disorder.group = 'defaultDisorder'; disorder.group = 'defaultDisorder';
disorder.id = disorder.drugstoneId; disorder.id = disorder.drugstoneId;
this.adjacentProteinDisorderList.push(mapCustomNode(disorder, this.drugstoneConfig.currentConfig())) this.adjacentProteinDisorderList.push(mapCustomNode(disorder, this.drugstoneConfig.currentConfig()));
} }
this.saveAddNodes(this.adjacentProteinDisorderList); this.saveAddNodes(this.adjacentProteinDisorderList);
this.nodeData.edges.add(this.adjacentProteinDisorderEdgesList); this.nodeData.edges.add(this.adjacentProteinDisorderEdgesList);
...@@ -197,8 +200,9 @@ export class NetworkComponent implements OnInit { ...@@ -197,8 +200,9 @@ export class NetworkComponent implements OnInit {
this.loadingScreen.stateUpdate(false); this.loadingScreen.stateUpdate(false);
}); });
} else { } else {
if (!this.adjacentDisordersProtein) if (!this.adjacentDisordersProtein) {
this.legendService.remove_from_context('adjacentDisorders'); this.legendService.remove_from_context('adjacentDisorders');
}
this.saveRemoveDisorders(this.adjacentDrugDisorderList); this.saveRemoveDisorders(this.adjacentDrugDisorderList);
this.nodeData.edges.remove(this.adjacentDrugDisorderEdgesList); this.nodeData.edges.remove(this.adjacentDrugDisorderEdgesList);
this.adjacentDrugDisorderList = []; this.adjacentDrugDisorderList = [];
...@@ -209,68 +213,73 @@ export class NetworkComponent implements OnInit { ...@@ -209,68 +213,73 @@ export class NetworkComponent implements OnInit {
} }
public getProteinMap() { public getProteinMap() {
const proteinMap = {} const proteinMap = {};
this.nodeData.nodes.get().forEach(n => { this.nodeData.nodes.get().forEach(n => {
if (n.drugstoneType === 'protein') { if (n.drugstoneType === 'protein') {
n.drugstoneId.forEach(id => { n.drugstoneId.forEach(id => {
if (typeof id === 'string') { if (typeof id === 'string') {
if (proteinMap[id]) if (proteinMap[id]) {
proteinMap[id].push(n.id) proteinMap[id].push(n.id);
else } else {
proteinMap[id] = [n.id]; proteinMap[id] = [n.id];
}
} else { } else {
n.id.forEach(single_id => { n.id.forEach(single_id => {
if (proteinMap[single_id]) if (proteinMap[single_id]) {
proteinMap[single_id].push(n.id) proteinMap[single_id].push(n.id);
else } else {
proteinMap[single_id] = [n.id]; proteinMap[single_id] = [n.id];
}) }
});
} }
}); });
} }
}); });
return proteinMap return proteinMap;
} }
public updateAdjacentDrugs(bool: boolean) { public updateAdjacentDrugs(bool: boolean) {
this.loadingScreen.stateUpdate(true); this.loadingScreen.stateUpdate(true);
this.adjacentDrugs = bool; this.adjacentDrugs = bool;
if (this.adjacentDrugs) { if (this.adjacentDrugs) {
this.legendService.add_to_context("adjacentDrugs") this.legendService.add_to_context('adjacentDrugs');
const addedEdge = {} const addedEdge = {};
const proteinMap = this.getProteinMap() const proteinMap = this.getProteinMap();
this.netex.adjacentDrugs(this.drugstoneConfig.config.interactionDrugProtein, this.drugstoneConfig.config.licensedDatasets, 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); const existingDrugIDs = this.nodeData.nodes.get().filter(n => n.drugstoneId && n.drugstoneType === 'drug').map(n => n.drugstoneId);
for (const interaction of response.pdis) { for (const interaction of response.pdis) {
const edge = mapCustomEdge({from: interaction.protein, to: interaction.drug}, this.drugstoneConfig.currentConfig()) const edge = mapCustomEdge({from: interaction.protein, to: interaction.drug}, this.drugstoneConfig.currentConfig());
if (proteinMap[edge.from]) { if (proteinMap[edge.from]) {
proteinMap[edge.from].forEach(from => { proteinMap[edge.from].forEach(from => {
if (addedEdge[from] && addedEdge[from].indexOf(edge.to) !== -1) if (addedEdge[from] && addedEdge[from].indexOf(edge.to) !== -1) {
return return;
const e = JSON.parse(JSON.stringify(edge)) }
e.from = from const e = JSON.parse(JSON.stringify(edge));
e.to = edge.to e.from = from;
e.to = edge.to;
this.adjacentDrugEdgesList.push(e); this.adjacentDrugEdgesList.push(e);
if (!addedEdge[from]) if (!addedEdge[from]) {
addedEdge[from] = [edge.to] addedEdge[from] = [edge.to];
else } else {
addedEdge[from].push(edge.to) addedEdge[from].push(edge.to);
}) }
});
} }
} }
for (const drug of response.drugs) { for (const drug of response.drugs) {
drug.group = 'foundDrug'; drug.group = 'foundDrug';
drug.id = getDrugNodeId(drug); drug.id = getDrugNodeId(drug);
if (existingDrugIDs.indexOf(drug.drugstoneId) === -1) { if (!existingDrugIDs.includes(drug.drugstoneId)) {
this.adjacentDrugList.push(mapCustomNode(drug, this.drugstoneConfig.currentConfig())) existingDrugIDs.push(drug.drugstoneId);
this.adjacentDrugList.push(mapCustomNode(drug, this.drugstoneConfig.currentConfig()));
} }
} }
this.nodeData.nodes.add(this.adjacentDrugList); this.nodeData.nodes.add(this.adjacentDrugList);
this.nodeData.edges.add(this.adjacentDrugEdgesList); this.nodeData.edges.add(this.adjacentDrugEdgesList);
this.updateQueryItems(); this.updateQueryItems();
this.loadingScreen.stateUpdate(false); this.loadingScreen.stateUpdate(false);
}) });
} else { } else {
// remove adjacent drugs, make sure that also drug associated disorders are removed // remove adjacent drugs, make sure that also drug associated disorders are removed
if (this.adjacentDisordersDrug) { if (this.adjacentDisordersDrug) {
...@@ -290,13 +299,13 @@ export class NetworkComponent implements OnInit { ...@@ -290,13 +299,13 @@ export class NetworkComponent implements OnInit {
} }
public saveRemoveDisorders(nodeList: Node[]) { public saveRemoveDisorders(nodeList: Node[]) {
const other = this.adjacentDrugDisorderList === nodeList ? this.adjacentProteinDisorderList : this.adjacentDrugDisorderList const other = this.adjacentDrugDisorderList === nodeList ? this.adjacentProteinDisorderList : this.adjacentDrugDisorderList;
if (other == null) if (other == null) {
this.nodeData.nodes.remove(nodeList); this.nodeData.nodes.remove(nodeList);
else { } else {
const otherIds = other.map(d => d.id); const otherIds = other.map(d => d.id);
const rest = nodeList.filter(d => otherIds.indexOf(d.id) === -1) const rest = nodeList.filter(d => otherIds.indexOf(d.id) === -1);
this.nodeData.nodes.remove(rest) this.nodeData.nodes.remove(rest);
} }
} }
...@@ -367,7 +376,7 @@ export class NetworkComponent implements OnInit { ...@@ -367,7 +376,7 @@ export class NetworkComponent implements OnInit {
this.nodeRenderer = null; this.nodeRenderer = null;
const updatedNodes = []; const updatedNodes = [];
// for (const item of this.proteins) { // for (const item of this.proteins) {
const proteins = this.nodeData.nodes.get().filter(n => n.drugstoneId && n.drugstoneType === 'protein') const proteins = this.nodeData.nodes.get().filter(n => n.drugstoneId && n.drugstoneType === 'protein');
for (const node of proteins) { for (const node of proteins) {
const pos = this.networkInternal.getPositions([node.id]); const pos = this.networkInternal.getPositions([node.id]);
node.x = pos[node.id].x; node.x = pos[node.id].x;
...@@ -421,31 +430,33 @@ export class NetworkComponent implements OnInit { ...@@ -421,31 +430,33 @@ export class NetworkComponent implements OnInit {
const updatedNodes = []; const updatedNodes = [];
this.nodeRenderer = pieChartContextRenderer; this.nodeRenderer = pieChartContextRenderer;
// mapping from netex IDs to network IDs, TODO check if this step is necessary // mapping from netex IDs to network IDs, TODO check if this step is necessary
const networkIdMapping = {} const networkIdMapping = {};
this.nodeData.nodes.get().forEach(element => { this.nodeData.nodes.get().forEach(element => {
if (element.drugstoneType === 'protein') { if (element.drugstoneType === 'protein') {
element.drugstoneId.forEach(id => { element.drugstoneId.forEach(id => {
if (networkIdMapping[id]) if (networkIdMapping[id]) {
networkIdMapping[id].push(element.id); networkIdMapping[id].push(element.id);
else } else {
networkIdMapping[id] = [element.id] networkIdMapping[id] = [element.id];
}
}); });
} }
}); });
const maxExpr = Math.max(...Object.values(this.expressionMap)); const maxExpr = Math.max(...Object.values(this.expressionMap));
const exprMap = {} const exprMap = {};
for (const [drugstoneId, expressionlvl] of Object.entries(this.expressionMap)) { for (const [drugstoneId, expressionlvl] of Object.entries(this.expressionMap)) {
networkIdMapping[drugstoneId].forEach(networkId => { networkIdMapping[drugstoneId].forEach(networkId => {
if (!exprMap[networkId]) if (!exprMap[networkId]) {
exprMap[networkId] = [expressionlvl] exprMap[networkId] = [expressionlvl];
else } else {
exprMap[networkId].push(expressionlvl) exprMap[networkId].push(expressionlvl);
}) }
});
} }
this.expressionMap = {} this.expressionMap = {};
Object.keys(exprMap).forEach(networkId => { Object.keys(exprMap).forEach(networkId => {
const expressionlvl = exprMap[networkId] ? exprMap[networkId].reduce((a, b) => a + b) / exprMap[networkId].length : null; const expressionlvl = exprMap[networkId] ? exprMap[networkId].reduce((a, b) => a + b) / exprMap[networkId].length : null;
this.expressionMap[networkId] = expressionlvl this.expressionMap[networkId] = expressionlvl;
const node = this.nodeData.nodes.get(networkId); const node = this.nodeData.nodes.get(networkId);
if (node === null) { if (node === null) {
return; return;
...@@ -468,20 +479,23 @@ export class NetworkComponent implements OnInit { ...@@ -468,20 +479,23 @@ export class NetworkComponent implements OnInit {
node.shape = 'custom'; node.shape = 'custom';
node.ctxRenderer = pieChartContextRenderer; node.ctxRenderer = pieChartContextRenderer;
updatedNodes.push(node); updatedNodes.push(node);
}) });
this.nodeData.nodes.update(updatedNodes); this.nodeData.nodes.update(updatedNodes);
this.loadingScreen.stateUpdate(false); this.loadingScreen.stateUpdate(false);
} }
) );
} }
this.currentViewSelectedTissue = this.selectedTissue; this.currentViewSelectedTissue = this.selectedTissue;
} }
public hasDrugsLoaded(): boolean { public hasDrugsLoaded(): boolean {
if (this.nodeData && this.nodeData.nodes) if (this.nodeData && this.nodeData.nodes) {
for (const node of this.nodeData.nodes.get()) for (const node of this.nodeData.nodes.get()) {
if (node.drugstoneType && node.drugstoneId === 'drug') if (node.drugstoneType && node.drugstoneId === 'drug') {
return true; return true;
}
}
}
return false; return false;
} }
...@@ -497,10 +511,11 @@ export class NetworkComponent implements OnInit { ...@@ -497,10 +511,11 @@ export class NetworkComponent implements OnInit {
this.loadingScreen.stateUpdate(true); this.loadingScreen.stateUpdate(true);
this.highlightSeeds = bool; this.highlightSeeds = bool;
const updatedNodes = []; const updatedNodes = [];
if (this.highlightSeeds) if (this.highlightSeeds) {
this.legendService.add_to_context('seeds') this.legendService.add_to_context('seeds');
else } else {
this.legendService.remove_from_context('seeds') this.legendService.remove_from_context('seeds');
}
for (const node of this.nodeData.nodes.get().filter(n => n.drugstoneType === 'protein')) { for (const node of this.nodeData.nodes.get().filter(n => n.drugstoneType === 'protein')) {
if (node.drugstoneId === undefined) { if (node.drugstoneId === undefined) {
// nodes that are not mapped to backend remain untouched // nodes that are not mapped to backend remain untouched
...@@ -510,7 +525,7 @@ export class NetworkComponent implements OnInit { ...@@ -510,7 +525,7 @@ export class NetworkComponent implements OnInit {
if (!node) { if (!node) {
continue; continue;
} }
console.log(node) console.log(node);
const pos = this.networkHandler.activeNetwork.networkInternal.getPositions([node.id]); const pos = this.networkHandler.activeNetwork.networkInternal.getPositions([node.id]);
node.x = pos[node.id].x; node.x = pos[node.id].x;
node.y = pos[node.id].y; node.y = pos[node.id].y;
......
...@@ -60,11 +60,14 @@ export interface IConfig { ...@@ -60,11 +60,14 @@ export interface IConfig {
showNetworkMenuButtonScreenshot: boolean; showNetworkMenuButtonScreenshot: boolean;
showNetworkMenuButtonExportGraphml: boolean; showNetworkMenuButtonExportGraphml: boolean;
showNetworkMenuButtonAdjacentDrugs: boolean; showNetworkMenuButtonAdjacentDrugs: boolean;
activateNetworkMenuButtonAdjacentDrugs: boolean;
showNetworkMenuButtonCenter: boolean; showNetworkMenuButtonCenter: boolean;
showConnectGenes: boolean; showConnectGenes: boolean;
networkMenuButtonAdjacentDrugsLabel: string; networkMenuButtonAdjacentDrugsLabel: string;
showNetworkMenuButtonAdjacentDisordersProteins: boolean; showNetworkMenuButtonAdjacentDisordersProteins: boolean;
activateNetworkMenuButtonAdjacentDisorders: boolean;
networkMenuButtonAdjacentDisordersProteinsLabel: string; networkMenuButtonAdjacentDisordersProteinsLabel: string;
activateNetworkMenuButtonAdjacentDisorderDrugs: boolean;
showNetworkMenuButtonAdjacentDisordersDrugs: boolean; showNetworkMenuButtonAdjacentDisordersDrugs: boolean;
networkMenuButtonAdjacentDisordersDrugsLabel: string; networkMenuButtonAdjacentDisordersDrugsLabel: string;
showNetworkMenuButtonAnimation: boolean; showNetworkMenuButtonAnimation: boolean;
...@@ -155,10 +158,12 @@ export const defaultConfig: IConfig = { ...@@ -155,10 +158,12 @@ export const defaultConfig: IConfig = {
showNetworkMenuButtonScreenshot: true, showNetworkMenuButtonScreenshot: true,
showNetworkMenuButtonExportGraphml: true, showNetworkMenuButtonExportGraphml: true,
showNetworkMenuButtonAdjacentDrugs: true, showNetworkMenuButtonAdjacentDrugs: true,
activateNetworkMenuButtonAdjacentDrugs: false,
showNetworkMenuButtonCenter: true, showNetworkMenuButtonCenter: true,
showNetworkMenuButtonAnimation: true, showNetworkMenuButtonAnimation: true,
activateNetworkMenuButtonAdjacentDisorders: false,
showNetworkMenuButtonAdjacentDisordersProteins: true, showNetworkMenuButtonAdjacentDisordersProteins: true,
activateNetworkMenuButtonAdjacentDisorderDrugs: false,
showNetworkMenuButtonAdjacentDisordersDrugs: true, showNetworkMenuButtonAdjacentDisordersDrugs: true,
showConnectGenes: true, showConnectGenes: true,
networkMenuButtonAdjacentDrugsLabel: 'Drugs', networkMenuButtonAdjacentDrugsLabel: 'Drugs',
......
...@@ -228,6 +228,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -228,6 +228,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
if (this.drugstoneConfig.config.physicsOn) { if (this.drugstoneConfig.config.physicsOn) {
this.networkHandler.activeNetwork.updatePhysicsEnabled(true); this.networkHandler.activeNetwork.updatePhysicsEnabled(true);
} }
this.networkHandler.updateAdjacentNodes();
}); });
} }
} }
......
...@@ -6,8 +6,8 @@ import {AnalysisService} from '../analysis/analysis.service'; ...@@ -6,8 +6,8 @@ import {AnalysisService} from '../analysis/analysis.service';
import {DrugstoneConfigService} from '../drugstone-config/drugstone-config.service'; import {DrugstoneConfigService} from '../drugstone-config/drugstone-config.service';
import {NetexControllerService} from '../netex-controller/netex-controller.service'; import {NetexControllerService} from '../netex-controller/netex-controller.service';
import {OmnipathControllerService} from '../omnipath-controller/omnipath-controller.service'; import {OmnipathControllerService} from '../omnipath-controller/omnipath-controller.service';
import {LegendService} from "../legend-service/legend-service.service"; import {LegendService} from '../legend-service/legend-service.service';
import { LoadingScreenService } from '../loading-screen/loading-screen.service'; import {LoadingScreenService} from '../loading-screen/loading-screen.service';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -34,4 +34,19 @@ export class NetworkHandlerService { ...@@ -34,4 +34,19 @@ export class NetworkHandlerService {
get getChange$() { get getChange$() {
return this.change.asObservable(); return this.change.asObservable();
} }
async updateAdjacentNodes() {
if (this.drugstoneConfig.config.activateNetworkMenuButtonAdjacentDrugs) {
this.activeNetwork.adjacentDrugs = true;
await this.activeNetwork.updateAdjacentDrugs(true);
}
if (this.drugstoneConfig.config.activateNetworkMenuButtonAdjacentDisorders) {
this.activeNetwork.adjacentDisordersProtein = true;
await this.activeNetwork.updateAdjacentProteinDisorders(true);
}
if (this.drugstoneConfig.config.activateNetworkMenuButtonAdjacentDisorderDrugs) {
this.activeNetwork.adjacentDisordersDrug = true;
await this.activeNetwork.updateAdjacentDrugDisorders(true);
}
}
} }
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<drugst-one id="tatata" <drugst-one id="tatata"
groups= '{ "nodeGroups" : { "selectedNode": { "borderWidth": 3,"borderWidthSelected": 4,"color": { "border": "#ffffff","highlight": {"border": "#ffffff"}},"font": { "color": "#F8981","size": 14 }},"Protein":{"shape":"circle","groupName":"Protein","type":"Protein","color":"#172b4d","font":{"color":"#ffffff"}}}}' groups= '{ "nodeGroups" : { "selectedNode": { "borderWidth": 3,"borderWidthSelected": 4,"color": { "border": "#ffffff","highlight": {"border": "#ffffff"}},"font": { "color": "#F8981","size": 14 }},"Protein":{"shape":"circle","groupName":"Protein","type":"Protein","color":"#172b4d","font":{"color":"#ffffff"}}}}'
config='{ "identifier":"symbol","title":"ROBUST output network", "taskDrugName": "Drug Search", "showLegendNodes": true, "showLegendEdges": true, "showSidebar": "left", "showOverview": true, "legendPos": "left", "legendClass": "legend", "showQuery": true, "showItemSelector": true,"showSimpleAnalysis": false,"showAdvAnalysis": true,"showSelection": true,"showTasks": true,"showNetworkMenu": "right","showLegend": true,"showNetworkMenuButtonExpression": true, "showNetworkMenuButtonScreenshot": true,"showNetworkMenuButtonExportGraphml": true,"showNetworkMenuButtonAdjacentDrugs": true,"showNetworkMenuButtonCenter": true,"showConnectGenes": false,"networkMenuButtonAdjacentDrugsLabel": "Drugs","showNetworkMenuButtonAdjacentDisordersProteins": true,"networkMenuButtonAdjacentDisordersProteinsLabel": "Disorders (protein)","showNetworkMenuButtonAdjacentDisordersDrugs": true,"networkMenuButtonAdjacentDisordersDrugsLabel": "Disorders (drug)","showNetworkMenuButtonAnimation": true,"networkMenuButtonAnimationLabel": "Animation", "autofillEdges": true, "physicsOn": false,"useNedrexLicenced": true,"selfReferences": false, "interactionDrugProtein": "NeDRex", "indicationDrugDisorder": "NeDRex","nodeShadow": true,"edgeShadow": true, "algorithms": {"drug": ["trustrank", "closeness", "degree", "proximity"], "drug-target": ["trustrank", "multisteiner", "keypathwayminer", "degree", "closeness", "betweenness"]}, "associatedProteinDisorder": "NeDRex", "expandNetworkMenu": true}' config='{ "activateNetworkMenuButtonAdjacentDrugs": true,"activateNetworkMenuButtonAdjacentDisorders": true, "activateNetworkMenuButtonAdjacentDisorderDrugs": true, "identifier":"symbol","title":"ROBUST output network", "taskDrugName": "Drug Search", "showLegendNodes": true, "showLegendEdges": true, "showSidebar": "left", "showOverview": true, "legendPos": "left", "legendClass": "legend", "showQuery": true, "showItemSelector": true,"showSimpleAnalysis": false,"showAdvAnalysis": true,"showSelection": true,"showTasks": true,"showNetworkMenu": "right","showLegend": true,"showNetworkMenuButtonExpression": true, "showNetworkMenuButtonScreenshot": true,"showNetworkMenuButtonExportGraphml": true,"showNetworkMenuButtonAdjacentDrugs": true,"showNetworkMenuButtonCenter": true,"showConnectGenes": false,"networkMenuButtonAdjacentDrugsLabel": "Drugs","showNetworkMenuButtonAdjacentDisordersProteins": true,"networkMenuButtonAdjacentDisordersProteinsLabel": "Disorders (protein)","showNetworkMenuButtonAdjacentDisordersDrugs": true,"networkMenuButtonAdjacentDisordersDrugsLabel": "Disorders (drug)","showNetworkMenuButtonAnimation": true,"networkMenuButtonAnimationLabel": "Animation", "autofillEdges": true, "physicsOn": false,"useNedrexLicenced": true,"selfReferences": false, "interactionDrugProtein": "NeDRex", "indicationDrugDisorder": "NeDRex","nodeShadow": true,"edgeShadow": true, "algorithms": {"drug": ["trustrank", "closeness", "degree", "proximity"], "drug-target": ["trustrank", "multisteiner", "keypathwayminer", "degree", "closeness", "betweenness"]}, "associatedProteinDisorder": "NeDRex", "expandNetworkMenu": true}'
network='{"nodes": [{"id":"PSEN1","group":"Protein","label":"PSEN1"},{"id":"PSEN2","group":"Protein","label":"PSEN2"},{"id":"APP","group":"Protein","label":"APP"},{"id":"APOE","group":"Protein","label":"APOE"},{"id":"RNF32","group":"Protein","label":"RNF32"},{"id":"STX5","group":"Protein","label":"STX5"},{"id":"TRAF3IP1","group":"Protein","label":"TRAF3IP1"},{"id":"PHB1","group":"Protein","label":"PHB1"},{"id":"MAPT","group":"Protein","label":"MAPT"},{"id":"ESR1","group":"Protein","label":"ESR1"},{"id":"IRF3","group":"Protein","label":"IRF3"},{"id":"DYNC1H1","group":"Protein","label":"DYNC1H1"},{"id":"CUL3","group":"Protein","label":"CUL3"},{"id":"HMGB1","group":"Protein","label":"HMGB1"},{"id":"DNAJC7","group":"Protein","label":"DNAJC7"},{"id":"NEFM","group":"Protein","label":"NEFM"},{"id":"DISC1","group":"Protein","label":"DISC1"},{"id":"PPP5C","group":"Protein","label":"PPP5C"},{"id":"CTNNB1","group":"Protein","label":"CTNNB1"},{"id":"KRAS","group":"Protein","label":"KRAS"}]}' network='{"nodes": [{"id":"PSEN1","group":"Protein","label":"PSEN1"},{"id":"PSEN2","group":"Protein","label":"PSEN2"},{"id":"APP","group":"Protein","label":"APP"},{"id":"APOE","group":"Protein","label":"APOE"},{"id":"RNF32","group":"Protein","label":"RNF32"},{"id":"STX5","group":"Protein","label":"STX5"},{"id":"TRAF3IP1","group":"Protein","label":"TRAF3IP1"},{"id":"PHB1","group":"Protein","label":"PHB1"},{"id":"MAPT","group":"Protein","label":"MAPT"},{"id":"ESR1","group":"Protein","label":"ESR1"},{"id":"IRF3","group":"Protein","label":"IRF3"},{"id":"DYNC1H1","group":"Protein","label":"DYNC1H1"},{"id":"CUL3","group":"Protein","label":"CUL3"},{"id":"HMGB1","group":"Protein","label":"HMGB1"},{"id":"DNAJC7","group":"Protein","label":"DNAJC7"},{"id":"NEFM","group":"Protein","label":"NEFM"},{"id":"DISC1","group":"Protein","label":"DISC1"},{"id":"PPP5C","group":"Protein","label":"PPP5C"},{"id":"CTNNB1","group":"Protein","label":"CTNNB1"},{"id":"KRAS","group":"Protein","label":"KRAS"}]}'
></drugst-one> ></drugst-one>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment