Skip to content
Snippets Groups Projects
Commit 2b58d68c authored by David Sehnal's avatar David Sehnal
Browse files

Proteopedia wrapper fix

parent 8fed9a45
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,8 @@ import { Model, ElementIndex, ResidueIndex } from 'mol-model/structure'; ...@@ -9,8 +9,8 @@ import { Model, ElementIndex, ResidueIndex } from 'mol-model/structure';
import { Color } from 'mol-util/color'; import { Color } from 'mol-util/color';
const EvolutionaryConservationPalette: Color[] = [ const EvolutionaryConservationPalette: Color[] = [
[255, 255, 150], // 9 [255, 255, 129], // insufficient
[160, 37, 96], [160, 37, 96], // 9
[240, 125, 171], [240, 125, 171],
[250, 201, 222], [250, 201, 222],
[252, 237, 244], [252, 237, 244],
...@@ -20,7 +20,6 @@ const EvolutionaryConservationPalette: Color[] = [ ...@@ -20,7 +20,6 @@ const EvolutionaryConservationPalette: Color[] = [
[140, 255, 255], [140, 255, 255],
[16, 200, 209] // 1 [16, 200, 209] // 1
].reverse().map(([r, g, b]) => Color.fromRgb(r, g, b)); ].reverse().map(([r, g, b]) => Color.fromRgb(r, g, b));
// const EvolutionaryConservationInsufficientColor = Color(0xcccc00);
const EvolutionaryConservationDefaultColor = Color(0x999999); const EvolutionaryConservationDefaultColor = Color(0x999999);
export const EvolutionaryConservation = CustomElementProperty.create<number>({ export const EvolutionaryConservation = CustomElementProperty.create<number>({
...@@ -61,15 +60,13 @@ export const EvolutionaryConservation = CustomElementProperty.create<number>({ ...@@ -61,15 +60,13 @@ export const EvolutionaryConservation = CustomElementProperty.create<number>({
}, },
coloring: { coloring: {
getColor(e: number) { getColor(e: number) {
// TODO if (e < 1 || e > 10) return EvolutionaryConservationDefaultColor;
// if (e === 10) return EvolutionaryConservationInsufficientColor; return EvolutionaryConservationPalette[e - 1];
if (e < 0 || e > 9) return EvolutionaryConservationDefaultColor;
return EvolutionaryConservationPalette[e];
}, },
defaultColor: EvolutionaryConservationDefaultColor defaultColor: EvolutionaryConservationDefaultColor
}, },
format(e) { format(e) {
if (e === 0) return `Evolutionary Conservation: InsufficientData`; if (e === 10) return `Evolutionary Conservation: InsufficientData`;
return e ? `Evolutionary Conservation: ${e}` : void 0; return e ? `Evolutionary Conservation: ${e}` : void 0;
} }
}); });
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment