Skip to content

Commit

Permalink
Show signal and transit peptide on same track
Browse files Browse the repository at this point in the history
  • Loading branch information
kimrutherford committed Nov 4, 2024
1 parent e5edf54 commit 17b214e
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions protein_feature_view/templates/protein_feature_view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit 17b214e

Please sign in to comment.