react-msaview 9.4.0 → 9.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/index.js +70 -70
- package/bundle/index.js.map +4 -4
- package/dist/components/MSAViewer.d.ts +2 -8
- package/dist/components/header/menuBarItems.js +1 -4
- package/dist/components/header/menuBarItems.js.map +1 -1
- package/dist/constants.d.ts +8 -1
- package/dist/constants.js +26 -3
- package/dist/constants.js.map +1 -1
- package/dist/createPaletteMap.d.ts +4 -3
- package/dist/createPaletteMap.js +16 -8
- package/dist/createPaletteMap.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/treeModel.d.ts +0 -9
- package/dist/model/treeModel.js +1 -12
- package/dist/model/treeModel.js.map +1 -1
- package/dist/model.d.ts +11 -12
- package/dist/model.js +20 -17
- package/dist/model.js.map +1 -1
- package/dist/svgTestUtil.d.ts +2 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/src/components/header/menuBarItems.ts +0 -4
- package/src/constants.ts +28 -3
- package/src/createPaletteMap.ts +22 -8
- package/src/index.ts +1 -1
- package/src/model/treeModel.ts +0 -13
- package/src/model.ts +23 -21
- package/src/version.ts +1 -1
|
@@ -141,7 +141,7 @@ export interface MSAViewerProps {
|
|
|
141
141
|
* of those props changes and keeps its model across every other change,
|
|
142
142
|
* including a new annotation file. A `ref` holds the current model.
|
|
143
143
|
*/
|
|
144
|
-
declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.RefAttributes<import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "
|
|
144
|
+
declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.RefAttributes<import("@jbrowse/mobx-state-tree").ModelInstanceTypeProps<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
145
145
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
146
146
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
147
147
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
@@ -152,7 +152,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
152
152
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
153
153
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
154
154
|
showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
155
|
-
showTreeScaleBar: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
156
155
|
overviewHeight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
157
156
|
}, "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats"> & {
|
|
158
157
|
bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -548,7 +547,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
548
547
|
setDrawNodeBubbles(arg: boolean): void;
|
|
549
548
|
setDrawNodeLabels(arg: boolean): void;
|
|
550
549
|
setShowTreeOverview(arg: boolean): void;
|
|
551
|
-
setShowTreeScaleBar(arg: boolean): void;
|
|
552
550
|
setDrawLabels(arg: boolean): void;
|
|
553
551
|
} & {
|
|
554
552
|
setColorSchemeName(name: string): void;
|
|
@@ -969,7 +967,7 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
969
967
|
}): void;
|
|
970
968
|
fitHorizontally(maxColWidth?: any): void;
|
|
971
969
|
afterCreate(): void;
|
|
972
|
-
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "
|
|
970
|
+
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
973
971
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
974
972
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
975
973
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
@@ -980,7 +978,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
980
978
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
981
979
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
982
980
|
showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
983
|
-
showTreeScaleBar: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
984
981
|
overviewHeight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
985
982
|
}, "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats"> & {
|
|
986
983
|
bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -1376,7 +1373,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
1376
1373
|
setDrawNodeBubbles(arg: boolean): void;
|
|
1377
1374
|
setDrawNodeLabels(arg: boolean): void;
|
|
1378
1375
|
setShowTreeOverview(arg: boolean): void;
|
|
1379
|
-
setShowTreeScaleBar(arg: boolean): void;
|
|
1380
1376
|
setDrawLabels(arg: boolean): void;
|
|
1381
1377
|
} & {
|
|
1382
1378
|
setColorSchemeName(name: string): void;
|
|
@@ -1813,7 +1809,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
1813
1809
|
drawNodeBubbles: boolean;
|
|
1814
1810
|
drawNodeLabels: boolean;
|
|
1815
1811
|
showTreeOverview: boolean;
|
|
1816
|
-
showTreeScaleBar: boolean;
|
|
1817
1812
|
overviewHeight: number;
|
|
1818
1813
|
columnTracks: ColumnTrackSpec[];
|
|
1819
1814
|
id: string;
|
|
@@ -1953,7 +1948,6 @@ declare const MSAViewer: React.ForwardRefExoticComponent<MSAViewerProps & React.
|
|
|
1953
1948
|
drawNodeBubbles: boolean;
|
|
1954
1949
|
drawNodeLabels: boolean;
|
|
1955
1950
|
showTreeOverview: boolean;
|
|
1956
|
-
showTreeScaleBar: boolean;
|
|
1957
1951
|
overviewHeight: number;
|
|
1958
1952
|
columnTracks?: undefined;
|
|
1959
1953
|
id: string;
|
|
@@ -118,7 +118,7 @@ function outgroupLabel(outgroup) {
|
|
|
118
118
|
: `Outgroup ${first} … ${rest.at(-1)}`;
|
|
119
119
|
}
|
|
120
120
|
export function treeSubMenu(model) {
|
|
121
|
-
const { drawTree, showBranchLen, labelsAlignRight, drawNodeLabels, drawLabels, treeAreaWidth, showTreeOverview,
|
|
121
|
+
const { drawTree, showBranchLen, labelsAlignRight, drawNodeLabels, drawLabels, treeAreaWidth, showTreeOverview, treeOrder, treeRoot, rotated, } = model;
|
|
122
122
|
return [
|
|
123
123
|
subMenu('Layout', [
|
|
124
124
|
radio('Phylogram', drawTree && showBranchLen, () => {
|
|
@@ -136,9 +136,6 @@ export function treeSubMenu(model) {
|
|
|
136
136
|
toggle('Tree overview', showTreeOverview, arg => {
|
|
137
137
|
model.setShowTreeOverview(arg);
|
|
138
138
|
}),
|
|
139
|
-
toggle('Scale bar', showTreeScaleBar, arg => {
|
|
140
|
-
model.setShowTreeScaleBar(arg);
|
|
141
|
-
}),
|
|
142
139
|
subMenu('Order', [
|
|
143
140
|
...treeOrders.map(order => radio(treeOrderLabels[order], treeOrder === order, () => {
|
|
144
141
|
model.setTreeOrder(order);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuBarItems.js","sourceRoot":"","sources":["../../../src/components/header/menuBarItems.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,M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AC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9D,CAAC;IACH,CAAC,EACD,WAAW,IAAI,IAAI,GAAG,CAAC,CACxB,CAAA;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAmB;IAChD,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAA;AACrC,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAmB;IAC/C,OAAO;QACL,MAAM,CAAC,mBAAmB,EAAE,GAAG,EAAE;YAC/B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,UAAU,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;QAChE,CAAC,CAAC;QACF,MAAM,CAAC,WAAW,EAAE,GAAG,EAAE;YACvB,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,qBAAqB,CAAC,CAAA;QAC5D,CAAC,CAAC;QACF,MAAM,CAAC,kBAAkB,EAAE,GAAG,EAAE;YAC9B,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAA;QAC1D,CAAC,CAAC;KACH,CAAA;AACH,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -15,6 +15,14 @@ export declare const subFeatureRowHeight = 4;
|
|
|
15
15
|
export declare const domainUnderlineHeight = 3;
|
|
16
16
|
export declare const segmentFeatureTypes: Set<string>;
|
|
17
17
|
export declare const segmentShades: string[];
|
|
18
|
+
/**
|
|
19
|
+
* A site's feature type: CDD's GenPept `Site`, a Sequence Ontology `*_site`,
|
|
20
|
+
* InterPro's `Binding_site`, `Active_site` and `Conserved_site`, and UniProt's
|
|
21
|
+
* `Binding site`. A site is a set of scattered residues, often single columns
|
|
22
|
+
*/
|
|
23
|
+
export declare function isSiteType(featureType: string | undefined): boolean;
|
|
24
|
+
export declare const domainFills: string[];
|
|
25
|
+
export declare const siteFills: string[];
|
|
18
26
|
export declare const defaultDrawMsaLetters = true;
|
|
19
27
|
export declare const defaultScrollZoom = false;
|
|
20
28
|
export declare const scrollZoomAxes: readonly ['both', 'horizontal', 'vertical'];
|
|
@@ -46,7 +54,6 @@ export declare const defaultDrawTree = true;
|
|
|
46
54
|
export declare const defaultDrawNodeBubbles = true;
|
|
47
55
|
export declare const defaultDrawNodeLabels = false;
|
|
48
56
|
export declare const defaultShowTreeOverview = false;
|
|
49
|
-
export declare const defaultShowTreeScaleBar = false;
|
|
50
57
|
export declare const defaultOverviewHeight = 120;
|
|
51
58
|
export declare const maxNeighborJoiningRows = 500;
|
|
52
59
|
export declare const rowTintAlpha = 0.25;
|
package/dist/constants.js
CHANGED
|
@@ -20,8 +20,8 @@ export const subFeatureRowHeight = 4;
|
|
|
20
20
|
// height of the bar the overlay draws under a row in letter-color mode
|
|
21
21
|
export const domainUnderlineHeight = 3;
|
|
22
22
|
// Feature types that are ordinal segments of one transcript. The overlay
|
|
23
|
-
// alternates two shades across them and labels them by number,
|
|
24
|
-
// type gets its own
|
|
23
|
+
// alternates two shades across them and labels them by number, and every other
|
|
24
|
+
// type gets its own color and legend row.
|
|
25
25
|
export const segmentFeatureTypes = new Set([
|
|
26
26
|
'exon',
|
|
27
27
|
'CDS',
|
|
@@ -32,6 +32,30 @@ export const segmentFeatureTypes = new Set([
|
|
|
32
32
|
]);
|
|
33
33
|
// the two shades alternated across adjacent segments (exons)
|
|
34
34
|
export const segmentShades = ['#9fb6d4', '#d4dcea'];
|
|
35
|
+
/**
|
|
36
|
+
* A site's feature type: CDD's GenPept `Site`, a Sequence Ontology `*_site`,
|
|
37
|
+
* InterPro's `Binding_site`, `Active_site` and `Conserved_site`, and UniProt's
|
|
38
|
+
* `Binding site`. A site is a set of scattered residues, often single columns
|
|
39
|
+
*/
|
|
40
|
+
export function isSiteType(featureType) {
|
|
41
|
+
return !!featureType && /(^|[_ ])site$/i.test(featureType);
|
|
42
|
+
}
|
|
43
|
+
// A domain fills a span the residue letters draw over, so it takes a light
|
|
44
|
+
// color, CIELAB L* 80 or more. A site marks a few residues inside a domain, so
|
|
45
|
+
// it takes a dark one, L* 50 or less: a thin mark needs lightness contrast to
|
|
46
|
+
// show on a fill, and hue alone gives none. Neither list holds a grey or a
|
|
47
|
+
// magenta, which a structure view draws for uncolored chains and for the
|
|
48
|
+
// hovered residue
|
|
49
|
+
export const domainFills = [
|
|
50
|
+
'#b3cde3',
|
|
51
|
+
'#fed9a6',
|
|
52
|
+
'#ccebc5',
|
|
53
|
+
'#decbe4',
|
|
54
|
+
'#fbb4ae',
|
|
55
|
+
'#e5d8bd',
|
|
56
|
+
'#fddaec',
|
|
57
|
+
];
|
|
58
|
+
export const siteFills = ['#178867', '#c05402', '#7570b3', '#518318', '#906719'];
|
|
35
59
|
export const defaultDrawMsaLetters = true;
|
|
36
60
|
export const defaultScrollZoom = false;
|
|
37
61
|
// Which cell dimensions a wheel zoom scales. 'horizontal' holds the row height,
|
|
@@ -93,7 +117,6 @@ export const defaultDrawTree = true;
|
|
|
93
117
|
export const defaultDrawNodeBubbles = true;
|
|
94
118
|
export const defaultDrawNodeLabels = false;
|
|
95
119
|
export const defaultShowTreeOverview = false;
|
|
96
|
-
export const defaultShowTreeScaleBar = false;
|
|
97
120
|
export const defaultOverviewHeight = 120;
|
|
98
121
|
// Neighbor joining does not run above this many rows. The distance matrix is
|
|
99
122
|
// O(n^2*L) and the join loop O(n^3), both on the main thread with no progress
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,sBAAsB;AACtB,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAA;AACjC,MAAM,CAAC,MAA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M,CAAA;AAE5C,8EAA8E;AAC9E,8EAA8E;AAC9E,4DAA4D;AAC5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAEtC,wDAAwD;AACxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAA;AAEpC,0EAA0E;AAC1E,wCAAwC;AACxC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAA;AAE3C,+EAA+E;AAC/E,6EAA6E;AAC7E,mEAAmE;AACnE,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAA;AACpC,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,GAAG,CAAC,CAAA"}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* order, such as the list a scale asked for by name; without it the keys take
|
|
4
4
|
* the ggplot palette of their own size. Beyond the colors available — a
|
|
5
5
|
* gene-structure overlay with one feature per exon, or nine keys on an
|
|
6
|
-
* eight-color palette — every key gets an evenly spaced
|
|
7
|
-
* two keys share a color.
|
|
6
|
+
* eight-color palette — every key gets an evenly spaced hue instead, so no
|
|
7
|
+
* two keys share a color. The hues sit at CIELAB `lightness` where one is
|
|
8
|
+
* given, else at HSL lightness 60.
|
|
8
9
|
*/
|
|
9
|
-
export declare function createPaletteMap(keys: string[], palette?: readonly string[]): {
|
|
10
|
+
export declare function createPaletteMap(keys: string[], palette?: readonly string[], lightness?: number): {
|
|
10
11
|
[k: string]: string;
|
|
11
12
|
};
|
package/dist/createPaletteMap.js
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
import { colord } from 'colord';
|
|
1
|
+
import { colord, extend } from 'colord';
|
|
2
|
+
import lchPlugin from 'colord/plugins/lch';
|
|
2
3
|
import palettes from './ggplotPalettes.js';
|
|
4
|
+
extend([lchPlugin]);
|
|
3
5
|
/**
|
|
4
6
|
* Creates a map from keys to colors. `palette` names the colors to take in
|
|
5
7
|
* order, such as the list a scale asked for by name; without it the keys take
|
|
6
8
|
* the ggplot palette of their own size. Beyond the colors available — a
|
|
7
9
|
* gene-structure overlay with one feature per exon, or nine keys on an
|
|
8
|
-
* eight-color palette — every key gets an evenly spaced
|
|
9
|
-
* two keys share a color.
|
|
10
|
+
* eight-color palette — every key gets an evenly spaced hue instead, so no
|
|
11
|
+
* two keys share a color. The hues sit at CIELAB `lightness` where one is
|
|
12
|
+
* given, else at HSL lightness 60.
|
|
10
13
|
*/
|
|
11
|
-
export function createPaletteMap(keys, palette) {
|
|
14
|
+
export function createPaletteMap(keys, palette, lightness) {
|
|
12
15
|
const n = keys.length;
|
|
13
16
|
const colors = palette ?? palettes[n - 1];
|
|
14
17
|
if (colors && n <= colors.length) {
|
|
15
18
|
return Object.fromEntries(keys.map((key, i) => [key, colors[i]]));
|
|
16
19
|
}
|
|
17
|
-
return Object.fromEntries(keys.map((key, i) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
return Object.fromEntries(keys.map((key, i) => {
|
|
21
|
+
const h = (i * 360) / n;
|
|
22
|
+
return [
|
|
23
|
+
key,
|
|
24
|
+
(lightness === undefined
|
|
25
|
+
? colord({ h, s: 60, l: 60 })
|
|
26
|
+
: colord({ l: lightness, c: 40, h })).toHex(),
|
|
27
|
+
];
|
|
28
|
+
}));
|
|
21
29
|
}
|
|
22
30
|
//# sourceMappingURL=createPaletteMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPaletteMap.js","sourceRoot":"","sources":["../src/createPaletteMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"createPaletteMap.js","sourceRoot":"","sources":["../src/createPaletteMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACvC,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAE1C,OAAO,QAAQ,MAAM,qBAAqB,CAAA;AAE1C,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,CAAA;AAEnB;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAC9B,IAAc,EACd,OAA2B,EAC3B,SAAkB;IAElB,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAA;IACrB,MAAM,MAAM,GAAG,OAAO,IAAI,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;IACzC,IAAI,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAA;IACpE,CAAC;IACD,OAAO,MAAM,CAAC,WAAW,CACvB,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QAClB,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAA;QACvB,OAAO;YACL,GAAG;YACH,CAAC,SAAS,KAAK,SAAS;gBACtB,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;gBAC7B,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CACrC,CAAC,KAAK,EAAE;SACV,CAAA;IACH,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { renderToSvg } from './renderToSvg.tsx';
|
|
|
2
2
|
export type { ExportSvgOptions } from './renderToSvg.tsx';
|
|
3
3
|
export { installHeadlessRenderEnv } from './headlessRenderEnv.ts';
|
|
4
4
|
export { CHAR_WIDTH_RATIO } from './measureTextCanvas.ts';
|
|
5
|
-
export { maxNeighborJoiningRows } from './constants.ts';
|
|
5
|
+
export { isSiteType, maxNeighborJoiningRows } from './constants.ts';
|
|
6
6
|
export { expandSpec, residueLabel } from './expandSpec.ts';
|
|
7
7
|
export type { ColumnTrackShorthand, HighlightShorthand, MsaSpec, RegionShorthand, } from './expandSpec.ts';
|
|
8
8
|
export { default as MSAView } from './components/Loading.tsx';
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ export { installHeadlessRenderEnv } from './headlessRenderEnv.js';
|
|
|
14
14
|
export { CHAR_WIDTH_RATIO } from './measureTextCanvas.js';
|
|
15
15
|
// the row count above which calculateNeighborJoiningTreeFromMSA throws, for
|
|
16
16
|
// hosts gating their own menu item
|
|
17
|
-
export { maxNeighborJoiningRows } from './constants.js';
|
|
17
|
+
export { isSiteType, maxNeighborJoiningRows } from './constants.js';
|
|
18
18
|
// the short forms a link or a script can write a view in; see docs/layers.md
|
|
19
19
|
export { expandSpec, residueLabel } from './expandSpec.js';
|
|
20
20
|
export { default as MSAView } from './components/Loading.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yDAAyD;AACzD,6EAA6E;AAC7E,+DAA+D;AAC/D,gFAAgF;AAChF,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,mEAAmE;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,8EAA8E;AAC9E,yDAAyD;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,4EAA4E;AAC5E,mCAAmC;AACnC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yDAAyD;AACzD,6EAA6E;AAC7E,+DAA+D;AAC/D,gFAAgF;AAChF,0EAA0E;AAC1E,yEAAyE;AACzE,8EAA8E;AAC9E,mEAAmE;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,8EAA8E;AAC9E,yDAAyD;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,4EAA4E;AAC5E,mCAAmC;AACnC,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AACnE,6EAA6E;AAC7E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAO1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,yBAA0B,CAAA;AAE7D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,2BAA4B,CAAA;AAEjE,sEAAsE;AACtE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAClE,6EAA6E;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAGtD,OAAO,EAAqB,OAAO,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -62,11 +62,6 @@ export declare function TreeModelF(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
62
62
|
* subtree boxed. A click on it focuses the subtree under the pointer
|
|
63
63
|
*/
|
|
64
64
|
showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
65
|
-
/**
|
|
66
|
-
* #property
|
|
67
|
-
* draw the branch-length scale bar above the tree of a phylogram
|
|
68
|
-
*/
|
|
69
|
-
showTreeScaleBar: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
70
65
|
/**
|
|
71
66
|
* #property
|
|
72
67
|
* height of the tree overview band, px
|
|
@@ -113,10 +108,6 @@ export declare function TreeModelF(): import("@jbrowse/mobx-state-tree").IModelT
|
|
|
113
108
|
* #action
|
|
114
109
|
*/
|
|
115
110
|
setShowTreeOverview(arg: boolean): void;
|
|
116
|
-
/**
|
|
117
|
-
* #action
|
|
118
|
-
*/
|
|
119
|
-
setShowTreeScaleBar(arg: boolean): void;
|
|
120
111
|
/**
|
|
121
112
|
* #action
|
|
122
113
|
*/
|
package/dist/model/treeModel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { types } from '@jbrowse/mobx-state-tree';
|
|
2
|
-
import { defaultDrawLabels, defaultDrawNodeBubbles, defaultDrawNodeLabels, defaultDrawTree, defaultLabelsAlignRight, defaultOverviewHeight, defaultShowBranchLen, defaultTreeOrder, defaultShowTreeOverview,
|
|
2
|
+
import { defaultDrawLabels, defaultDrawNodeBubbles, defaultDrawNodeLabels, defaultDrawTree, defaultLabelsAlignRight, defaultOverviewHeight, defaultShowBranchLen, defaultTreeOrder, defaultShowTreeOverview, treeOrders, } from '../constants.js';
|
|
3
3
|
import { stripDefault } from '../stripDefault.js';
|
|
4
4
|
/**
|
|
5
5
|
* #stateModel Tree
|
|
@@ -66,11 +66,6 @@ export function TreeModelF() {
|
|
|
66
66
|
* subtree boxed. A click on it focuses the subtree under the pointer
|
|
67
67
|
*/
|
|
68
68
|
showTreeOverview: stripDefault(types.boolean, defaultShowTreeOverview),
|
|
69
|
-
/**
|
|
70
|
-
* #property
|
|
71
|
-
* draw the branch-length scale bar above the tree of a phylogram
|
|
72
|
-
*/
|
|
73
|
-
showTreeScaleBar: stripDefault(types.boolean, defaultShowTreeScaleBar),
|
|
74
69
|
/**
|
|
75
70
|
* #property
|
|
76
71
|
* height of the tree overview band, px
|
|
@@ -137,12 +132,6 @@ export function TreeModelF() {
|
|
|
137
132
|
setShowTreeOverview(arg) {
|
|
138
133
|
self.showTreeOverview = arg;
|
|
139
134
|
},
|
|
140
|
-
/**
|
|
141
|
-
* #action
|
|
142
|
-
*/
|
|
143
|
-
setShowTreeScaleBar(arg) {
|
|
144
|
-
self.showTreeScaleBar = arg;
|
|
145
|
-
},
|
|
146
135
|
/**
|
|
147
136
|
* #action
|
|
148
137
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeModel.js","sourceRoot":"","sources":["../../src/model/treeModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"treeModel.js","sourceRoot":"","sources":["../../src/model/treeModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,GACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAIjD;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,KAAK;SACT,KAAK,CAAC;QACL;;WAEG;QACH,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC;QAC1D;;;WAGG;QACH,gBAAgB,EAAE,YAAY,CAAC,KAAK,CAAC,OA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AC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAC9D,CAAC;QAED;;WAEG;QACH,mBAAmB,CAAC,GAAY;YAC9B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAA;QAC7B,CAAC;QACD;;WAEG;QACH,WAAW,CAAC,GAAY;YACtB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAA;QACrB,CAAC;QAED;;WAEG;QACH,gBAAgB,CAAC,GAAY;YAC3B,IAAI,CAAC,aAAa,GAAG,GAAG,CAAA;QAC1B,CAAC;QAED;;WAEG;QACH,YAAY,CAAC,KAAgB;YAC3B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAA;QACxB,CAAC;QAED;;WAEG;QACH,kBAAkB,CAAC,GAAY;YAC7B,IAAI,CAAC,eAAe,GAAG,GAAG,CAAA;QAC5B,CAAC;QACD;;WAEG;QACH,iBAAiB,CAAC,GAAY;YAC5B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAA;QAC3B,CAAC;QACD;;WAEG;QACH,mBAAmB,CAAC,GAAY;YAC9B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAA;QAC7B,CAAC;QACD;;WAEG;QACH,aAAa,CAAC,GAAY;YACxB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAA;QACvB,CAAC;KACF,CAAC,CAAC,CAAA;AACP,CAAC"}
|
package/dist/model.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ type FeaturePanelScale = Omit<ResolvedFeaturePanel, 'id' | 'width' | 'offsetX' |
|
|
|
50
50
|
*/
|
|
51
51
|
declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
52
52
|
maxInlineSnapshotBytes?: number;
|
|
53
|
-
}): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "
|
|
53
|
+
}): import("@jbrowse/mobx-state-tree").IModelType<Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
54
54
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
55
55
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
56
56
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
@@ -61,7 +61,6 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
61
61
|
drawNodeBubbles: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
62
62
|
drawNodeLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
63
63
|
showTreeOverview: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
64
|
-
showTreeScaleBar: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
65
64
|
overviewHeight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
66
65
|
}, "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats"> & {
|
|
67
66
|
bgColor: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -668,7 +667,6 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
668
667
|
setDrawNodeBubbles(arg: boolean): void;
|
|
669
668
|
setDrawNodeLabels(arg: boolean): void;
|
|
670
669
|
setShowTreeOverview(arg: boolean): void;
|
|
671
|
-
setShowTreeScaleBar(arg: boolean): void;
|
|
672
670
|
setDrawLabels(arg: boolean): void;
|
|
673
671
|
} & {
|
|
674
672
|
setColorSchemeName(name: string): void;
|
|
@@ -1760,9 +1758,9 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
1760
1758
|
} & {
|
|
1761
1759
|
/**
|
|
1762
1760
|
* #getter
|
|
1763
|
-
* the branch-length scale bar over the tree,
|
|
1764
|
-
*
|
|
1765
|
-
* too narrow for one
|
|
1761
|
+
* the branch-length scale bar over the tree, the guide of its branch-length
|
|
1762
|
+
* scale: undefined in cladogram mode, with the tree off, or when the tree
|
|
1763
|
+
* area is too narrow for one
|
|
1766
1764
|
*/
|
|
1767
1765
|
readonly treeScaleBar: {
|
|
1768
1766
|
step: number;
|
|
@@ -2076,12 +2074,15 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
2076
2074
|
/**
|
|
2077
2075
|
* #getter
|
|
2078
2076
|
* categorical feature types (InterPro domains and the like) that each get
|
|
2079
|
-
* their own color and a legend entry
|
|
2080
|
-
* feature type, types in the order they first appear. A GenPept
|
|
2081
|
-
* record's CDD Sites follow every Region, so the palette spends the
|
|
2082
|
-
* colors after the domains' on the sites inside them
|
|
2077
|
+
* their own color and a legend entry
|
|
2083
2078
|
*/
|
|
2084
2079
|
readonly categoricalDomainTypes: Annotation[];
|
|
2080
|
+
/**
|
|
2081
|
+
* #getter
|
|
2082
|
+
* accession -> fill: segments alternate two shades, a domain takes a
|
|
2083
|
+
* light color and a site a dark one, so a site's residues stand out on
|
|
2084
|
+
* the domain around them
|
|
2085
|
+
*/
|
|
2085
2086
|
readonly fillPalette: {
|
|
2086
2087
|
[x: string]: string;
|
|
2087
2088
|
};
|
|
@@ -2440,7 +2441,6 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
2440
2441
|
drawNodeBubbles: boolean;
|
|
2441
2442
|
drawNodeLabels: boolean;
|
|
2442
2443
|
showTreeOverview: boolean;
|
|
2443
|
-
showTreeScaleBar: boolean;
|
|
2444
2444
|
overviewHeight: number;
|
|
2445
2445
|
columnTracks: ColumnTrackSpec[];
|
|
2446
2446
|
id: string;
|
|
@@ -2580,7 +2580,6 @@ declare function stateModelFactory({ maxInlineSnapshotBytes, }?: {
|
|
|
2580
2580
|
drawNodeBubbles: boolean;
|
|
2581
2581
|
drawNodeLabels: boolean;
|
|
2582
2582
|
showTreeOverview: boolean;
|
|
2583
|
-
showTreeScaleBar: boolean;
|
|
2584
2583
|
overviewHeight: number;
|
|
2585
2584
|
columnTracks?: undefined;
|
|
2586
2585
|
id: string;
|
package/dist/model.js
CHANGED
|
@@ -13,7 +13,7 @@ import { packDomainLanes } from './components/msa/packDomainLanes.js';
|
|
|
13
13
|
import { visibleColRange } from './components/msa/visibleColRange.js';
|
|
14
14
|
import { cladeGutterWidth } from './components/tree/cladeBrackets.js';
|
|
15
15
|
import { scaleBarLength } from './components/tree/scaleBar.js';
|
|
16
|
-
import { defaultAllowedGappyness, defaultColWidth, defaultColorSchemeName, defaultCurrentAlignment, defaultDrawMsaLetters, defaultHeight, defaultHideGaps, defaultRowHeight, defaultScrollX, defaultScrollY, defaultScrollZoom, defaultScrollZoomAxis, defaultShowDomainLegend, defaultShowDomains, defaultSubFeatureRows, fontSizeFor, labelFitFontSize, maxCellSize, maxFitTreeWidth, maxTreeAreaShare, maxInlineSnapshotBytes as defaultMaxInlineSnapshotBytes, maxNeighborJoiningRows, minColWidth, minLetterColWidth, minLetterRowHeight, minRowHeight, minTreeWidth, pxPerTreeDepth, resizeHandleWidth, rowPanelHeaderHeight, rowTintAlpha, scrollZoomAxes, segmentFeatureTypes, segmentShades, settingsPanelWidth, treeScaleBarHeight, } from './constants.js';
|
|
16
|
+
import { defaultAllowedGappyness, defaultColWidth, defaultColorSchemeName, defaultCurrentAlignment, defaultDrawMsaLetters, defaultHeight, defaultHideGaps, defaultRowHeight, defaultScrollX, defaultScrollY, defaultScrollZoom, defaultScrollZoomAxis, defaultShowDomainLegend, defaultShowDomains, domainFills, defaultSubFeatureRows, fontSizeFor, labelFitFontSize, maxCellSize, maxFitTreeWidth, maxTreeAreaShare, maxInlineSnapshotBytes as defaultMaxInlineSnapshotBytes, maxNeighborJoiningRows, minColWidth, minLetterColWidth, minLetterRowHeight, isSiteType, minRowHeight, minTreeWidth, pxPerTreeDepth, resizeHandleWidth, rowPanelHeaderHeight, rowTintAlpha, scrollZoomAxes, segmentFeatureTypes, segmentShades, settingsPanelWidth, siteFills, treeScaleBarHeight, } from './constants.js';
|
|
17
17
|
import { createPaletteMap } from './createPaletteMap.js';
|
|
18
18
|
import { exportFileName } from './exportFileName.js';
|
|
19
19
|
import { featureField, featureName } from './featureFields.js';
|
|
@@ -116,7 +116,6 @@ export const preservedOnReset = new Set([
|
|
|
116
116
|
'drawNodeBubbles',
|
|
117
117
|
'drawNodeLabels',
|
|
118
118
|
'showTreeOverview',
|
|
119
|
-
'showTreeScaleBar',
|
|
120
119
|
'overviewHeight',
|
|
121
120
|
'turnedOffTracks',
|
|
122
121
|
'trackHeights',
|
|
@@ -2475,14 +2474,11 @@ function stateModelFactory({ maxInlineSnapshotBytes = defaultMaxInlineSnapshotBy
|
|
|
2475
2474
|
.views(self => ({
|
|
2476
2475
|
/**
|
|
2477
2476
|
* #getter
|
|
2478
|
-
* the branch-length scale bar over the tree,
|
|
2479
|
-
*
|
|
2480
|
-
* too narrow for one
|
|
2477
|
+
* the branch-length scale bar over the tree, the guide of its branch-length
|
|
2478
|
+
* scale: undefined in cladogram mode, with the tree off, or when the tree
|
|
2479
|
+
* area is too narrow for one
|
|
2481
2480
|
*/
|
|
2482
2481
|
get treeScaleBar() {
|
|
2483
|
-
if (!self.showTreeScaleBar) {
|
|
2484
|
-
return undefined;
|
|
2485
|
-
}
|
|
2486
2482
|
return scaleBarLength(self.pxPerBranchLength, self.effectiveTreeAreaWidth - self.marginLeft * 2);
|
|
2487
2483
|
},
|
|
2488
2484
|
/**
|
|
@@ -3059,23 +3055,30 @@ function stateModelFactory({ maxInlineSnapshotBytes = defaultMaxInlineSnapshotBy
|
|
|
3059
3055
|
/**
|
|
3060
3056
|
* #getter
|
|
3061
3057
|
* categorical feature types (InterPro domains and the like) that each get
|
|
3062
|
-
* their own color and a legend entry
|
|
3063
|
-
* feature type, types in the order they first appear. A GenPept
|
|
3064
|
-
* record's CDD Sites follow every Region, so the palette spends the
|
|
3065
|
-
* colors after the domains' on the sites inside them
|
|
3058
|
+
* their own color and a legend entry
|
|
3066
3059
|
*/
|
|
3067
3060
|
get categoricalDomainTypes() {
|
|
3068
|
-
|
|
3069
|
-
const typeOrder = [...new Set(types.map(d => d.featureType))];
|
|
3070
|
-
return types.toSorted((a, b) => typeOrder.indexOf(a.featureType) - typeOrder.indexOf(b.featureType));
|
|
3061
|
+
return [...self.annotationTypes.values()].filter(d => !segmentFeatureTypes.has(d.featureType ?? ''));
|
|
3071
3062
|
},
|
|
3063
|
+
/**
|
|
3064
|
+
* #getter
|
|
3065
|
+
* accession -> fill: segments alternate two shades, a domain takes a
|
|
3066
|
+
* light color and a site a dark one, so a site's residues stand out on
|
|
3067
|
+
* the domain around them
|
|
3068
|
+
*/
|
|
3072
3069
|
get fillPalette() {
|
|
3073
3070
|
const segments = Object.fromEntries(this.segmentDomainTypes.map((d, i) => [
|
|
3074
3071
|
d.accession,
|
|
3075
3072
|
segmentShades[i % segmentShades.length],
|
|
3076
3073
|
]));
|
|
3077
|
-
const
|
|
3078
|
-
|
|
3074
|
+
const accessions = (site) => this.categoricalDomainTypes
|
|
3075
|
+
.filter(d => isSiteType(d.featureType) === site)
|
|
3076
|
+
.map(d => d.accession);
|
|
3077
|
+
return {
|
|
3078
|
+
...segments,
|
|
3079
|
+
...createPaletteMap(accessions(false), domainFills, 85),
|
|
3080
|
+
...createPaletteMap(accessions(true), siteFills, 45),
|
|
3081
|
+
};
|
|
3079
3082
|
},
|
|
3080
3083
|
/**
|
|
3081
3084
|
* #getter
|