react-msaview 1.3.1 → 2.0.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 +283 -97265
- package/dist/StructureModel.d.ts +9 -0
- package/dist/StructureModel.js +11 -0
- package/dist/StructureModel.js.map +1 -0
- package/dist/UniprotTrack.d.ts +27 -0
- package/dist/UniprotTrack.js +52 -0
- package/dist/UniprotTrack.js.map +1 -0
- package/dist/colorSchemes.d.ts +2 -2
- package/dist/colorSchemes.js +24 -29
- package/dist/colorSchemes.js.map +1 -0
- package/dist/components/AboutDlg.d.ts +0 -1
- package/dist/components/AboutDlg.js +38 -48
- package/dist/components/AboutDlg.js.map +1 -0
- package/dist/components/AddTrackDlg.d.ts +0 -1
- package/dist/components/AddTrackDlg.js +13 -13
- package/dist/components/AddTrackDlg.js.map +1 -0
- package/dist/components/AnnotationDlg.d.ts +0 -1
- package/dist/components/AnnotationDlg.js +36 -48
- package/dist/components/AnnotationDlg.js.map +1 -0
- package/dist/components/BoxTrack.d.ts +3 -4
- package/dist/components/BoxTrack.js +51 -48
- package/dist/components/BoxTrack.js.map +1 -0
- package/dist/components/DetailsDlg.d.ts +0 -1
- package/dist/components/DetailsDlg.js +7 -7
- package/dist/components/DetailsDlg.js.map +1 -0
- package/dist/components/Header.d.ts +0 -1
- package/dist/components/Header.js +39 -34
- package/dist/components/Header.js.map +1 -0
- package/dist/components/ImportForm.d.ts +0 -1
- package/dist/components/ImportForm.js +59 -71
- package/dist/components/ImportForm.js.map +1 -0
- package/dist/components/MSACanvas.d.ts +0 -1
- package/dist/components/MSACanvas.js +71 -74
- package/dist/components/MSACanvas.js.map +1 -0
- package/dist/components/MSAView.d.ts +0 -1
- package/dist/components/MSAView.js +19 -38
- package/dist/components/MSAView.js.map +1 -0
- package/dist/components/MoreInfoDlg.d.ts +2 -3
- package/dist/components/MoreInfoDlg.js +5 -5
- package/dist/components/MoreInfoDlg.js.map +1 -0
- package/dist/components/ResizeHandles.d.ts +2 -3
- package/dist/components/ResizeHandles.js +31 -32
- package/dist/components/ResizeHandles.js.map +1 -0
- package/dist/components/Rubberband.d.ts +2 -1
- package/dist/components/Rubberband.js +42 -64
- package/dist/components/Rubberband.js.map +1 -0
- package/dist/components/Ruler.d.ts +0 -15
- package/dist/components/Ruler.js +18 -87
- package/dist/components/Ruler.js.map +1 -0
- package/dist/components/SettingsDlg.d.ts +0 -1
- package/dist/components/SettingsDlg.js +29 -22
- package/dist/components/SettingsDlg.js.map +1 -0
- package/dist/components/TextTrack.d.ts +3 -4
- package/dist/components/TextTrack.js +23 -24
- package/dist/components/TextTrack.js.map +1 -0
- package/dist/components/Track.d.ts +2 -3
- package/dist/components/Track.js +38 -38
- package/dist/components/Track.js.map +1 -0
- package/dist/components/TrackInfoDlg.d.ts +5 -3
- package/dist/components/TrackInfoDlg.js +12 -13
- package/dist/components/TrackInfoDlg.js.map +1 -0
- package/dist/components/TracklistDlg.d.ts +0 -1
- package/dist/components/TracklistDlg.js +9 -9
- package/dist/components/TracklistDlg.js.map +1 -0
- package/dist/components/TreeCanvas.d.ts +0 -1
- package/dist/components/TreeCanvas.js +135 -148
- package/dist/components/TreeCanvas.js.map +1 -0
- package/dist/components/TreeRuler.d.ts +0 -1
- package/dist/components/TreeRuler.js +3 -3
- package/dist/components/TreeRuler.js.map +1 -0
- package/dist/components/VerticalGuide.d.ts +6 -0
- package/dist/components/VerticalGuide.js +30 -0
- package/dist/components/VerticalGuide.js.map +1 -0
- package/dist/components/data/seq2.d.ts +3 -3
- package/dist/components/data/seq2.js +33 -3
- package/dist/components/data/seq2.js.map +1 -0
- package/{bundle/components/Ruler.d.ts → dist/components/util.d.ts} +1 -6
- package/dist/components/util.js +69 -0
- package/dist/components/util.js.map +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -0
- package/dist/layout.js +14 -20
- package/dist/layout.js.map +1 -0
- package/dist/model.d.ts +94 -74
- package/dist/model.js +232 -473
- package/dist/model.js.map +1 -0
- package/dist/parseNewick.d.ts +1 -5
- package/dist/parseNewick.js +10 -7
- package/dist/parseNewick.js.map +1 -0
- package/dist/parsers/ClustalMSA.d.ts +6 -18
- package/dist/parsers/ClustalMSA.js +55 -64
- package/dist/parsers/ClustalMSA.js.map +1 -0
- package/dist/parsers/FastaMSA.d.ts +4 -9
- package/dist/parsers/FastaMSA.js +55 -64
- package/dist/parsers/FastaMSA.js.map +1 -0
- package/dist/parsers/StockholmMSA.d.ts +8 -13
- package/dist/parsers/StockholmMSA.js +78 -107
- package/dist/parsers/StockholmMSA.js.map +1 -0
- package/dist/util.d.ts +33 -4
- package/dist/util.js +76 -24
- package/dist/util.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +30 -30
- package/src/StructureModel.ts +11 -0
- package/src/UniprotTrack.ts +60 -0
- package/src/colorSchemes.ts +520 -0
- package/src/components/AboutDlg.tsx +64 -0
- package/src/components/AddTrackDlg.tsx +74 -0
- package/src/components/AnnotationDlg.tsx +144 -0
- package/src/components/BoxTrack.tsx +225 -0
- package/src/components/DetailsDlg.tsx +28 -0
- package/src/components/Header.tsx +117 -0
- package/src/components/ImportForm.tsx +192 -0
- package/src/components/MSACanvas.tsx +297 -0
- package/src/components/MSAView.tsx +132 -0
- package/src/components/MoreInfoDlg.tsx +21 -0
- package/src/components/ResizeHandles.tsx +137 -0
- package/src/components/Rubberband.tsx +271 -0
- package/src/components/Ruler.tsx +122 -0
- package/src/components/SettingsDlg.tsx +154 -0
- package/src/components/TextTrack.tsx +120 -0
- package/src/components/Track.tsx +150 -0
- package/src/components/TrackInfoDlg.tsx +59 -0
- package/src/components/TracklistDlg.tsx +61 -0
- package/src/components/TreeCanvas.tsx +633 -0
- package/src/components/TreeRuler.tsx +12 -0
- package/src/components/VerticalGuide.tsx +50 -0
- package/src/components/data/seq2.ts +35 -0
- package/src/components/util.ts +94 -0
- package/src/declare.d.ts +2 -0
- package/src/index.ts +2 -0
- package/src/layout.ts +83 -0
- package/src/model.ts +790 -0
- package/{bundle/parseNewick.d.ts → src/parseNewick.ts} +36 -5
- package/src/parsers/ClustalMSA.ts +79 -0
- package/src/parsers/FastaMSA.ts +82 -0
- package/src/parsers/StockholmMSA.ts +137 -0
- package/src/util.ts +142 -0
- package/src/version.ts +1 -0
- package/bundle/colorSchemes.d.ts +0 -16
- package/bundle/colorSchemes.js +0 -455
- package/bundle/components/AboutDlg.d.ts +0 -5
- package/bundle/components/AboutDlg.js +0 -47
- package/bundle/components/AddTrackDlg.d.ts +0 -8
- package/bundle/components/AddTrackDlg.js +0 -26
- package/bundle/components/AnnotationDlg.d.ts +0 -11
- package/bundle/components/AnnotationDlg.js +0 -77
- package/bundle/components/BoxTrack.d.ts +0 -7
- package/bundle/components/BoxTrack.js +0 -143
- package/bundle/components/DetailsDlg.d.ts +0 -8
- package/bundle/components/DetailsDlg.js +0 -12
- package/bundle/components/Header.d.ts +0 -6
- package/bundle/components/Header.js +0 -63
- package/bundle/components/ImportForm.d.ts +0 -6
- package/bundle/components/ImportForm.js +0 -89
- package/bundle/components/MSACanvas.d.ts +0 -6
- package/bundle/components/MSACanvas.js +0 -210
- package/bundle/components/MSAView.d.ts +0 -6
- package/bundle/components/MSAView.js +0 -88
- package/bundle/components/MoreInfoDlg.d.ts +0 -6
- package/bundle/components/MoreInfoDlg.js +0 -11
- package/bundle/components/ResizeHandles.d.ts +0 -8
- package/bundle/components/ResizeHandles.js +0 -110
- package/bundle/components/Rubberband.d.ts +0 -7
- package/bundle/components/Rubberband.js +0 -196
- package/bundle/components/Ruler.js +0 -121
- package/bundle/components/SettingsDlg.d.ts +0 -8
- package/bundle/components/SettingsDlg.js +0 -40
- package/bundle/components/TextTrack.d.ts +0 -7
- package/bundle/components/TextTrack.js +0 -72
- package/bundle/components/Track.d.ts +0 -11
- package/bundle/components/Track.js +0 -81
- package/bundle/components/TrackInfoDlg.d.ts +0 -6
- package/bundle/components/TrackInfoDlg.js +0 -33
- package/bundle/components/TracklistDlg.d.ts +0 -8
- package/bundle/components/TracklistDlg.js +0 -18
- package/bundle/components/TreeCanvas.d.ts +0 -6
- package/bundle/components/TreeCanvas.js +0 -431
- package/bundle/components/TreeRuler.d.ts +0 -6
- package/bundle/components/TreeRuler.js +0 -8
- package/bundle/components/data/seq2.d.ts +0 -3
- package/bundle/components/data/seq2.js +0 -3
- package/bundle/index.d.ts +0 -4
- package/bundle/layout.d.ts +0 -23
- package/bundle/layout.js +0 -53
- package/bundle/model.d.ts +0 -364
- package/bundle/model.js +0 -894
- package/bundle/parseNewick.js +0 -94
- package/bundle/parsers/ClustalMSA.d.ts +0 -39
- package/bundle/parsers/ClustalMSA.js +0 -77
- package/bundle/parsers/FastaMSA.d.ts +0 -26
- package/bundle/parsers/FastaMSA.js +0 -78
- package/bundle/parsers/StockholmMSA.d.ts +0 -75
- package/bundle/parsers/StockholmMSA.js +0 -142
- package/bundle/util.d.ts +0 -17
- package/bundle/util.js +0 -33
- package/dist/components/package.json +0 -62
|
@@ -1,3 +1,33 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export const smallMSA = `CLUSTAL O(1.2.3) multiple sequence alignment
|
|
2
|
+
UniProt/Swiss-Prot|P26898|IL2RA_SHEEP MEPSLLMWRFFVFIVVPGCVTEACHDDPPSLRNA----------MFKVLRYE----VGTM
|
|
3
|
+
UniProt/Swiss-Prot|P01590|IL2RA_MOUSE MEPRLLMLGFLSLTIVPSCRAELCLYDPPEVPNA----------TFKALSYK----NGTI
|
|
4
|
+
UniProt/Swiss-Prot|P41690|IL2RA_FELCA MEPSLLLWGILTFVVVHGHVTELCDENPPDIQHA----------TFKALTYK----TGTM
|
|
5
|
+
UniProt/Swiss-Prot|P01589|IL2RA_HUMAN MDSYLLMWGLLTFIMVPGCQAELCDDDPPEIPHA----------TFKAMAYK----EGTM
|
|
6
|
+
UniProt/Swiss-Prot|Q5MNY4|IL2RA_MACMU MDPYLLMWGLLTFITVPGCQAELCDDDPPKITHA----------TFKAVAYK----EGTM
|
|
7
|
+
UniProt/Swiss-Prot|Q95118|IL2RG_BOVIN -----------------------------------LLMWGLLT-----------------
|
|
8
|
+
UniProt/Swiss-Prot|P40321|IL2RG_CANFA MLKPPLPLRSLLFLQLSLLGVGLNSTVPMPNGNEDIT------PDFFLTATPSETLSVSS
|
|
9
|
+
UniProt/Swiss-Prot|P26896|IL2RB_RAT MATVDLSWRLPLYILLLLLATT--------------------------------WVSAAV
|
|
10
|
+
UniProt/Swiss-Prot|Q8BZM1|GLMN_MOUSE PLPLRSLLFLQLPLLGVGLNP------------------PLPLRSLLFLQLPLLGVGLNP
|
|
11
|
+
UniProt/Swiss-Prot|P36835|IL2_CAPHI -----------LLGVGLNPKFLTP------------------------------------
|
|
12
|
+
UniProt/Swiss-Prot|Q7JFM4|IL2_AOTVO MLKPPLPLRSLLFLQLPLLGVGLNPKFLTPSGNEDIGGKPGTGGDFFLTSTPAGTLDVST
|
|
13
|
+
UniProt/Swiss-Prot|Q29416|IL2_CANFA --------------LFLQLSLLG-------------------------------------
|
|
14
|
+
`;
|
|
15
|
+
export const smallMSAOnly = `CLUSTAL O(1.2.4) multiple sequence alignment
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
sp|P69905|HBA_HUMAN MVLSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHFDLSHGSAQVKGHG 60
|
|
19
|
+
sp|P01942|HBA_MOUSE MVLSGEDKSNIKAAWGKIGGHGAEYGAEALERMFASFPTTKTYFPHFDVSHGSAQVKGHG 60
|
|
20
|
+
sp|P13786|HBAZ_CAPHI MSLTRTERTIILSLWSKISTQADVIGTETLERLFSCYPQAKTYFPHFDLHSGSAQLRAHG 60
|
|
21
|
+
* *: ::: : : *.*:. :. *:*:***:* .:* :********: ****::.**
|
|
22
|
+
|
|
23
|
+
sp|P69905|HBA_HUMAN KKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHLPAEFTP 120
|
|
24
|
+
sp|P01942|HBA_MOUSE KKVADALASAAGHLDDLPGALSALSDLHAHKLRVDPVNFKLLSHCLLVTLASHHPADFTP 120
|
|
25
|
+
sp|P13786|HBAZ_CAPHI SKVVAAVGDAVKSIDNVTSALSKLSELHAYVLRVDPVNFKFLSHCLLVTLASHFPADFTA 120
|
|
26
|
+
.**. *: .*. :*:: .*** **:***: *********:**********:* **:**
|
|
27
|
+
|
|
28
|
+
sp|P69905|HBA_HUMAN AVHASLDKFLASVSTVLTSKYR 142
|
|
29
|
+
sp|P01942|HBA_MOUSE AVHASLDKFLASVSTVLTSKYR 142
|
|
30
|
+
sp|P13786|HBAZ_CAPHI DAHAAWDKFLSIVSGVLTEKYR 142
|
|
31
|
+
.**: ****: ** ***.***`;
|
|
32
|
+
export const smallTree = '(((UniProt/Swiss-Prot|P26898|IL2RA_SHEEP:0.24036,(UniProt/Swiss-Prot|P41690|IL2RA_FELCA:0.17737,(UniProt/Swiss-Prot|P01589|IL2RA_HUMAN:0.03906,UniProt/Swiss-Prot|Q5MNY4|IL2RA_MACMU:0.03787):0.13033):0.04964):0.02189,UniProt/Swiss-Prot|P01590|IL2RA_MOUSE:0.23072):0.06814,(((UniProt/Swiss-Prot|Q95118|IL2RG_BOVIN:0.09600,UniProt/Swiss-Prot|P40321|IL2RG_CANFA:0.09845):0.25333,UniProt/Swiss-Prot|Q29416|IL2_CANFA:-0.35055):0.10231,(UniProt/Swiss-Prot|P26896|IL2RB_RAT:0.33631,UniProt/Swiss-Prot|Q7JFM4|IL2_AOTVO:-0.33631):0.10166):0.01607,(UniProt/Swiss-Prot|Q8BZM1|GLMN_MOUSE:0.32378,UniProt/Swiss-Prot|P36835|IL2_CAPHI:-0.32378):0.09999)';
|
|
33
|
+
//# sourceMappingURL=seq2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seq2.js","sourceRoot":"","sources":["../../../src/components/data/seq2.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;CAavB,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;iDAgBqB,CAAA;AAEjD,MAAM,CAAC,MAAM,SAAS,GACpB,+nBAA+nB,CAAA"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MsaViewModel } from '../model';
|
|
3
1
|
/**
|
|
4
2
|
* Given a scale ( bp/px ) and minimum distances (px) between major and minor
|
|
5
3
|
* gridlines, return an object like `{ majorPitch: bp, minorPitch: bp }` giving
|
|
@@ -14,7 +12,4 @@ export declare function makeTicks(start: number, end: number, bpPerPx: number, e
|
|
|
14
12
|
base: number;
|
|
15
13
|
index: number;
|
|
16
14
|
}[];
|
|
17
|
-
declare
|
|
18
|
-
model: MsaViewModel;
|
|
19
|
-
}) => JSX.Element | null;
|
|
20
|
-
export default Ruler;
|
|
15
|
+
export declare function mathPower(num: number): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given a scale ( bp/px ) and minimum distances (px) between major and minor
|
|
3
|
+
* gridlines, return an object like `{ majorPitch: bp, minorPitch: bp }` giving
|
|
4
|
+
* the gridline pitches to use.
|
|
5
|
+
*/
|
|
6
|
+
export function chooseGridPitch(scale, minMajorPitchPx, minMinorPitchPx) {
|
|
7
|
+
scale = Math.abs(scale);
|
|
8
|
+
const minMajorPitchBp = minMajorPitchPx * scale;
|
|
9
|
+
const majorMagnitude = parseInt(Number(minMajorPitchBp).toExponential().split(/e/i)[1], 10);
|
|
10
|
+
let majorPitch = 10 ** majorMagnitude;
|
|
11
|
+
while (majorPitch < minMajorPitchBp) {
|
|
12
|
+
majorPitch *= 2;
|
|
13
|
+
if (majorPitch >= minMajorPitchBp) {
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
majorPitch *= 2.5;
|
|
17
|
+
}
|
|
18
|
+
majorPitch = Math.max(majorPitch, 5);
|
|
19
|
+
const majorPitchPx = majorPitch / scale;
|
|
20
|
+
let minorPitch = 0;
|
|
21
|
+
if (!(majorPitch % 10) && majorPitchPx / 10 >= minMinorPitchPx) {
|
|
22
|
+
minorPitch = majorPitch / 10;
|
|
23
|
+
}
|
|
24
|
+
else if (!(majorPitch % 5) && majorPitchPx / 5 >= minMinorPitchPx) {
|
|
25
|
+
minorPitch = majorPitch / 5;
|
|
26
|
+
}
|
|
27
|
+
else if (!(majorPitch % 2) && majorPitchPx / 2 >= minMinorPitchPx) {
|
|
28
|
+
minorPitch = majorPitch / 2;
|
|
29
|
+
}
|
|
30
|
+
return { majorPitch, minorPitch };
|
|
31
|
+
}
|
|
32
|
+
export function makeTicks(start, end, bpPerPx, emitMajor = true, emitMinor = true) {
|
|
33
|
+
const gridPitch = chooseGridPitch(bpPerPx, 60, 15);
|
|
34
|
+
let minBase = start;
|
|
35
|
+
let maxBase = end;
|
|
36
|
+
if (minBase === null || maxBase === null) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
if (bpPerPx < 0) {
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-extra-semi
|
|
41
|
+
;
|
|
42
|
+
[minBase, maxBase] = [maxBase, minBase];
|
|
43
|
+
}
|
|
44
|
+
// add 20px additional on the right and left to allow us to draw the ends of
|
|
45
|
+
// labels that lie a little outside our region
|
|
46
|
+
minBase -= Math.abs(20 * bpPerPx);
|
|
47
|
+
maxBase += Math.abs(20 * bpPerPx) + 1;
|
|
48
|
+
const iterPitch = gridPitch.minorPitch || gridPitch.majorPitch;
|
|
49
|
+
let index = 0;
|
|
50
|
+
const ticks = [];
|
|
51
|
+
for (let base = Math.ceil(minBase / iterPitch) * iterPitch; base < maxBase; base += iterPitch) {
|
|
52
|
+
if (emitMinor && base % (gridPitch.majorPitch * 2)) {
|
|
53
|
+
ticks.push({ type: 'minor', base: base - 1, index });
|
|
54
|
+
index += 1;
|
|
55
|
+
}
|
|
56
|
+
else if (emitMajor && !(base % (gridPitch.majorPitch * 2))) {
|
|
57
|
+
ticks.push({ type: 'major', base: base - 1, index });
|
|
58
|
+
index += 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return ticks;
|
|
62
|
+
}
|
|
63
|
+
export function mathPower(num) {
|
|
64
|
+
if (num < 999) {
|
|
65
|
+
return String(num);
|
|
66
|
+
}
|
|
67
|
+
return `${mathPower(~~(num / 1000))},${`00${~~(num % 1000)}`.slice(-3, -3 + 3)}`;
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/components/util.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export { MSAModel, MSAView };
|
|
4
|
-
export type { MsaViewModel };
|
|
1
|
+
export { default as MSAView } from './components/MSAView';
|
|
2
|
+
export { default as MSAModel, type MsaViewModel } from './model';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export { default as MSAView } from './components/MSAView';
|
|
2
|
+
export { default as MSAModel } from './model';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAqB,MAAM,SAAS,CAAA"}
|
package/dist/layout.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import RBush from 'rbush';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.maxHeight, maxHeight = _c === void 0 ? 10000 : _c;
|
|
2
|
+
export default class Layout {
|
|
3
|
+
constructor({ maxHeight = 10000, } = {}) {
|
|
5
4
|
this.maxHeightReached = false;
|
|
6
5
|
this.rbush = new RBush();
|
|
7
6
|
this.rectangles = new Map();
|
|
@@ -12,13 +11,13 @@ var Layout = /** @class */ (function () {
|
|
|
12
11
|
* @returns top position for the rect, or Null if laying
|
|
13
12
|
* out the rect would exceed maxHeighe
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
addRect(id, left, right, height, data) {
|
|
16
15
|
// add to rbush
|
|
17
|
-
|
|
16
|
+
const existingRecord = this.rectangles.get(id);
|
|
18
17
|
if (existingRecord) {
|
|
19
18
|
return existingRecord.minY;
|
|
20
19
|
}
|
|
21
|
-
|
|
20
|
+
let currHeight = 0;
|
|
22
21
|
while (this.rbush.collides({
|
|
23
22
|
minX: left,
|
|
24
23
|
minY: currHeight,
|
|
@@ -28,26 +27,21 @@ var Layout = /** @class */ (function () {
|
|
|
28
27
|
currHeight <= this.maxHeight) {
|
|
29
28
|
currHeight += 1;
|
|
30
29
|
}
|
|
31
|
-
|
|
30
|
+
const record = {
|
|
32
31
|
minX: left,
|
|
33
32
|
minY: currHeight,
|
|
34
33
|
maxX: right,
|
|
35
34
|
maxY: currHeight + height,
|
|
36
|
-
id
|
|
37
|
-
data
|
|
35
|
+
id,
|
|
36
|
+
data,
|
|
38
37
|
};
|
|
39
38
|
this.rbush.insert(record);
|
|
40
39
|
this.rectangles.set(id, record);
|
|
41
40
|
this.pTotalHeight = Math.max(this.pTotalHeight, currHeight);
|
|
42
41
|
return currHeight;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
configurable: true
|
|
50
|
-
});
|
|
51
|
-
return Layout;
|
|
52
|
-
}());
|
|
53
|
-
export default Layout;
|
|
42
|
+
}
|
|
43
|
+
get totalHeight() {
|
|
44
|
+
return this.pTotalHeight;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,CAAC,OAAO,OAAO,MAAM;IAqBzB,YAAY,EACV,SAAS,GAAG,KAAK,MAGf,EAAE;QACJ,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAA;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,EAAE,CAAA;QAC3B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACrC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAA,CAAC,uDAAuD;IAC/E,CAAC;IAED;;;OAGG;IACH,OAAO,CACL,EAAU,EACV,IAAY,EACZ,KAAa,EACb,MAAc,EACd,IAAa;QAEb,eAAe;QACf,MAAM,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC9C,IAAI,cAAc,EAAE;YAClB,OAAO,cAAc,CAAC,IAAI,CAAA;SAC3B;QAED,IAAI,UAAU,GAAG,CAAC,CAAA;QAClB,OACE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;YAClB,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,UAAU,GAAG,MAAM;SAC1B,CAAC;YACF,UAAU,IAAI,IAAI,CAAC,SAAS,EAC5B;YACA,UAAU,IAAI,CAAC,CAAA;SAChB;QAED,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,UAAU,GAAG,MAAM;YACzB,EAAE;YACF,IAAI;SACL,CAAA;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACzB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAC/B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;QAC3D,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;CACF"}
|
package/dist/model.d.ts
CHANGED
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
import { Instance, SnapshotIn } from 'mobx-state-tree';
|
|
3
3
|
import { HierarchyNode } from 'd3-hierarchy';
|
|
4
4
|
import { FileLocation as FileLocationType } from '@jbrowse/core/util/types';
|
|
5
|
+
export interface RowDetails {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
name: string;
|
|
8
|
+
range?: {
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
import { NodeWithIds, NodeWithIdsAndLength } from './util';
|
|
5
14
|
import ClustalMSA from './parsers/ClustalMSA';
|
|
6
15
|
import StockholmMSA from './parsers/StockholmMSA';
|
|
7
16
|
import FastaMSA from './parsers/FastaMSA';
|
|
17
|
+
import { StructureModel } from './StructureModel';
|
|
8
18
|
interface BasicTrackModel {
|
|
9
19
|
id: string;
|
|
10
20
|
name: string;
|
|
@@ -23,27 +33,19 @@ export interface BoxTrackModel extends BasicTrackModel {
|
|
|
23
33
|
end: number;
|
|
24
34
|
}[];
|
|
25
35
|
}
|
|
26
|
-
export interface
|
|
36
|
+
export interface ITextTrack {
|
|
27
37
|
ReactComponent: React.FC<any>;
|
|
28
38
|
model: TextTrackModel;
|
|
29
39
|
}
|
|
30
|
-
export interface
|
|
40
|
+
export interface IBoxTrack {
|
|
31
41
|
ReactComponent: React.FC<any>;
|
|
32
42
|
model: BoxTrackModel;
|
|
33
43
|
}
|
|
34
|
-
|
|
35
|
-
declare const StructureModel: import("mobx-state-tree").IModelType<{
|
|
36
|
-
id: import("mobx-state-tree").ISimpleType<string>;
|
|
37
|
-
structure: import("mobx-state-tree").IModelType<{
|
|
38
|
-
pdb: import("mobx-state-tree").ISimpleType<string>;
|
|
39
|
-
startPos: import("mobx-state-tree").ISimpleType<number>;
|
|
40
|
-
endPos: import("mobx-state-tree").ISimpleType<number>;
|
|
41
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
42
|
-
range: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
43
|
-
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
44
|
+
type BasicTrack = IBoxTrack | ITextTrack;
|
|
44
45
|
declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-state-tree").IModelType<{
|
|
45
46
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
46
47
|
displayName: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
48
|
+
minimized: import("mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
47
49
|
} & {
|
|
48
50
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
49
51
|
type: import("mobx-state-tree").ISimpleType<"MsaView">;
|
|
@@ -83,13 +85,13 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
83
85
|
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
84
86
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
85
87
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
86
|
-
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
87
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
88
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
89
88
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
90
89
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
91
90
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
92
91
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
92
|
+
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
93
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
94
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
93
95
|
}>>, {
|
|
94
96
|
locationType: "UriLocation";
|
|
95
97
|
uri: string;
|
|
@@ -99,12 +101,12 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
99
101
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
100
102
|
}> | undefined;
|
|
101
103
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
102
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
103
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
104
|
-
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
105
104
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
106
105
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
107
106
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
107
|
+
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
108
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
109
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
108
110
|
}>, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
109
111
|
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
110
112
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -114,14 +116,14 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
114
116
|
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
115
117
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
116
118
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
117
|
-
}>> | import("mobx-state-tree").
|
|
118
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
119
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
120
|
-
}> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
119
|
+
}>> | import("mobx-state-tree").ModelInstanceType<{
|
|
121
120
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
122
121
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
123
122
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
124
|
-
}
|
|
123
|
+
}, {}> | import("mobx-state-tree").ModelInstanceType<{
|
|
124
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
125
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
126
|
+
}, {}>>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
125
127
|
msaFilehandle: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISnapshotProcessor<import("mobx-state-tree").ITypeUnion<import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
126
128
|
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
127
129
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -131,13 +133,13 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
131
133
|
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
132
134
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
133
135
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
134
|
-
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
135
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
136
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
137
136
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
138
137
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
139
138
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
140
139
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
140
|
+
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
141
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
142
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
141
143
|
}>>, {
|
|
142
144
|
locationType: "UriLocation";
|
|
143
145
|
uri: string;
|
|
@@ -147,12 +149,12 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
147
149
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
148
150
|
}> | undefined;
|
|
149
151
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
150
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
151
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
152
|
-
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
153
152
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
154
153
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
155
154
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
155
|
+
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
156
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
157
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
156
158
|
}>, import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
157
159
|
locationType: import("mobx-state-tree").ISimpleType<"UriLocation">;
|
|
158
160
|
uri: import("mobx-state-tree").ISimpleType<string>;
|
|
@@ -162,14 +164,14 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
162
164
|
internetAccountType: import("mobx-state-tree").ISimpleType<string>;
|
|
163
165
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
164
166
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
165
|
-
}>> | import("mobx-state-tree").
|
|
166
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
167
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
168
|
-
}> | import("mobx-state-tree").ModelInstanceTypeProps<{
|
|
167
|
+
}>> | import("mobx-state-tree").ModelInstanceType<{
|
|
169
168
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
170
169
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
171
170
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
172
|
-
}
|
|
171
|
+
}, {}> | import("mobx-state-tree").ModelInstanceType<{
|
|
172
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
173
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
174
|
+
}, {}>>, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
173
175
|
currentAlignment: import("mobx-state-tree").IType<number | undefined, number, number>;
|
|
174
176
|
collapsed: import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>;
|
|
175
177
|
showOnly: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
@@ -180,10 +182,10 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
180
182
|
associatedRowName: import("mobx-state-tree").ISimpleType<string>;
|
|
181
183
|
height: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
|
|
182
184
|
}, {
|
|
183
|
-
error:
|
|
184
|
-
data:
|
|
185
|
+
error: unknown;
|
|
186
|
+
data: string | undefined;
|
|
185
187
|
} & {
|
|
186
|
-
setError(error:
|
|
188
|
+
setError(error: unknown): void;
|
|
187
189
|
setData(data: string): void;
|
|
188
190
|
} & {
|
|
189
191
|
afterCreate(): void;
|
|
@@ -210,8 +212,8 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
210
212
|
tree: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
211
213
|
msa: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
212
214
|
}, {
|
|
213
|
-
setTree(tree?: string
|
|
214
|
-
setMSA(msa?: string
|
|
215
|
+
setTree(tree?: string): void;
|
|
216
|
+
setMSA(msa?: string): void;
|
|
215
217
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
216
218
|
}, {
|
|
217
219
|
width: number;
|
|
@@ -220,8 +222,9 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
220
222
|
} & {
|
|
221
223
|
setDisplayName(name: string): void;
|
|
222
224
|
setWidth(newWidth: number): void;
|
|
225
|
+
setMinimized(flag: boolean): void;
|
|
223
226
|
} & {
|
|
224
|
-
error:
|
|
227
|
+
error: unknown;
|
|
225
228
|
margin: {
|
|
226
229
|
left: number;
|
|
227
230
|
top: number;
|
|
@@ -246,8 +249,8 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
246
249
|
};
|
|
247
250
|
}): void;
|
|
248
251
|
clearSelectedStructures(): void;
|
|
249
|
-
setError(error?:
|
|
250
|
-
setMousePos(col?: number
|
|
252
|
+
setError(error?: unknown): void;
|
|
253
|
+
setMousePos(col?: number, row?: number): void;
|
|
251
254
|
setRowHeight(n: number): void;
|
|
252
255
|
setColWidth(n: number): void;
|
|
253
256
|
setColorSchemeName(name: string): void;
|
|
@@ -259,7 +262,7 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
259
262
|
toggleLabelsAlignRight(): void;
|
|
260
263
|
toggleDrawTree(): void;
|
|
261
264
|
toggleCollapsed(node: string): void;
|
|
262
|
-
setShowOnly(node
|
|
265
|
+
setShowOnly(node?: string): void;
|
|
263
266
|
toggleBranchLen(): void;
|
|
264
267
|
toggleBgColor(): void;
|
|
265
268
|
toggleNodeBubbles(): void;
|
|
@@ -267,8 +270,8 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
267
270
|
msa?: string;
|
|
268
271
|
tree?: string;
|
|
269
272
|
}): void;
|
|
270
|
-
setMSAFilehandle(msaFilehandle?: FileLocationType
|
|
271
|
-
setTreeFilehandle(treeFilehandle?: FileLocationType
|
|
273
|
+
setMSAFilehandle(msaFilehandle?: FileLocationType): Promise<void>;
|
|
274
|
+
setTreeFilehandle(treeFilehandle?: FileLocationType): Promise<void>;
|
|
272
275
|
setMSA(result: string): void;
|
|
273
276
|
setTree(result: string): void;
|
|
274
277
|
afterCreate(): void;
|
|
@@ -282,19 +285,29 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
282
285
|
readonly colorScheme: {
|
|
283
286
|
[key: string]: string;
|
|
284
287
|
};
|
|
285
|
-
readonly
|
|
286
|
-
|
|
288
|
+
readonly header: {};
|
|
289
|
+
getRowData(name: string): {
|
|
290
|
+
range?: {
|
|
291
|
+
start: number;
|
|
292
|
+
end: number;
|
|
293
|
+
} | undefined;
|
|
294
|
+
data: {
|
|
295
|
+
name: string;
|
|
296
|
+
accession: string;
|
|
297
|
+
dbxref: string;
|
|
298
|
+
} | Record<string, unknown>;
|
|
299
|
+
};
|
|
287
300
|
readonly currentAlignmentName: string;
|
|
288
301
|
readonly alignmentNames: string[];
|
|
289
302
|
readonly noTree: boolean;
|
|
290
303
|
readonly menuItems: never[];
|
|
291
|
-
readonly MSA:
|
|
304
|
+
readonly MSA: StockholmMSA | FastaMSA | ClustalMSA | null;
|
|
292
305
|
readonly numColumns: number;
|
|
293
|
-
readonly tree:
|
|
306
|
+
readonly tree: NodeWithIds;
|
|
294
307
|
readonly rowNames: string[];
|
|
295
308
|
readonly mouseOverRowName: string | undefined;
|
|
296
309
|
getMouseOverResidue(rowName: string): string;
|
|
297
|
-
readonly root: HierarchyNode<
|
|
310
|
+
readonly root: HierarchyNode<NodeWithIds>;
|
|
298
311
|
readonly structures: {
|
|
299
312
|
[key: string]: {
|
|
300
313
|
pdb: string;
|
|
@@ -302,16 +315,22 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
302
315
|
endPos: number;
|
|
303
316
|
}[];
|
|
304
317
|
};
|
|
305
|
-
readonly inverseStructures:
|
|
318
|
+
readonly inverseStructures: {
|
|
319
|
+
[k: string]: {
|
|
320
|
+
id: string;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
306
323
|
readonly msaAreaWidth: number;
|
|
307
324
|
readonly blanks: number[];
|
|
308
|
-
readonly rows: string[][];
|
|
309
|
-
readonly columns:
|
|
325
|
+
readonly rows: [string, string[]][];
|
|
326
|
+
readonly columns: {
|
|
327
|
+
[k: string]: string;
|
|
328
|
+
};
|
|
310
329
|
readonly columns2d: string[];
|
|
311
330
|
readonly colStats: {
|
|
312
331
|
[key: string]: number;
|
|
313
332
|
}[];
|
|
314
|
-
readonly hierarchy: HierarchyNode<
|
|
333
|
+
readonly hierarchy: HierarchyNode<NodeWithIdsAndLength>;
|
|
315
334
|
readonly totalHeight: number;
|
|
316
335
|
} & {
|
|
317
336
|
addUniprotTrack(node: {
|
|
@@ -341,16 +360,26 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
341
360
|
clearAnnotPos(): void;
|
|
342
361
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, import("mobx-state-tree")._NotCustomized, {
|
|
343
362
|
id: string;
|
|
344
|
-
displayName: string | undefined;
|
|
345
363
|
type: "MsaView";
|
|
346
364
|
height: number;
|
|
347
|
-
|
|
348
|
-
|
|
365
|
+
displayName: string | undefined;
|
|
366
|
+
minimized: boolean;
|
|
349
367
|
rowHeight: number;
|
|
350
368
|
scrollY: number;
|
|
351
369
|
scrollX: number;
|
|
352
370
|
resizeHandleWidth: number;
|
|
353
371
|
blockSize: number;
|
|
372
|
+
labelsAlignRight: boolean;
|
|
373
|
+
colWidth: number;
|
|
374
|
+
showBranchLen: boolean;
|
|
375
|
+
bgColor: boolean;
|
|
376
|
+
drawTree: boolean;
|
|
377
|
+
drawNodeBubbles: boolean;
|
|
378
|
+
highResScaleFactor: number;
|
|
379
|
+
colorSchemeName: string;
|
|
380
|
+
currentAlignment: number;
|
|
381
|
+
treeAreaWidth: number;
|
|
382
|
+
treeWidth: number;
|
|
354
383
|
mouseRow: number | undefined;
|
|
355
384
|
mouseCol: number | undefined;
|
|
356
385
|
selectedStructures: import("mobx-state-tree").ModelSnapshotType<{
|
|
@@ -362,14 +391,6 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
362
391
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
363
392
|
range: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ISimpleType<string>>;
|
|
364
393
|
}>[];
|
|
365
|
-
labelsAlignRight: boolean;
|
|
366
|
-
colWidth: number;
|
|
367
|
-
showBranchLen: boolean;
|
|
368
|
-
bgColor: boolean;
|
|
369
|
-
drawTree: boolean;
|
|
370
|
-
drawNodeBubbles: boolean;
|
|
371
|
-
highResScaleFactor: number;
|
|
372
|
-
colorSchemeName: string;
|
|
373
394
|
treeFilehandle: {
|
|
374
395
|
locationType: "UriLocation";
|
|
375
396
|
uri: string;
|
|
@@ -379,12 +400,12 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
379
400
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
380
401
|
}> | undefined;
|
|
381
402
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
382
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
383
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
384
|
-
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
385
403
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
386
404
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
387
405
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
406
|
+
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
407
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
408
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
388
409
|
}> | undefined;
|
|
389
410
|
msaFilehandle: {
|
|
390
411
|
locationType: "UriLocation";
|
|
@@ -395,14 +416,13 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
395
416
|
authInfo: import("mobx-state-tree").IType<any, any, any>;
|
|
396
417
|
}> | undefined;
|
|
397
418
|
} | import("mobx-state-tree").ModelSnapshotType<{
|
|
398
|
-
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
399
|
-
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
400
|
-
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
401
419
|
locationType: import("mobx-state-tree").ISimpleType<"BlobLocation">;
|
|
402
420
|
name: import("mobx-state-tree").ISimpleType<string>;
|
|
403
421
|
blobId: import("mobx-state-tree").ISimpleType<string>;
|
|
422
|
+
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
423
|
+
locationType: import("mobx-state-tree").ISimpleType<"LocalPathLocation">;
|
|
424
|
+
localPath: import("mobx-state-tree").ISimpleType<string>;
|
|
404
425
|
}> | undefined;
|
|
405
|
-
currentAlignment: number;
|
|
406
426
|
collapsed: string[];
|
|
407
427
|
showOnly: string | undefined;
|
|
408
428
|
boxTracks: import("mobx-state-tree").ModelSnapshotType<{
|
|
@@ -424,5 +444,5 @@ declare const model: import("mobx-state-tree").ISnapshotProcessor<import("mobx-s
|
|
|
424
444
|
};
|
|
425
445
|
}>;
|
|
426
446
|
export default model;
|
|
427
|
-
export
|
|
428
|
-
export
|
|
447
|
+
export type MsaViewStateModel = typeof model;
|
|
448
|
+
export type MsaViewModel = Instance<MsaViewStateModel>;
|