From 8ff095dc9db8b958c1bc617ba0727c22318913b4 Mon Sep 17 00:00:00 2001 From: shb0527 <111919818+shb0527@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:17:16 -0600 Subject: [PATCH] labeling protein --- SBOLCanvasFrontend/src/app/graph-base.ts | 21 ++++++++++++++++++++- SBOLCanvasFrontend/src/app/graph.service.ts | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/SBOLCanvasFrontend/src/app/graph-base.ts b/SBOLCanvasFrontend/src/app/graph-base.ts index bbfcd852..27fd1733 100644 --- a/SBOLCanvasFrontend/src/app/graph-base.ts +++ b/SBOLCanvasFrontend/src/app/graph-base.ts @@ -1390,5 +1390,24 @@ export class GraphBase { return "NGA (No Glyph Assigned Molecular Species)" } } - + protected moleculeLabelName(name: string) { + switch (name) { + case "dsNA": + return "dna" + case "macromolecule": + return "prot" + case "NGA (No Glyph Assigned Molecular Species)": + return "nga" + case "small-molecule": + return "chem" + case "ssNA": + return "rna" + case "replacement-glyph": + return "All_types" + case "complex": + return "comp" + default: + return "Protein" + } + } } diff --git a/SBOLCanvasFrontend/src/app/graph.service.ts b/SBOLCanvasFrontend/src/app/graph.service.ts index 93fb35e4..af62bce7 100644 --- a/SBOLCanvasFrontend/src/app/graph.service.ts +++ b/SBOLCanvasFrontend/src/app/graph.service.ts @@ -1081,6 +1081,7 @@ export class GraphService extends GraphHelpers { let proteinInfo = new GlyphInfo({ partType: this.moleculeNameToType(name) }) + proteinInfo.name = this.moleculeLabelName(name); this.addToInfoDict(proteinInfo) const molecularSpeciesGlyph = this.graph.insertVertex(this.graph.getDefaultParent(), null, proteinInfo.getFullURI(), x, y,