Skip to content

Commit

Permalink
Colour abnormal and inviable alleles differently
Browse files Browse the repository at this point in the history
Also tweak the modification colours to be less green.

Refs pombase/website#2249
  • Loading branch information
kimrutherford committed Oct 8, 2024
1 parent 5771f27 commit 662e324
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions protein_feature_view/templates/protein_feature_view/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
singular: 'AA substitution allele',
},
'Partial deletions': {
colour: '#15e',
colour: '#f00',
allowGaps: true,
invertGaps: true,
helpText: 'Curated alleles with partial amino acid deletions',
Expand All @@ -211,10 +211,10 @@
};

const modColours = {
'MOD:01875': '#86a8f4',
'MOD:01875': '#2b8',
'MOD:01155': '#d2d27e',
'MOD:00408': '#f88',
'MOD:00696': '#2b8',
'MOD:00696': '#86a8f4',
'MOD:00427': '#c6f',
'MOD:00764': '#d6009e',
'MOD:00905': '#ff9943',
Expand Down Expand Up @@ -286,8 +286,14 @@
}
} else {
if (track.name == 'AA substitution alleles' || track.name == 'Partial deletions') {
if (!feature.inviable_or_abnormal) {
newFeature.color = '#999';
if (feature.viability_level) {
if (feature.viability_level == 'normal') {
newFeature.color = '#999';
} else {
if (feature.viability_level == 'abnormal') {
newFeature.color = '#292';
}
}
}
}
newFeature.annotated_terms = feature.annotated_terms;
Expand Down Expand Up @@ -333,10 +339,16 @@
};

if (track.name == 'AA substitution alleles' || track.name == 'Partial deletions') {
if (feature.inviable_or_abnormal) {
newFeature.color = track.colour;
} else {
newFeature.color = '#999';
if (feature.viability_level) {
if (feature.viability_level == 'normal') {
newFeature.color = '#999';
} else {
if (feature.viability_level == 'abnormal') {
newFeature.color = '#292';
} else {
newFeature.color = track.colour;
}
}
}
}

Expand Down

0 comments on commit 662e324

Please sign in to comment.