Newer
Older
AndiMajore
committed
import {AlgorithmTarget, AlgorithmType, QuickAlgorithmType} from './interfaces';
// https://visjs.github.io/vis-network/docs/network/nodes.html
Michael Hartung
committed
groupName?: string;
AndiMajore
committed
groupID?: string;
Michael Hartung
committed
color?: any;
shape?: 'circle' | 'triangle' | 'star' | 'square' | 'image' | 'text' | 'ellipse' | 'box' | 'diamond' | 'dot';
type?: string;
font?: any;
border?: any;
highlight?: any;
borderWidth?: number;
borderWidthSelected?: number;
Michael Hartung
committed
background?: any;

Hartung, Michael
committed
ctxRenderer?: any;
// see https://visjs.github.io/vis-network/docs/network/edges.html
dashes?: false | Array<number>;
export type Identifier = 'symbol' | 'uniprot' | 'ensg' | 'entrez';
export type InteractionDrugProteinDB = 'NeDRex' | 'DrugBank' | 'DrugCentral' | 'ChEMBL' | 'DGIdb';
export type InteractionProteinProteinDB = 'NeDRex' | 'BioGRID' | 'IID' | 'IntAct' | 'STRING' | 'APID';
export type IndicationDrugDisorderDB = 'NeDRex' | 'CTD' | 'DrugCentral' | 'DrugBank';
export type AssociatedProteinDisorderDB = 'NeDRex' | 'DisGeNET' | 'OMIM';
export type AdvAnalysisContentTypes = 'drug-target-search' | 'drug-search' | 'enrichment-gprofiler' | 'enrichment-digest';
// TODO: should this be external or integrated in the backend?
export type InteractionDatabase = 'omnipath';
legendUrl: string;
legendClass: string;
taskTargetName: string;
taskDrugName: string;
showSidebar: false | 'left' | 'right';
showItemSelector: boolean;
showSimpleAnalysis: boolean;
showAdvAnalysis: boolean;
AndiMajore
committed
showAdvAnalysisContent: Array<AdvAnalysisContentTypes>;
showNetworkMenu: false | 'left' | 'right';
showNetworkMenuButtonExpression: boolean;
showNetworkMenuButtonScreenshot: boolean;
showNetworkMenuButtonExportGraphml: boolean;
showNetworkMenuButtonAdjacentDrugs: boolean;
activateNetworkMenuButtonAdjacentDrugs: boolean;
showNetworkMenuButtonCenter: boolean;
networkMenuButtonAdjacentDrugsLabel: string;
showNetworkMenuButtonAdjacentDisordersProteins: boolean;
activateNetworkMenuButtonAdjacentDisorders: boolean;
networkMenuButtonAdjacentDisordersProteinsLabel: string;
activateNetworkMenuButtonAdjacentDisordersDrugs: boolean;
showNetworkMenuButtonAdjacentDisordersDrugs: boolean;
networkMenuButtonAdjacentDisordersDrugsLabel: string;
showNetworkMenuButtonAnimation: boolean;
networkMenuButtonAnimationLabel: string;
showLegend: boolean;
showLegendNodes: boolean;
showLegendEdges: boolean;
nodeGroups: { [key: string]: NodeGroup };
edgeGroups: { [key: string]: EdgeGroup };
AndiMajore
committed
customEdges: { default: boolean, selectable: boolean };
interactionDrugProtein: InteractionDrugProteinDB;
interactionProteinProtein: InteractionProteinProteinDB;
indicationDrugDisorder: IndicationDrugDisorderDB;
associatedProteinDisorder: AssociatedProteinDisorderDB;
nodeShadow?: boolean;
edgeShadow?: boolean;
algorithms: { [key in AlgorithmTarget]: Array<AlgorithmType | QuickAlgorithmType> };
const defaultNodeGroup: NodeGroup = {
AndiMajore
committed
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
// this default group is used for default node group values
// and is fallback in case user does not provide any nodeGroup
groupName: 'Default Node Group',
ctxRenderer: null,
color: {
border: '#FFFF00',
background: '#FFFF00',
highlight: {
border: '#FF0000',
background: '#FF0000'
},
},
shape: 'triangle',
type: 'default type',
detailShowLabel: false,
font: {
color: '#000000',
size: 14,
face: 'arial',
background: undefined,
strokeWidth: 0,
strokeColor: '#ffffff',
align: 'center',
bold: false,
ital: false,
boldital: false,
mono: false,
},
borderWidth: 1,
borderWidthSelected: 2
};
const connectorNodeGroup: NodeGroup = JSON.parse(JSON.stringify(defaultNodeGroup));
connectorNodeGroup.groupName = 'Connector Nodes';
export const defaultConfig: IConfig = {
taskTargetName: 'Drug Target Search',
taskDrugName: 'Drug Search',
showSimpleAnalysis: true,
showAdvAnalysisContent: ['drug-search', 'drug-target-search', 'enrichment-gprofiler', 'enrichment-digest'],
showNetworkMenuButtonExpression: true,
showNetworkMenuButtonScreenshot: true,
showNetworkMenuButtonExportGraphml: true,
showNetworkMenuButtonAdjacentDrugs: true,
activateNetworkMenuButtonAdjacentDrugs: false,
showNetworkMenuButtonCenter: true,
activateNetworkMenuButtonAdjacentDisorders: false,
activateNetworkMenuButtonAdjacentDisordersDrugs: false,
networkMenuButtonAdjacentDrugsLabel: 'Drugs',
networkMenuButtonAdjacentDisordersProteinsLabel: 'Disorders (protein)',
networkMenuButtonAdjacentDisordersDrugsLabel: 'Disorders (drug)',
networkMenuButtonAnimationLabel: 'Animation',
identifier: 'symbol',
interactionDrugProtein: 'NeDRex',
interactionProteinProtein: 'NeDRex',
indicationDrugDisorder: 'NeDRex',
nodeShadow: true,
edgeShadow: true,
licensedDatasets: false,
algorithms: {
'drug-target': ['trustrank', 'multisteiner', 'keypathwayminer', 'degree', 'closeness', 'betweenness']
// all NodeGroups but the default group must be set, if not provided by the user, they will be taken from here
Michael Hartung
committed
// IMPORTANT: node color must be hexacode!
foundNode: {
groupName: 'Found Nodes',
Michael Hartung
committed
color: {
border: '#F12590',
Michael Hartung
committed
highlight: {
border: '#F12590',
background: '#F12590'
},
},
connectorNode: connectorNodeGroup,
Michael Hartung
committed
color: {
border: '#F12590',
Michael Hartung
committed
highlight: {
border: '#F12590',
background: '#F12590'
},
},
defaultDisorder: {
groupName: 'Disorders',
color: {
border: '#ffa62f',
background: '#ffa62f',
highlight: {
border: '#ffa62f',
background: '#ffa62f'
},
},
type: 'default disorder type',
},
groupName: 'Seed Nodes',
shape: 'triangle',
type: 'seed',
Michael Hartung
committed
color: {
Michael Hartung
committed
border: '#F1111D',
background: '#F1111D',
Michael Hartung
committed
highlight: {
Michael Hartung
committed
border: '#F1111D',
background: '#F1111D'
Michael Hartung
committed
},
},
font: {
Michael Hartung
committed
color: '#F1111D',
size: 14
}
},
selectedNode: {
Michael Hartung
committed
borderWidth: 3,
borderWidthSelected: 4,
color: {
border: '#F8981D',
Michael Hartung
committed
highlight: {
border: '#F8981D',
},
},
font: {
color: '#F8981D',
size: 14
}
// this default group is used for default edge group values
groupName: 'Default Edge Group',
color: 'black',