forked from TeselaGen/openVectorEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editorStateExample.js
179 lines (179 loc) · 12.4 KB
/
editorStateExample.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
const exampleEditorState = {
sequenceData: {
sequence:
"gagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggggagtagagcactacgactgcatcgactacgactacgactacgactacggcgcgcgcggcggggggggattatatttttttatcattcctcccccccctcttctttatatatataggagggaggggaaatatatattcttcgatcgatatatatagagagggcccctataaatatttttaaaggg",
circular: true,
sequenceFileName: "pj5_00001.gb",
name: "pj5_00001",
size: 8832,
description: "",
translations: {
"55a4a061f0c5b500012a8qqqq": {
name: "Operator I2 and I1",
type: "protein_bind",
id: "55a4a061f0c5b500012a8qqqq",
start: 1123,
end: 1162,
strand: 1,
notes: [],
forward: true,
annotationType: "translation"
},
"55a4a061f0c5b500312340a8qqqq": {
name: "pBAD promoter",
type: "promoter",
id: "55a4a061f0c5b500312340a8qqqq",
start: 1163,
end: 1188,
strand: 1,
notes: [],
forward: true,
annotationType: "translation"
}
},
features: {
"55a4a061f0c5b50asd00a8bfaf5": {
name: "Operator I2 and I1",
type: "protein_bind",
id: "55a4a061f0c5b50asd00a8bfaf5",
start: 4,
end: 20,
locations: [{start: 4, end: 6}, {start: 15, end: 20}],
strand: 1,
notes: [],
color: "#BBBBBB",
forward: true,
annotationType: "feature"
},
"55a4a061f0c5b5000a8bfaf8": {
name: "GFPuv",
type: "CDS",
id: "55a4a061f0c5b5000a8bfaf8",
start: 1235,
end: 2018,
strand: 1,
notes: [
{
name: "vntifkey",
value: "4",
quoted: true
}
],
color: "#BBBBBB",
forward: true,
annotationType: "feature"
},
},
parts: {},
primers: {},
fromFileUpload: false
},
annotationLabelVisibility: {
features: true,
parts: true,
cutsites: true
},
annotationVisibility: {
features: true,
translations: true,
parts: true,
orfs: false,
orfTranslations: false,
cdsFeatureTranslations: true,
axis: true,
cutsites: true,
reverseSequence: true
},
annotationsToSupport: {
features: true,
translations: true,
parts: true,
orfs: true,
cutsites: true,
primers: true,
},
panelsShown: [
[
{
id: "sequence",
name: "Sequence Map",
active: true
}
],
[
{
id: "circular",
name: "Circular",
active: true
},
{
id: "rail",
name: "Linear",
active: false
},
{
id: "properties",
name: "Properties",
active: false
}
]
],
restrictionEnzymes: {
filteredRestrictionEnzymes: [
{
value: "single",
label: "Single cutters",
cutsThisManyTimes: 1
}
],
// allRestrictionEnzymes: {
// aatii: {
// name: "AatII",
// site: "gacgtc",
// forwardRegex: "gacgtc",
// reverseRegex: "gacgtc",
// topSnipOffset: 5,
// bottomSnipOffset: 1,
// usForward: 0,
// usReverse: 0,
// color: "#059369"
// },
// acci: {
// name: "AccI",
// site: "gtmkac",
// forwardRegex: "gt[acm][gkt]ac",
// reverseRegex: "gt[acm][gkt]ac",
// topSnipOffset: 2,
// bottomSnipOffset: 4,
// usForward: 0,
// usReverse: 0,
// color: "#0d994a"
// },
// // ...etc
// }
},
selectedAnnotations: {
idMap: {},
idStack: []
},
minimumOrfSize: 300,
updateFeatureLengthsToHide:{enabled: true,min: 0,max:800},
hoveredAnnotation: "",
caretPosition: -1,
selectionLayer: {
start: -1,
end: -1
},
readOnly: false,
findTool: {
isOpen: false,
searchText: "",
dnaOrAA: "DNA", //or "AA"
ambiguousOrLiteral: "LITERAL", //or "AMBIGUOUS"
highlightAll: false,
matchNumber: 0
},
deletionLayers: {},
replacementLayers: {},
instantiated: true
};