@apollo-annotation/mst 0.1.19 → 0.1.21
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/dist/AnnotationFeatureModel.d.ts +93 -0
- package/dist/AnnotationFeatureModel.js +236 -0
- package/dist/AnnotationFeatureModel.js.map +1 -0
- package/dist/ApolloAssembly.d.ts +404 -0
- package/dist/ApolloAssembly.js +30 -0
- package/dist/ApolloAssembly.js.map +1 -0
- package/dist/ApolloRefSeq.d.ts +71 -0
- package/dist/ApolloRefSeq.js +87 -0
- package/dist/ApolloRefSeq.js.map +1 -0
- package/dist/CheckResult.d.ts +57 -0
- package/dist/CheckResult.js +16 -0
- package/dist/CheckResult.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { Instance, SnapshotIn } from 'mobx-state-tree';
|
|
2
|
+
export type BackendDriverType = 'CollaborationServerDriver' | 'InMemoryFileDriver' | 'DesktopFileDriver';
|
|
3
|
+
export declare const ApolloAssembly: import("mobx-state-tree").IModelType<{
|
|
4
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
5
|
+
refSeqs: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
6
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
8
|
+
description: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
9
|
+
features: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
10
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
11
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
12
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
13
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
14
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
15
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
16
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
17
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
18
|
+
}, {
|
|
19
|
+
readonly length: number;
|
|
20
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
21
|
+
readonly minWithChildren: number;
|
|
22
|
+
readonly maxWithChildren: number;
|
|
23
|
+
hasDescendant(featureId: string): boolean;
|
|
24
|
+
readonly cdsLocations: {
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
phase: 0 | 1 | 2;
|
|
28
|
+
}[][];
|
|
29
|
+
} & {
|
|
30
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
31
|
+
setAttribute(key: string, value: string[]): void;
|
|
32
|
+
setType(type: string): void;
|
|
33
|
+
setRefSeq(refSeq: string): void;
|
|
34
|
+
setMin(min: number): void;
|
|
35
|
+
setMax(max: number): void;
|
|
36
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
37
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
38
|
+
deleteChild(childFeatureId: string): void;
|
|
39
|
+
} & {
|
|
40
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
41
|
+
refSeq: string;
|
|
42
|
+
min: number;
|
|
43
|
+
max: number;
|
|
44
|
+
strand?: 1 | -1;
|
|
45
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
46
|
+
}): void;
|
|
47
|
+
} & {
|
|
48
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
49
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
50
|
+
readonly assemblyId: string;
|
|
51
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
52
|
+
sequence: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
53
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
54
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
55
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
56
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
57
|
+
}, {
|
|
58
|
+
addFeature(feature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
59
|
+
deleteFeature(featureId: string): boolean;
|
|
60
|
+
setDescription(description: string): void;
|
|
61
|
+
addSequence(seq: import("mobx-state-tree").SnapshotOrInstance<typeof import("./ApolloRefSeq").Sequence>): void;
|
|
62
|
+
} & {
|
|
63
|
+
getSequence(start: number, stop: number): string;
|
|
64
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
65
|
+
comments: import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>;
|
|
66
|
+
backendDriverType: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
67
|
+
}, {
|
|
68
|
+
getByRefName(refName: string): ({
|
|
69
|
+
_id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
features: import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IModelType<{
|
|
73
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
74
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
75
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
76
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
77
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
78
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
79
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
80
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
81
|
+
}, {
|
|
82
|
+
readonly length: number;
|
|
83
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
84
|
+
readonly minWithChildren: number;
|
|
85
|
+
readonly maxWithChildren: number;
|
|
86
|
+
hasDescendant(featureId: string): boolean;
|
|
87
|
+
readonly cdsLocations: {
|
|
88
|
+
min: number;
|
|
89
|
+
max: number;
|
|
90
|
+
phase: 0 | 1 | 2;
|
|
91
|
+
}[][];
|
|
92
|
+
} & {
|
|
93
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
94
|
+
setAttribute(key: string, value: string[]): void;
|
|
95
|
+
setType(type: string): void;
|
|
96
|
+
setRefSeq(refSeq: string): void;
|
|
97
|
+
setMin(min: number): void;
|
|
98
|
+
setMax(max: number): void;
|
|
99
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
100
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
101
|
+
deleteChild(childFeatureId: string): void;
|
|
102
|
+
} & {
|
|
103
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
104
|
+
refSeq: string;
|
|
105
|
+
min: number;
|
|
106
|
+
max: number;
|
|
107
|
+
strand?: 1 | -1;
|
|
108
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
109
|
+
}): void;
|
|
110
|
+
} & {
|
|
111
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
112
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
113
|
+
readonly assemblyId: string;
|
|
114
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
115
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
116
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
117
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
118
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
119
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
120
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
121
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
122
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
123
|
+
}, {
|
|
124
|
+
readonly length: number;
|
|
125
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
126
|
+
readonly minWithChildren: number;
|
|
127
|
+
readonly maxWithChildren: number;
|
|
128
|
+
hasDescendant(featureId: string): boolean;
|
|
129
|
+
readonly cdsLocations: {
|
|
130
|
+
min: number;
|
|
131
|
+
max: number;
|
|
132
|
+
phase: 0 | 1 | 2;
|
|
133
|
+
}[][];
|
|
134
|
+
} & {
|
|
135
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
136
|
+
setAttribute(key: string, value: string[]): void;
|
|
137
|
+
setType(type: string): void;
|
|
138
|
+
setRefSeq(refSeq: string): void;
|
|
139
|
+
setMin(min: number): void;
|
|
140
|
+
setMax(max: number): void;
|
|
141
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
142
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
143
|
+
deleteChild(childFeatureId: string): void;
|
|
144
|
+
} & {
|
|
145
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
146
|
+
refSeq: string;
|
|
147
|
+
min: number;
|
|
148
|
+
max: number;
|
|
149
|
+
strand?: 1 | -1;
|
|
150
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
151
|
+
}): void;
|
|
152
|
+
} & {
|
|
153
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
154
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
155
|
+
readonly assemblyId: string;
|
|
156
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
157
|
+
sequence: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
158
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
159
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
160
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
161
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
162
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
163
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
164
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
165
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
166
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
167
|
+
addFeature(feature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
168
|
+
deleteFeature(featureId: string): boolean;
|
|
169
|
+
setDescription(description: string): void;
|
|
170
|
+
addSequence(seq: import("mobx-state-tree").SnapshotOrInstance<typeof import("./ApolloRefSeq").Sequence>): void;
|
|
171
|
+
} & {
|
|
172
|
+
getSequence(start: number, stop: number): string;
|
|
173
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
174
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
175
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
176
|
+
description: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
177
|
+
features: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
178
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
179
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
180
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
181
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
182
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
183
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
184
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
185
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
186
|
+
}, {
|
|
187
|
+
readonly length: number;
|
|
188
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
189
|
+
readonly minWithChildren: number;
|
|
190
|
+
readonly maxWithChildren: number;
|
|
191
|
+
hasDescendant(featureId: string): boolean;
|
|
192
|
+
readonly cdsLocations: {
|
|
193
|
+
min: number;
|
|
194
|
+
max: number;
|
|
195
|
+
phase: 0 | 1 | 2;
|
|
196
|
+
}[][];
|
|
197
|
+
} & {
|
|
198
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
199
|
+
setAttribute(key: string, value: string[]): void;
|
|
200
|
+
setType(type: string): void;
|
|
201
|
+
setRefSeq(refSeq: string): void;
|
|
202
|
+
setMin(min: number): void;
|
|
203
|
+
setMax(max: number): void;
|
|
204
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
205
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
206
|
+
deleteChild(childFeatureId: string): void;
|
|
207
|
+
} & {
|
|
208
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
209
|
+
refSeq: string;
|
|
210
|
+
min: number;
|
|
211
|
+
max: number;
|
|
212
|
+
strand?: 1 | -1;
|
|
213
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
214
|
+
}): void;
|
|
215
|
+
} & {
|
|
216
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
217
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
218
|
+
readonly assemblyId: string;
|
|
219
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
220
|
+
sequence: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
221
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
222
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
223
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
224
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
225
|
+
}, {
|
|
226
|
+
addFeature(feature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
227
|
+
deleteFeature(featureId: string): boolean;
|
|
228
|
+
setDescription(description: string): void;
|
|
229
|
+
addSequence(seq: import("mobx-state-tree").SnapshotOrInstance<typeof import("./ApolloRefSeq").Sequence>): void;
|
|
230
|
+
} & {
|
|
231
|
+
getSequence(start: number, stop: number): string;
|
|
232
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | undefined;
|
|
233
|
+
} & {
|
|
234
|
+
addRefSeq(id: string, name: string, description?: string): {
|
|
235
|
+
_id: string;
|
|
236
|
+
name: string;
|
|
237
|
+
description: string;
|
|
238
|
+
features: import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IModelType<{
|
|
239
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
240
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
241
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
242
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
243
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
244
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
245
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
246
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
247
|
+
}, {
|
|
248
|
+
readonly length: number;
|
|
249
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
250
|
+
readonly minWithChildren: number;
|
|
251
|
+
readonly maxWithChildren: number;
|
|
252
|
+
hasDescendant(featureId: string): boolean;
|
|
253
|
+
readonly cdsLocations: {
|
|
254
|
+
min: number;
|
|
255
|
+
max: number;
|
|
256
|
+
phase: 0 | 1 | 2;
|
|
257
|
+
}[][];
|
|
258
|
+
} & {
|
|
259
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
260
|
+
setAttribute(key: string, value: string[]): void;
|
|
261
|
+
setType(type: string): void;
|
|
262
|
+
setRefSeq(refSeq: string): void;
|
|
263
|
+
setMin(min: number): void;
|
|
264
|
+
setMax(max: number): void;
|
|
265
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
266
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
267
|
+
deleteChild(childFeatureId: string): void;
|
|
268
|
+
} & {
|
|
269
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
270
|
+
refSeq: string;
|
|
271
|
+
min: number;
|
|
272
|
+
max: number;
|
|
273
|
+
strand?: 1 | -1;
|
|
274
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
275
|
+
}): void;
|
|
276
|
+
} & {
|
|
277
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
278
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
279
|
+
readonly assemblyId: string;
|
|
280
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
281
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
282
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
283
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
284
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
285
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
286
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
287
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
288
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
289
|
+
}, {
|
|
290
|
+
readonly length: number;
|
|
291
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
292
|
+
readonly minWithChildren: number;
|
|
293
|
+
readonly maxWithChildren: number;
|
|
294
|
+
hasDescendant(featureId: string): boolean;
|
|
295
|
+
readonly cdsLocations: {
|
|
296
|
+
min: number;
|
|
297
|
+
max: number;
|
|
298
|
+
phase: 0 | 1 | 2;
|
|
299
|
+
}[][];
|
|
300
|
+
} & {
|
|
301
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
302
|
+
setAttribute(key: string, value: string[]): void;
|
|
303
|
+
setType(type: string): void;
|
|
304
|
+
setRefSeq(refSeq: string): void;
|
|
305
|
+
setMin(min: number): void;
|
|
306
|
+
setMax(max: number): void;
|
|
307
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
308
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
309
|
+
deleteChild(childFeatureId: string): void;
|
|
310
|
+
} & {
|
|
311
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
312
|
+
refSeq: string;
|
|
313
|
+
min: number;
|
|
314
|
+
max: number;
|
|
315
|
+
strand?: 1 | -1;
|
|
316
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
317
|
+
}): void;
|
|
318
|
+
} & {
|
|
319
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
320
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
321
|
+
readonly assemblyId: string;
|
|
322
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
323
|
+
sequence: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
324
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
325
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
326
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
327
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
328
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
329
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
330
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
331
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>>;
|
|
332
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
333
|
+
addFeature(feature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
334
|
+
deleteFeature(featureId: string): boolean;
|
|
335
|
+
setDescription(description: string): void;
|
|
336
|
+
addSequence(seq: import("mobx-state-tree").SnapshotOrInstance<typeof import("./ApolloRefSeq").Sequence>): void;
|
|
337
|
+
} & {
|
|
338
|
+
getSequence(start: number, stop: number): string;
|
|
339
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
340
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
341
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
342
|
+
description: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
343
|
+
features: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
344
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
345
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
346
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
347
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
348
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
349
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
350
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
351
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
352
|
+
}, {
|
|
353
|
+
readonly length: number;
|
|
354
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
355
|
+
readonly minWithChildren: number;
|
|
356
|
+
readonly maxWithChildren: number;
|
|
357
|
+
hasDescendant(featureId: string): boolean;
|
|
358
|
+
readonly cdsLocations: {
|
|
359
|
+
min: number;
|
|
360
|
+
max: number;
|
|
361
|
+
phase: 0 | 1 | 2;
|
|
362
|
+
}[][];
|
|
363
|
+
} & {
|
|
364
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
365
|
+
setAttribute(key: string, value: string[]): void;
|
|
366
|
+
setType(type: string): void;
|
|
367
|
+
setRefSeq(refSeq: string): void;
|
|
368
|
+
setMin(min: number): void;
|
|
369
|
+
setMax(max: number): void;
|
|
370
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
371
|
+
addChild(childFeature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
372
|
+
deleteChild(childFeatureId: string): void;
|
|
373
|
+
} & {
|
|
374
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
375
|
+
refSeq: string;
|
|
376
|
+
min: number;
|
|
377
|
+
max: number;
|
|
378
|
+
strand?: 1 | -1;
|
|
379
|
+
children?: import("mobx-state-tree").SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
380
|
+
}): void;
|
|
381
|
+
} & {
|
|
382
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
383
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
384
|
+
readonly assemblyId: string;
|
|
385
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
386
|
+
sequence: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
387
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
388
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
389
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
390
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
391
|
+
}, {
|
|
392
|
+
addFeature(feature: import("./AnnotationFeatureModel").AnnotationFeatureSnapshot): void;
|
|
393
|
+
deleteFeature(featureId: string): boolean;
|
|
394
|
+
setDescription(description: string): void;
|
|
395
|
+
addSequence(seq: import("mobx-state-tree").SnapshotOrInstance<typeof import("./ApolloRefSeq").Sequence>): void;
|
|
396
|
+
} & {
|
|
397
|
+
getSequence(start: number, stop: number): string;
|
|
398
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
399
|
+
addComment(comment: string): number;
|
|
400
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
401
|
+
export interface ApolloAssemblyI extends Instance<typeof ApolloAssembly> {
|
|
402
|
+
}
|
|
403
|
+
export interface ApolloAssemblySnapshot extends SnapshotIn<typeof ApolloAssembly> {
|
|
404
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApolloAssembly = void 0;
|
|
4
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
+
const ApolloRefSeq_1 = require("./ApolloRefSeq");
|
|
6
|
+
exports.ApolloAssembly = mobx_state_tree_1.types
|
|
7
|
+
.model('ApolloAssembly', {
|
|
8
|
+
_id: mobx_state_tree_1.types.identifier,
|
|
9
|
+
refSeqs: mobx_state_tree_1.types.map(ApolloRefSeq_1.ApolloRefSeq),
|
|
10
|
+
comments: mobx_state_tree_1.types.array(mobx_state_tree_1.types.string),
|
|
11
|
+
backendDriverType: mobx_state_tree_1.types.optional(mobx_state_tree_1.types.enumeration('backendDriverType', [
|
|
12
|
+
'CollaborationServerDriver',
|
|
13
|
+
'InMemoryFileDriver',
|
|
14
|
+
'DesktopFileDriver',
|
|
15
|
+
]), 'CollaborationServerDriver'),
|
|
16
|
+
})
|
|
17
|
+
.views((self) => ({
|
|
18
|
+
getByRefName(refName) {
|
|
19
|
+
return [...self.refSeqs.values()].find((val) => val.name === refName);
|
|
20
|
+
},
|
|
21
|
+
}))
|
|
22
|
+
.actions((self) => ({
|
|
23
|
+
addRefSeq(id, name, description) {
|
|
24
|
+
return self.refSeqs.put({ _id: id, name, description });
|
|
25
|
+
},
|
|
26
|
+
addComment(comment) {
|
|
27
|
+
return self.comments.push(comment);
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
//# sourceMappingURL=ApolloAssembly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloAssembly.js","sourceRoot":"","sources":["../src/ApolloAssembly.ts"],"names":[],"mappings":";;;AAAA,qDAA6D;AAE7D,iDAA6C;AAOhC,QAAA,cAAc,GAAG,uBAAK;KAChC,KAAK,CAAC,gBAAgB,EAAE;IACvB,GAAG,EAAE,uBAAK,CAAC,UAAU;IACrB,OAAO,EAAE,uBAAK,CAAC,GAAG,CAAC,2BAAY,CAAC;IAChC,QAAQ,EAAE,uBAAK,CAAC,KAAK,CAAC,uBAAK,CAAC,MAAM,CAAC;IACnC,iBAAiB,EAAE,uBAAK,CAAC,QAAQ,CAC/B,uBAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE;QACrC,2BAA2B;QAC3B,oBAAoB;QACpB,mBAAmB;KACpB,CAAC,EACF,2BAA2B,CAC5B;CACF,CAAC;KACD,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAChB,YAAY,CAAC,OAAe;QAC1B,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;IACvE,CAAC;CACF,CAAC,CAAC;KACF,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IAClB,SAAS,CAAC,EAAU,EAAE,IAAY,EAAE,WAAoB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAA;IACzD,CAAC;IACD,UAAU,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;CACF,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Instance, SnapshotIn, SnapshotOrInstance } from 'mobx-state-tree';
|
|
2
|
+
import { AnnotationFeatureSnapshot } from './AnnotationFeatureModel';
|
|
3
|
+
export declare const Sequence: import("mobx-state-tree").IModelType<{
|
|
4
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
5
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
6
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
7
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
8
|
+
export declare const ApolloRefSeq: import("mobx-state-tree").IModelType<{
|
|
9
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
10
|
+
name: import("mobx-state-tree").ISimpleType<string>;
|
|
11
|
+
description: import("mobx-state-tree").IType<string | undefined, string, string>;
|
|
12
|
+
features: import("mobx-state-tree").IMapType<import("mobx-state-tree").IModelType<{
|
|
13
|
+
_id: import("mobx-state-tree").ISimpleType<string>;
|
|
14
|
+
refSeq: import("mobx-state-tree").ISimpleType<string>;
|
|
15
|
+
type: import("mobx-state-tree").ISimpleType<string>;
|
|
16
|
+
min: import("mobx-state-tree").ISimpleType<number>;
|
|
17
|
+
max: import("mobx-state-tree").ISimpleType<number>;
|
|
18
|
+
strand: import("mobx-state-tree").IMaybe<import("mobx-state-tree").ITypeUnion<1 | -1, 1 | -1, 1 | -1>>;
|
|
19
|
+
children: import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>;
|
|
20
|
+
attributes: import("mobx-state-tree").IMapType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>;
|
|
21
|
+
}, {
|
|
22
|
+
readonly length: number;
|
|
23
|
+
readonly featureId: (import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>>) | undefined;
|
|
24
|
+
readonly minWithChildren: number;
|
|
25
|
+
readonly maxWithChildren: number;
|
|
26
|
+
hasDescendant(featureId: string): boolean;
|
|
27
|
+
readonly cdsLocations: {
|
|
28
|
+
min: number;
|
|
29
|
+
max: number;
|
|
30
|
+
phase: 0 | 1 | 2;
|
|
31
|
+
}[][];
|
|
32
|
+
} & {
|
|
33
|
+
setAttributes(attributes: Map<string, string[]>): void;
|
|
34
|
+
setAttribute(key: string, value: string[]): void;
|
|
35
|
+
setType(type: string): void;
|
|
36
|
+
setRefSeq(refSeq: string): void;
|
|
37
|
+
setMin(min: number): void;
|
|
38
|
+
setMax(max: number): void;
|
|
39
|
+
setStrand(strand?: 1 | -1 | undefined): void;
|
|
40
|
+
addChild(childFeature: AnnotationFeatureSnapshot): void;
|
|
41
|
+
deleteChild(childFeatureId: string): void;
|
|
42
|
+
} & {
|
|
43
|
+
update({ children, max, min, refSeq, strand, }: {
|
|
44
|
+
refSeq: string;
|
|
45
|
+
min: number;
|
|
46
|
+
max: number;
|
|
47
|
+
strand?: 1 | -1;
|
|
48
|
+
children?: SnapshotOrInstance<(import("mobx-state-tree").IMSTMap<import("mobx-state-tree").IAnyModelType> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IMaybe<import("mobx-state-tree").IMapType<import("mobx-state-tree").IAnyModelType>>>) | undefined>;
|
|
49
|
+
}): void;
|
|
50
|
+
} & {
|
|
51
|
+
readonly parent: import("./AnnotationFeatureModel").AnnotationFeature | undefined;
|
|
52
|
+
readonly topLevelFeature: import("./AnnotationFeatureModel").AnnotationFeature;
|
|
53
|
+
readonly assemblyId: string;
|
|
54
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
55
|
+
sequence: import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
56
|
+
start: import("mobx-state-tree").ISimpleType<number>;
|
|
57
|
+
stop: import("mobx-state-tree").ISimpleType<number>;
|
|
58
|
+
sequence: import("mobx-state-tree").ISimpleType<string>;
|
|
59
|
+
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
60
|
+
}, {
|
|
61
|
+
addFeature(feature: AnnotationFeatureSnapshot): void;
|
|
62
|
+
deleteFeature(featureId: string): boolean;
|
|
63
|
+
setDescription(description: string): void;
|
|
64
|
+
addSequence(seq: SnapshotOrInstance<typeof Sequence>): void;
|
|
65
|
+
} & {
|
|
66
|
+
getSequence(start: number, stop: number): string;
|
|
67
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
68
|
+
export interface ApolloRefSeqI extends Instance<typeof ApolloRefSeq> {
|
|
69
|
+
}
|
|
70
|
+
export interface ApolloRefSeqSnapshot extends SnapshotIn<typeof ApolloRefSeq> {
|
|
71
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApolloRefSeq = exports.Sequence = void 0;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
6
|
+
const AnnotationFeatureModel_1 = require("./AnnotationFeatureModel");
|
|
7
|
+
exports.Sequence = mobx_state_tree_1.types.model({
|
|
8
|
+
start: mobx_state_tree_1.types.number,
|
|
9
|
+
stop: mobx_state_tree_1.types.number,
|
|
10
|
+
sequence: mobx_state_tree_1.types.string,
|
|
11
|
+
});
|
|
12
|
+
exports.ApolloRefSeq = mobx_state_tree_1.types
|
|
13
|
+
.model('ApolloRefSeq', {
|
|
14
|
+
_id: mobx_state_tree_1.types.identifier,
|
|
15
|
+
name: mobx_state_tree_1.types.string,
|
|
16
|
+
description: '',
|
|
17
|
+
features: mobx_state_tree_1.types.map(AnnotationFeatureModel_1.AnnotationFeatureModel),
|
|
18
|
+
sequence: mobx_state_tree_1.types.array(exports.Sequence),
|
|
19
|
+
})
|
|
20
|
+
.actions((self) => ({
|
|
21
|
+
addFeature(feature) {
|
|
22
|
+
self.features.put(feature);
|
|
23
|
+
},
|
|
24
|
+
deleteFeature(featureId) {
|
|
25
|
+
return self.features.delete(featureId);
|
|
26
|
+
},
|
|
27
|
+
setDescription(description) {
|
|
28
|
+
self.description = description;
|
|
29
|
+
},
|
|
30
|
+
addSequence(seq) {
|
|
31
|
+
if (seq.sequence.length !== seq.stop - seq.start) {
|
|
32
|
+
throw new Error('sequence does not match declared length');
|
|
33
|
+
}
|
|
34
|
+
if (self.sequence.length === 0) {
|
|
35
|
+
self.sequence.push(seq);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const newSequences = self.sequence.map((s) => ({
|
|
39
|
+
start: s.start,
|
|
40
|
+
stop: s.stop,
|
|
41
|
+
sequence: s.sequence,
|
|
42
|
+
}));
|
|
43
|
+
newSequences.push({
|
|
44
|
+
start: seq.start,
|
|
45
|
+
stop: seq.stop,
|
|
46
|
+
sequence: seq.sequence,
|
|
47
|
+
});
|
|
48
|
+
newSequences.sort((s1, s2) => s1.start - s2.start);
|
|
49
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
50
|
+
const consolidatedSequences = newSequences.reduce((result, current) => {
|
|
51
|
+
const lastRange = result.at(-1);
|
|
52
|
+
if (lastRange === undefined) {
|
|
53
|
+
return [current];
|
|
54
|
+
}
|
|
55
|
+
if (lastRange.stop >= current.start) {
|
|
56
|
+
if (current.stop > lastRange.stop) {
|
|
57
|
+
lastRange.stop = current.stop;
|
|
58
|
+
lastRange.sequence += current.sequence.slice(current.stop - lastRange.stop);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
result.push(current);
|
|
63
|
+
}
|
|
64
|
+
return result;
|
|
65
|
+
}, []);
|
|
66
|
+
if (self.sequence.length === consolidatedSequences.length &&
|
|
67
|
+
self.sequence.every((s, idx) => s.start === consolidatedSequences[idx].start &&
|
|
68
|
+
s.stop === consolidatedSequences[idx].stop)) {
|
|
69
|
+
// sequences was unchanged
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
self.sequence.clear();
|
|
73
|
+
self.sequence.push(...consolidatedSequences);
|
|
74
|
+
},
|
|
75
|
+
}))
|
|
76
|
+
.views((self) => ({
|
|
77
|
+
getSequence(start, stop) {
|
|
78
|
+
for (const { sequence, start: seqStart, stop: seqStop, } of self.sequence) {
|
|
79
|
+
// adjacent to existing sequence - modify
|
|
80
|
+
if ((0, util_1.isContainedWithin)(start, stop, seqStart, seqStop)) {
|
|
81
|
+
return sequence.slice(start - seqStart, stop - seqStart);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return '';
|
|
85
|
+
},
|
|
86
|
+
}));
|
|
87
|
+
//# sourceMappingURL=ApolloRefSeq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloRefSeq.js","sourceRoot":"","sources":["../src/ApolloRefSeq.ts"],"names":[],"mappings":";;;AAAA,6CAAsD;AACtD,qDAKwB;AAExB,qEAGiC;AAEpB,QAAA,QAAQ,GAAG,uBAAK,CAAC,KAAK,CAAC;IAClC,KAAK,EAAE,uBAAK,CAAC,MAAM;IACnB,IAAI,EAAE,uBAAK,CAAC,MAAM;IAClB,QAAQ,EAAE,uBAAK,CA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