src/app/models/bimodal.model.ts
Properties |
constructor(name: string, group: number, x: number, y: number, fontSize: number, notes: string, organName: string, ontologyId: string, color: string, nodeSize: number, proteinPresence)
|
Defined in src/app/models/bimodal.model.ts:36
|
Optional bType |
Type : string
|
Defined in src/app/models/bimodal.model.ts:32
|
color |
Type : string
|
Defined in src/app/models/bimodal.model.ts:19
|
Optional degree |
Type : number
|
Defined in src/app/models/bimodal.model.ts:28
|
fontSize |
Type : number
|
Defined in src/app/models/bimodal.model.ts:15
|
group |
Type : number
|
Defined in src/app/models/bimodal.model.ts:13
|
groupName |
Type : string
|
Defined in src/app/models/bimodal.model.ts:14
|
id |
Type : number
|
Default value : 0
|
Defined in src/app/models/bimodal.model.ts:18
|
Optional indegree |
Type : Set<Degree>
|
Defined in src/app/models/bimodal.model.ts:29
|
isNew |
Type : boolean
|
Defined in src/app/models/bimodal.model.ts:26
|
Optional label |
Type : string
|
Defined in src/app/models/bimodal.model.ts:31
|
name |
Type : string
|
Defined in src/app/models/bimodal.model.ts:11
|
nodeSize |
Type : number
|
Defined in src/app/models/bimodal.model.ts:20
|
notes |
Type : string
|
Defined in src/app/models/bimodal.model.ts:35
|
ontologyId |
Type : string
|
Defined in src/app/models/bimodal.model.ts:12
|
organName |
Type : string
|
Defined in src/app/models/bimodal.model.ts:36
|
Optional outdegree |
Type : Set<Degree>
|
Defined in src/app/models/bimodal.model.ts:30
|
pathColor |
Type : string
|
Defined in src/app/models/bimodal.model.ts:25
|
problem |
Default value : false
|
Defined in src/app/models/bimodal.model.ts:24
|
proteinPresence |
Type : PROTEIN_PRESENCE
|
Defined in src/app/models/bimodal.model.ts:33
|
Optional references |
Type : Reference[]
|
Defined in src/app/models/bimodal.model.ts:34
|
sources |
Type : number[]
|
Defined in src/app/models/bimodal.model.ts:22
|
targets |
Type : number[]
|
Defined in src/app/models/bimodal.model.ts:21
|
type |
Type : string
|
Defined in src/app/models/bimodal.model.ts:27
|
x |
Type : number
|
Defined in src/app/models/bimodal.model.ts:16
|
y |
Type : number
|
Defined in src/app/models/bimodal.model.ts:17
|
import { PROTEIN_PRESENCE, Reference } from './sheet.model';
import { Degree, NODE_TYPE } from './tree.model';
const groupNameMapper = {
1: 'Anatomical Structures',
2: 'Cell Types',
3: 'Biomarkers',
};
export class BMNode {
name: string;
ontologyId: string;
group: number;
groupName: string;
fontSize: number;
x: number;
y: number;
id = 0;
color: string;
nodeSize: number;
targets: number[];
sources: number[];
problem = false;
pathColor: string;
isNew: boolean;
type: string;
degree?: number;
indegree?: Set<Degree>;
outdegree?: Set<Degree>;
label?: string;
bType?: string;
proteinPresence: PROTEIN_PRESENCE;
references?: Reference[];
notes: string;
organName: string;
constructor(
name: string,
group: number,
x: number,
y: number,
fontSize: number,
notes: string,
organName: string,
ontologyId = '',
color = '#E41A1C',
nodeSize = 300,
proteinPresence = PROTEIN_PRESENCE.UNKNOWN,
) {
this.name = name;
this.group = group;
this.fontSize = fontSize;
this.x = x;
this.y = y;
this.color = color;
this.nodeSize = nodeSize === 0 ? 50 : nodeSize;
this.targets = [];
this.sources = [];
this.groupName = groupNameMapper[group as keyof typeof groupNameMapper];
this.ontologyId = ontologyId;
this.pathColor = '#ccc';
this.isNew = false;
this.type = NODE_TYPE.BM;
this.label = '';
this.notes = notes;
this.organName = organName;
this.proteinPresence = proteinPresence;
}
}
export interface Link {
s: number;
t: number;
}
export interface DD {
name: string;
}
export interface ASCTD {
nodes: BMNode[];
links: Link[];
compareDD?: DD[];
searchIds?: number[];
}
export const bimodalSortOptions = ['Alphabetically', 'Degree'];
export const bimodalBSizeOptions = ['None', 'Degree'];
export const bimodalCTSizeOptions = ['None', 'Degree', 'Indegree', 'Outdegree'];
export const bimodalBTypeOptions = ['All', 'Gene', 'Protein', 'Lipids', 'Metabolites', 'Proteoforms'];
export interface BimodalConfig {
CT: {
sort: string;
size: string;
};
BM: {
sort: string;
size: string;
type: string;
};
}
export interface BimodalData {
nodes: BMNode[];
links: Link[];
config: BimodalConfig;
}