Skip to content
Snippets Groups Projects
Commit 11c7024e authored by Alexander Rose's avatar Alexander Rose
Browse files

tweaks for dnatco confal pyramids

- added Michal and Jiří as contributors
- add preset to annotation group
- legend for color theme
- add as extension to viewer
parent 47ba5419
No related branches found
No related tags found
No related merge requests found
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
"Alexander Rose <alexander.rose@weirdbyte.de>", "Alexander Rose <alexander.rose@weirdbyte.de>",
"David Sehnal <david.sehnal@gmail.com>", "David Sehnal <david.sehnal@gmail.com>",
"Sebastian Bittrich <sebastian.bittrich@rcsb.org>", "Sebastian Bittrich <sebastian.bittrich@rcsb.org>",
"Ludovic Autin <autin@scripps.edu>" "Ludovic Autin <autin@scripps.edu>",
"Michal Malý <michal.maly@ibt.cas.cz>",
"Jiří Černý <jiri.cerny@ibt.cas.cz>"
], ],
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
......
...@@ -24,6 +24,7 @@ import { PluginState } from '../../mol-plugin/state'; ...@@ -24,6 +24,7 @@ import { PluginState } from '../../mol-plugin/state';
import { DownloadDensity } from '../../mol-plugin-state/actions/volume'; import { DownloadDensity } from '../../mol-plugin-state/actions/volume';
import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout'; import { PluginLayoutControlsDisplay } from '../../mol-plugin/layout';
import { BuiltInTrajectoryFormat } from '../../mol-plugin-state/formats/trajectory'; import { BuiltInTrajectoryFormat } from '../../mol-plugin-state/formats/trajectory';
import { DnatcoConfalPyramids } from '../../extensions/dnatco';
require('mol-plugin-ui/skin/light.scss'); require('mol-plugin-ui/skin/light.scss');
...@@ -32,6 +33,7 @@ export { setProductionMode, setDebugMode } from '../../mol-util/debug'; ...@@ -32,6 +33,7 @@ export { setProductionMode, setDebugMode } from '../../mol-util/debug';
const Extensions = { const Extensions = {
'cellpack': PluginSpec.Behavior(CellPack), 'cellpack': PluginSpec.Behavior(CellPack),
'dnatco-confal-pyramids': PluginSpec.Behavior(DnatcoConfalPyramids),
'pdbe-structure-quality-report': PluginSpec.Behavior(PDBeStructureQualityReport), 'pdbe-structure-quality-report': PluginSpec.Behavior(PDBeStructureQualityReport),
'rcsb-assembly-symmetry': PluginSpec.Behavior(RCSBAssemblySymmetry), 'rcsb-assembly-symmetry': PluginSpec.Behavior(RCSBAssemblySymmetry),
'rcsb-validation-report': PluginSpec.Behavior(RCSBValidationReport) 'rcsb-validation-report': PluginSpec.Behavior(RCSBValidationReport)
......
...@@ -18,7 +18,7 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition'; ...@@ -18,7 +18,7 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition';
export const DnatcoConfalPyramidsPreset = StructureRepresentationPresetProvider({ export const DnatcoConfalPyramidsPreset = StructureRepresentationPresetProvider({
id: 'preset-structure-representation-confal-pyramids', id: 'preset-structure-representation-confal-pyramids',
display: { display: {
name: 'Confal Pyramids', name: 'Confal Pyramids', group: 'Annotation',
description: 'Schematic depiction of conformer class and confal value.', description: 'Schematic depiction of conformer class and confal value.',
}, },
isApplicable(a) { isApplicable(a) {
......
...@@ -13,6 +13,8 @@ import { ColorTheme } from '../../../mol-theme/color'; ...@@ -13,6 +13,8 @@ import { ColorTheme } from '../../../mol-theme/color';
import { ThemeDataContext } from '../../../mol-theme/theme'; import { ThemeDataContext } from '../../../mol-theme/theme';
import { Color } from '../../../mol-util/color'; import { Color } from '../../../mol-util/color';
import { ParamDefinition as PD } from '../../../mol-util/param-definition'; import { ParamDefinition as PD } from '../../../mol-util/param-definition';
import { TableLegend } from '../../../mol-util/legend';
import { iterableToArray } from '../../../mol-data/util';
const DefaultColor = Color(0xCCCCCC); const DefaultColor = Color(0xCCCCCC);
const Description = 'Assigns colors to confal pyramids'; const Description = 'Assigns colors to confal pyramids';
...@@ -160,6 +162,12 @@ export function ConfalPyramidsColorTheme(ctx: ThemeDataContext, props: PD.Values ...@@ -160,6 +162,12 @@ export function ConfalPyramidsColorTheme(ctx: ThemeDataContext, props: PD.Values
color, color,
props, props,
description: Description, description: Description,
legend: TableLegend(iterableToArray(ColorMapping.entries()).map(([conformer, color]) => {
return [conformer, color] as [string, Color];
}).concat([
[ 'Error', ErrorColor ],
[ 'Unknown', DefaultColor ]
]))
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment