react-msaview 4.4.6 → 4.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 +9 -9
- package/bundle/index.js.LICENSE.txt +8 -8
- package/bundle/index.js.map +1 -1
- package/dist/colorSchemes.d.ts +0 -6
- package/dist/colorSchemes.js +1 -119
- package/dist/colorSchemes.js.map +1 -1
- package/dist/components/ConservationTrack.d.ts +8 -0
- package/dist/components/ConservationTrack.js +54 -0
- package/dist/components/ConservationTrack.js.map +1 -0
- package/dist/components/Loading.js +14 -2
- package/dist/components/Loading.js.map +1 -1
- package/dist/components/MSAView.js +36 -0
- package/dist/components/MSAView.js.map +1 -1
- package/dist/components/SequenceTextArea.js +3 -2
- package/dist/components/SequenceTextArea.js.map +1 -1
- package/dist/components/TextTrack.d.ts +3 -3
- package/dist/components/TextTrack.js +4 -1
- package/dist/components/TextTrack.js.map +1 -1
- package/dist/components/Track.js +21 -8
- package/dist/components/Track.js.map +1 -1
- package/dist/components/dialogs/ExportSVGDialog.js +19 -3
- package/dist/components/dialogs/ExportSVGDialog.js.map +1 -1
- package/dist/components/header/GappynessSlider.d.ts +6 -0
- package/dist/components/header/GappynessSlider.js +19 -0
- package/dist/components/header/GappynessSlider.js.map +1 -0
- package/dist/components/header/Header.js +3 -1
- package/dist/components/header/Header.js.map +1 -1
- package/dist/components/header/HeaderMenu.js +30 -14
- package/dist/components/header/HeaderMenu.js.map +1 -1
- package/dist/components/minimap/MinimapSVG.js +4 -3
- package/dist/components/minimap/MinimapSVG.js.map +1 -1
- package/dist/components/msa/MSACanvasBlock.js +56 -42
- package/dist/components/msa/MSACanvasBlock.js.map +1 -1
- package/dist/components/msa/renderMSABlock.js +71 -26
- package/dist/components/msa/renderMSABlock.js.map +1 -1
- package/dist/components/msa/renderMSAMouseover.js +8 -1
- package/dist/components/msa/renderMSAMouseover.js.map +1 -1
- package/dist/components/tracks/renderTracksSvg.d.ts +29 -0
- package/dist/components/tracks/renderTracksSvg.js +83 -0
- package/dist/components/tracks/renderTracksSvg.js.map +1 -0
- package/dist/components/tree/TreeNodeMenu.js +2 -2
- package/dist/components/tree/TreeNodeMenu.js.map +1 -1
- package/dist/components/tree/renderTreeCanvas.d.ts +0 -1
- package/dist/components/tree/renderTreeCanvas.js +23 -24
- package/dist/components/tree/renderTreeCanvas.js.map +1 -1
- package/dist/constants.d.ts +22 -0
- package/dist/constants.js +26 -0
- package/dist/constants.js.map +1 -0
- package/dist/layout.js.map +1 -1
- package/dist/model/msaModel.js +3 -2
- package/dist/model/msaModel.js.map +1 -1
- package/dist/model/treeModel.js +9 -8
- package/dist/model/treeModel.js.map +1 -1
- package/dist/model.d.ts +271 -15
- package/dist/model.js +427 -128
- package/dist/model.js.map +1 -1
- package/dist/neighborJoining.d.ts +1 -0
- package/dist/neighborJoining.js +839 -0
- package/dist/neighborJoining.js.map +1 -0
- package/dist/neighborJoining.test.d.ts +1 -0
- package/dist/neighborJoining.test.js +110 -0
- package/dist/neighborJoining.test.js.map +1 -0
- package/dist/parsers/A3mMSA.d.ts +43 -0
- package/dist/parsers/A3mMSA.js +277 -0
- package/dist/parsers/A3mMSA.js.map +1 -0
- package/dist/parsers/A3mMSA.test.d.ts +1 -0
- package/dist/parsers/A3mMSA.test.js +138 -0
- package/dist/parsers/A3mMSA.test.js.map +1 -0
- package/dist/parsers/ClustalMSA.d.ts +4 -4
- package/dist/parsers/ClustalMSA.js +3 -1
- package/dist/parsers/ClustalMSA.js.map +1 -1
- package/dist/parsers/FastaMSA.js +17 -16
- package/dist/parsers/FastaMSA.js.map +1 -1
- package/dist/renderToSvg.d.ts +1 -0
- package/dist/renderToSvg.js +48 -18
- package/dist/renderToSvg.js.map +1 -1
- package/dist/rowCoordinateCalculations.js +2 -0
- package/dist/rowCoordinateCalculations.js.map +1 -1
- package/dist/types.d.ts +2 -3
- package/dist/util.js +17 -9
- package/dist/util.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -6
- package/src/colorSchemes.ts +1 -179
- package/src/components/ConservationTrack.tsx +104 -0
- package/src/components/Loading.tsx +44 -2
- package/src/components/MSAView.tsx +68 -0
- package/src/components/SequenceTextArea.tsx +3 -2
- package/src/components/TextTrack.tsx +7 -4
- package/src/components/Track.tsx +25 -9
- package/src/components/dialogs/ExportSVGDialog.tsx +25 -1
- package/src/components/header/GappynessSlider.tsx +35 -0
- package/src/components/header/Header.tsx +3 -1
- package/src/components/header/HeaderMenu.tsx +36 -15
- package/src/components/minimap/MinimapSVG.tsx +6 -3
- package/src/components/msa/MSACanvasBlock.tsx +66 -48
- package/src/components/msa/renderMSABlock.ts +103 -40
- package/src/components/msa/renderMSAMouseover.ts +9 -0
- package/src/components/tracks/renderTracksSvg.ts +157 -0
- package/src/components/tree/TreeNodeMenu.tsx +2 -2
- package/src/components/tree/renderTreeCanvas.ts +25 -34
- package/src/constants.ts +27 -0
- package/src/layout.ts +1 -6
- package/src/model/msaModel.ts +4 -2
- package/src/model/treeModel.ts +19 -8
- package/src/model.ts +517 -140
- package/src/neighborJoining.test.ts +129 -0
- package/src/neighborJoining.ts +885 -0
- package/src/parsers/A3mMSA.test.ts +164 -0
- package/src/parsers/A3mMSA.ts +321 -0
- package/src/parsers/ClustalMSA.ts +7 -5
- package/src/parsers/FastaMSA.ts +17 -17
- package/src/renderToSvg.tsx +105 -26
- package/src/rowCoordinateCalculations.ts +2 -0
- package/src/types.ts +2 -4
- package/src/util.ts +21 -8
- package/src/version.ts +1 -1
- package/dist/components/dialogs/TracklistDialog.d.ts +0 -7
- package/dist/components/dialogs/TracklistDialog.js +0 -23
- package/dist/components/dialogs/TracklistDialog.js.map +0 -1
- package/src/components/dialogs/TracklistDialog.tsx +0 -73
package/src/constants.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Main model defaults
|
|
2
|
+
export const defaultRowHeight = 16
|
|
3
|
+
export const defaultColWidth = 12
|
|
4
|
+
export const defaultHeight = 550
|
|
5
|
+
export const defaultScrollX = 0
|
|
6
|
+
export const defaultScrollY = 0
|
|
7
|
+
export const defaultCurrentAlignment = 0
|
|
8
|
+
export const defaultShowDomains = false
|
|
9
|
+
export const defaultHideGaps = true
|
|
10
|
+
export const defaultAllowedGappyness = 100
|
|
11
|
+
export const defaultContrastLettering = true
|
|
12
|
+
export const defaultSubFeatureRows = false
|
|
13
|
+
export const defaultDrawMsaLetters = true
|
|
14
|
+
|
|
15
|
+
// MSA model defaults
|
|
16
|
+
export const defaultBgColor = true
|
|
17
|
+
export const defaultColorSchemeName = 'maeditor'
|
|
18
|
+
|
|
19
|
+
// Tree model defaults
|
|
20
|
+
export const defaultDrawLabels = true
|
|
21
|
+
export const defaultLabelsAlignRight = false
|
|
22
|
+
export const defaultTreeAreaWidth = 400
|
|
23
|
+
export const defaultTreeWidth = 300
|
|
24
|
+
export const defaultTreeWidthMatchesArea = true
|
|
25
|
+
export const defaultShowBranchLen = true
|
|
26
|
+
export const defaultDrawTree = true
|
|
27
|
+
export const defaultDrawNodeBubbles = true
|
package/src/layout.ts
CHANGED
|
@@ -63,12 +63,7 @@ export default class Layout {
|
|
|
63
63
|
return false
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
const results = this.flatbush.search(
|
|
67
|
-
box.minX,
|
|
68
|
-
box.minY,
|
|
69
|
-
box.maxX,
|
|
70
|
-
box.maxY,
|
|
71
|
-
)
|
|
66
|
+
const results = this.flatbush.search(box.minX, box.minY, box.maxX, box.maxY)
|
|
72
67
|
|
|
73
68
|
return results.length > 0
|
|
74
69
|
}
|
package/src/model/msaModel.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { types } from 'mobx-state-tree'
|
|
2
2
|
|
|
3
|
+
import { defaultBgColor, defaultColorSchemeName } from '../constants'
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* #stateModel MSAModel
|
|
5
7
|
*/
|
|
@@ -12,13 +14,13 @@ export function MSAModelF() {
|
|
|
12
14
|
* #property
|
|
13
15
|
* draw MSA tiles with a background color
|
|
14
16
|
*/
|
|
15
|
-
bgColor:
|
|
17
|
+
bgColor: defaultBgColor,
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* #property
|
|
19
21
|
* default color scheme name
|
|
20
22
|
*/
|
|
21
|
-
colorSchemeName:
|
|
23
|
+
colorSchemeName: defaultColorSchemeName,
|
|
22
24
|
})
|
|
23
25
|
.actions(self => ({
|
|
24
26
|
/**
|
package/src/model/treeModel.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { types } from 'mobx-state-tree'
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
defaultDrawLabels,
|
|
5
|
+
defaultDrawNodeBubbles,
|
|
6
|
+
defaultDrawTree,
|
|
7
|
+
defaultLabelsAlignRight,
|
|
8
|
+
defaultShowBranchLen,
|
|
9
|
+
defaultTreeAreaWidth,
|
|
10
|
+
defaultTreeWidth,
|
|
11
|
+
defaultTreeWidthMatchesArea,
|
|
12
|
+
} from '../constants'
|
|
13
|
+
|
|
3
14
|
/**
|
|
4
15
|
* #stateModel Tree
|
|
5
16
|
*/
|
|
@@ -11,30 +22,30 @@ export function TreeModelF() {
|
|
|
11
22
|
/**
|
|
12
23
|
* #property
|
|
13
24
|
*/
|
|
14
|
-
drawLabels:
|
|
25
|
+
drawLabels: defaultDrawLabels,
|
|
15
26
|
/**
|
|
16
27
|
* #property
|
|
17
28
|
* right-align the labels
|
|
18
29
|
*/
|
|
19
|
-
labelsAlignRight:
|
|
30
|
+
labelsAlignRight: defaultLabelsAlignRight,
|
|
20
31
|
|
|
21
32
|
/**
|
|
22
33
|
* #property
|
|
23
34
|
* width of the area the tree is drawn in, px
|
|
24
35
|
*/
|
|
25
|
-
treeAreaWidth: types.optional(types.number,
|
|
36
|
+
treeAreaWidth: types.optional(types.number, defaultTreeAreaWidth),
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* #property
|
|
29
40
|
* width of the tree within the treeArea, px
|
|
30
41
|
*/
|
|
31
|
-
treeWidth: types.optional(types.number,
|
|
42
|
+
treeWidth: types.optional(types.number, defaultTreeWidth),
|
|
32
43
|
|
|
33
44
|
/**
|
|
34
45
|
* #getter
|
|
35
46
|
* synchronization that matches treeWidth to treeAreaWidth
|
|
36
47
|
*/
|
|
37
|
-
treeWidthMatchesArea:
|
|
48
|
+
treeWidthMatchesArea: defaultTreeWidthMatchesArea,
|
|
38
49
|
|
|
39
50
|
/**
|
|
40
51
|
* #property
|
|
@@ -42,19 +53,19 @@ export function TreeModelF() {
|
|
|
42
53
|
* lengths. if false, the layout is a "cladogram" that does not take into
|
|
43
54
|
* account evolutionary distances
|
|
44
55
|
*/
|
|
45
|
-
showBranchLen:
|
|
56
|
+
showBranchLen: defaultShowBranchLen,
|
|
46
57
|
|
|
47
58
|
/**
|
|
48
59
|
* #property
|
|
49
60
|
* draw tree, boolean
|
|
50
61
|
*/
|
|
51
|
-
drawTree:
|
|
62
|
+
drawTree: defaultDrawTree,
|
|
52
63
|
|
|
53
64
|
/**
|
|
54
65
|
* #property
|
|
55
66
|
* draw clickable node bubbles on the tree
|
|
56
67
|
*/
|
|
57
|
-
drawNodeBubbles:
|
|
68
|
+
drawNodeBubbles: defaultDrawNodeBubbles,
|
|
58
69
|
})
|
|
59
70
|
.actions(self => ({
|
|
60
71
|
/**
|