From 17b214edd485717547ba50529137a5664a38d595 Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Mon, 4 Nov 2024 14:55:51 +1300 Subject: [PATCH] Show signal and transit peptide on same track Refs pombase/website#2198 --- .../templates/protein_feature_view/index.html | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/protein_feature_view/templates/protein_feature_view/index.html b/protein_feature_view/templates/protein_feature_view/index.html index 8954d54..3ec95df 100644 --- a/protein_feature_view/templates/protein_feature_view/index.html +++ b/protein_feature_view/templates/protein_feature_view/index.html @@ -58,6 +58,8 @@ let rowConfigData = [] +const capitalize = s => s && String(s[0]).toUpperCase() + String(s).slice(1); + const elementEnterCallBack = (obj, e) => { if (obj.displayName) { const tip = tippy(e.target); @@ -166,19 +168,12 @@ includeCoords: true, singular: 'Coiled coil', }, - 'Signal peptide': { + 'Localization signals': { colour: '#f42', allowGaps: true, - helpText: 'Signal peptide regions imported from UniProt', - includeCoords: true, - singular: 'Signal peptide', - }, - 'Transit peptide': { - colour: '#e52', - allowGaps: true, - helpText: 'Transit peptide regions imported from UniProt', + helpText: 'Localization signals imported from UniProt', includeCoords: true, - singular: 'Transit peptide', + singular: 'Localization signals', }, 'Binding sites': { colour: '#52e', @@ -508,13 +503,13 @@ const makeTrackData = (feature) => { const firstPos = feature.positions[0]; const lastPos = feature.positions[feature.positions.length - 1]; - const popupExtraContent = makeExtraContent(feature, trackConfig); + const displayName = capitalize(feature.display_name || trackConfig.singular); const newFeature = { id: feature.id + '-' + firstPos + '..' + lastPos, matchId: feature.id, - displayName: feature.display_name || trackConfig.singular, + displayName, popupExtraContent, begin: firstPos[1], end: lastPos[2],