@apollo-annotation/shared 0.3.10 → 0.3.12
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/Changes/AddAssemblyAliasesChange.d.ts +1 -0
- package/dist/Changes/AddAssemblyAliasesChange.d.ts.map +1 -0
- package/dist/Changes/AddAssemblyAliasesChange.js +7 -9
- package/dist/Changes/AddAssemblyAliasesChange.js.map +1 -1
- package/dist/Changes/AddAssemblyAndFeaturesFromFileChange.d.ts +5 -3
- package/dist/Changes/AddAssemblyAndFeaturesFromFileChange.d.ts.map +1 -0
- package/dist/Changes/AddAssemblyAndFeaturesFromFileChange.js +31 -13
- package/dist/Changes/AddAssemblyAndFeaturesFromFileChange.js.map +1 -1
- package/dist/Changes/AddAssemblyFromExternalChange.d.ts +1 -0
- package/dist/Changes/AddAssemblyFromExternalChange.d.ts.map +1 -0
- package/dist/Changes/AddAssemblyFromExternalChange.js +13 -16
- package/dist/Changes/AddAssemblyFromExternalChange.js.map +1 -1
- package/dist/Changes/AddAssemblyFromFileChange.d.ts +3 -2
- package/dist/Changes/AddAssemblyFromFileChange.d.ts.map +1 -0
- package/dist/Changes/AddAssemblyFromFileChange.js +4 -8
- package/dist/Changes/AddAssemblyFromFileChange.js.map +1 -1
- package/dist/Changes/AddFeatureChange.d.ts +3 -2
- package/dist/Changes/AddFeatureChange.d.ts.map +1 -0
- package/dist/Changes/AddFeatureChange.js +11 -11
- package/dist/Changes/AddFeatureChange.js.map +1 -1
- package/dist/Changes/AddFeaturesFromFileChange.d.ts +5 -3
- package/dist/Changes/AddFeaturesFromFileChange.d.ts.map +1 -0
- package/dist/Changes/AddFeaturesFromFileChange.js +27 -14
- package/dist/Changes/AddFeaturesFromFileChange.js.map +1 -1
- package/dist/Changes/AddRefSeqAliasesChange.d.ts +1 -0
- package/dist/Changes/AddRefSeqAliasesChange.d.ts.map +1 -0
- package/dist/Changes/AddRefSeqAliasesChange.js +7 -8
- package/dist/Changes/AddRefSeqAliasesChange.js.map +1 -1
- package/dist/Changes/DeleteAssemblyChange.d.ts +1 -0
- package/dist/Changes/DeleteAssemblyChange.d.ts.map +1 -0
- package/dist/Changes/DeleteAssemblyChange.js +5 -8
- package/dist/Changes/DeleteAssemblyChange.js.map +1 -1
- package/dist/Changes/DeleteFeatureChange.d.ts +4 -3
- package/dist/Changes/DeleteFeatureChange.d.ts.map +1 -0
- package/dist/Changes/DeleteFeatureChange.js +25 -12
- package/dist/Changes/DeleteFeatureChange.js.map +1 -1
- package/dist/Changes/DeleteUserChange.d.ts +1 -0
- package/dist/Changes/DeleteUserChange.d.ts.map +1 -0
- package/dist/Changes/DeleteUserChange.js +2 -6
- package/dist/Changes/DeleteUserChange.js.map +1 -1
- package/dist/Changes/FeatureAttributeChange.d.ts +1 -0
- package/dist/Changes/FeatureAttributeChange.d.ts.map +1 -0
- package/dist/Changes/FeatureAttributeChange.js +14 -8
- package/dist/Changes/FeatureAttributeChange.js.map +1 -1
- package/dist/Changes/FromFileBaseChange.d.ts +4 -3
- package/dist/Changes/FromFileBaseChange.d.ts.map +1 -0
- package/dist/Changes/FromFileBaseChange.js +4 -10
- package/dist/Changes/FromFileBaseChange.js.map +1 -1
- package/dist/Changes/ImportJBrowseConfigChange.d.ts +1 -0
- package/dist/Changes/ImportJBrowseConfigChange.d.ts.map +1 -0
- package/dist/Changes/ImportJBrowseConfigChange.js +3 -8
- package/dist/Changes/ImportJBrowseConfigChange.js.map +1 -1
- package/dist/Changes/LocationEndChange.d.ts +1 -0
- package/dist/Changes/LocationEndChange.d.ts.map +1 -0
- package/dist/Changes/LocationEndChange.js +3 -8
- package/dist/Changes/LocationEndChange.js.map +1 -1
- package/dist/Changes/LocationStartChange.d.ts +1 -0
- package/dist/Changes/LocationStartChange.d.ts.map +1 -0
- package/dist/Changes/LocationStartChange.js +3 -8
- package/dist/Changes/LocationStartChange.js.map +1 -1
- package/dist/Changes/MergeExonsChange.d.ts +3 -2
- package/dist/Changes/MergeExonsChange.d.ts.map +1 -0
- package/dist/Changes/MergeExonsChange.js +9 -13
- package/dist/Changes/MergeExonsChange.js.map +1 -1
- package/dist/Changes/MergeTranscriptsChange.d.ts +4 -3
- package/dist/Changes/MergeTranscriptsChange.d.ts.map +1 -0
- package/dist/Changes/MergeTranscriptsChange.js +20 -24
- package/dist/Changes/MergeTranscriptsChange.js.map +1 -1
- package/dist/Changes/SplitExonChange.d.ts +3 -2
- package/dist/Changes/SplitExonChange.d.ts.map +1 -0
- package/dist/Changes/SplitExonChange.js +6 -10
- package/dist/Changes/SplitExonChange.js.map +1 -1
- package/dist/Changes/StrandChange.d.ts +1 -0
- package/dist/Changes/StrandChange.d.ts.map +1 -0
- package/dist/Changes/StrandChange.js +2 -6
- package/dist/Changes/StrandChange.js.map +1 -1
- package/dist/Changes/TypeChange.d.ts +1 -0
- package/dist/Changes/TypeChange.d.ts.map +1 -0
- package/dist/Changes/TypeChange.js +2 -6
- package/dist/Changes/TypeChange.js.map +1 -1
- package/dist/Changes/UndoMergeExonsChange.d.ts +3 -2
- package/dist/Changes/UndoMergeExonsChange.d.ts.map +1 -0
- package/dist/Changes/UndoMergeExonsChange.js +4 -8
- package/dist/Changes/UndoMergeExonsChange.js.map +1 -1
- package/dist/Changes/UndoMergeTranscriptsChange.d.ts +3 -2
- package/dist/Changes/UndoMergeTranscriptsChange.d.ts.map +1 -0
- package/dist/Changes/UndoMergeTranscriptsChange.js +4 -8
- package/dist/Changes/UndoMergeTranscriptsChange.js.map +1 -1
- package/dist/Changes/UndoSplitExonChange.d.ts +3 -2
- package/dist/Changes/UndoSplitExonChange.d.ts.map +1 -0
- package/dist/Changes/UndoSplitExonChange.js +6 -10
- package/dist/Changes/UndoSplitExonChange.js.map +1 -1
- package/dist/Changes/UserChange.d.ts +1 -0
- package/dist/Changes/UserChange.d.ts.map +1 -0
- package/dist/Changes/UserChange.js +2 -6
- package/dist/Changes/UserChange.js.map +1 -1
- package/dist/Changes/index.d.ts +47 -46
- package/dist/Changes/index.d.ts.map +1 -0
- package/dist/Changes/index.js +70 -74
- package/dist/Changes/index.js.map +1 -1
- package/dist/Checks/CDSCheck.d.ts +2 -1
- package/dist/Checks/CDSCheck.d.ts.map +1 -0
- package/dist/Checks/CDSCheck.js +17 -26
- package/dist/Checks/CDSCheck.js.map +1 -1
- package/dist/Checks/TranscriptCheck.d.ts +2 -1
- package/dist/Checks/TranscriptCheck.d.ts.map +1 -0
- package/dist/Checks/TranscriptCheck.js +11 -16
- package/dist/Checks/TranscriptCheck.js.map +1 -1
- package/dist/Checks/index.d.ts +3 -2
- package/dist/Checks/index.d.ts.map +1 -0
- package/dist/Checks/index.js +2 -5
- package/dist/Checks/index.js.map +1 -1
- package/dist/Checks/util.d.ts +2 -1
- package/dist/Checks/util.d.ts.map +1 -0
- package/dist/Checks/util.js +1 -4
- package/dist/Checks/util.js.map +1 -1
- package/dist/Common/index.d.ts +2 -1
- package/dist/Common/index.d.ts.map +1 -0
- package/dist/Common/index.js +1 -4
- package/dist/Common/index.js.map +1 -1
- package/dist/Common/jwtPayload.d.ts +1 -0
- package/dist/Common/jwtPayload.d.ts.map +1 -0
- package/dist/Common/jwtPayload.js +5 -10
- package/dist/Common/jwtPayload.js.map +1 -1
- package/dist/GFF3/annotationFeatureToGFF3.d.ts +3 -2
- package/dist/GFF3/annotationFeatureToGFF3.d.ts.map +1 -0
- package/dist/GFF3/annotationFeatureToGFF3.js +96 -93
- package/dist/GFF3/annotationFeatureToGFF3.js.map +1 -1
- package/dist/GFF3/annotationFeatureToGFF3.test.d.ts +1 -0
- package/dist/GFF3/annotationFeatureToGFF3.test.d.ts.map +1 -0
- package/dist/GFF3/annotationFeatureToGFF3.test.js +77 -79
- package/dist/GFF3/annotationFeatureToGFF3.test.js.map +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.d.ts +3 -2
- package/dist/GFF3/gff3ToAnnotationFeature.d.ts.map +1 -0
- package/dist/GFF3/gff3ToAnnotationFeature.js +30 -22
- package/dist/GFF3/gff3ToAnnotationFeature.js.map +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.test.d.ts +1 -0
- package/dist/GFF3/gff3ToAnnotationFeature.test.d.ts.map +1 -0
- package/dist/GFF3/gff3ToAnnotationFeature.test.js +60 -63
- package/dist/GFF3/gff3ToAnnotationFeature.test.js.map +1 -1
- package/dist/GFF3/gffReservedKeys.d.ts +1 -0
- package/dist/GFF3/gffReservedKeys.d.ts.map +1 -0
- package/dist/GFF3/gffReservedKeys.js +12 -19
- package/dist/GFF3/gffReservedKeys.js.map +1 -1
- package/dist/GFF3/index.d.ts +4 -3
- package/dist/GFF3/index.d.ts.map +1 -0
- package/dist/GFF3/index.js +3 -6
- package/dist/GFF3/index.js.map +1 -1
- package/dist/GFF3/testUtil.d.ts +2 -1
- package/dist/GFF3/testUtil.d.ts.map +1 -0
- package/dist/GFF3/testUtil.js +8 -8
- package/dist/GFF3/testUtil.js.map +1 -1
- package/dist/Messages.d.ts +3 -2
- package/dist/Messages.d.ts.map +1 -0
- package/dist/Messages.js +1 -2
- package/dist/Operations/GetAssembliesOperation.d.ts +2 -3
- package/dist/Operations/GetAssembliesOperation.d.ts.map +1 -0
- package/dist/Operations/GetAssembliesOperation.js +2 -6
- package/dist/Operations/GetAssembliesOperation.js.map +1 -1
- package/dist/Operations/GetFeaturesOperation.d.ts +1 -0
- package/dist/Operations/GetFeaturesOperation.d.ts.map +1 -0
- package/dist/Operations/GetFeaturesOperation.js +2 -6
- package/dist/Operations/GetFeaturesOperation.js.map +1 -1
- package/dist/Operations/index.d.ts +5 -4
- package/dist/Operations/index.d.ts.map +1 -0
- package/dist/Operations/index.js +5 -9
- package/dist/Operations/index.js.map +1 -1
- package/dist/Validations/CoreValidation.d.ts +4 -3
- package/dist/Validations/CoreValidation.d.ts.map +1 -0
- package/dist/Validations/CoreValidation.js +6 -12
- package/dist/Validations/CoreValidation.js.map +1 -1
- package/dist/Validations/ParentChildValidation.d.ts +6 -5
- package/dist/Validations/ParentChildValidation.d.ts.map +1 -0
- package/dist/Validations/ParentChildValidation.js +6 -10
- package/dist/Validations/ParentChildValidation.js.map +1 -1
- package/dist/Validations/Validation.d.ts +6 -5
- package/dist/Validations/Validation.d.ts.map +1 -0
- package/dist/Validations/Validation.js +2 -7
- package/dist/Validations/Validation.js.map +1 -1
- package/dist/Validations/ValidationSet.d.ts +5 -4
- package/dist/Validations/ValidationSet.d.ts.map +1 -0
- package/dist/Validations/ValidationSet.js +3 -8
- package/dist/Validations/ValidationSet.js.map +1 -1
- package/dist/Validations/index.d.ts +5 -4
- package/dist/Validations/index.d.ts.map +1 -0
- package/dist/Validations/index.js +4 -7
- package/dist/Validations/index.js.map +1 -1
- package/dist/Validations/soSequenceTypes.d.ts +1 -0
- package/dist/Validations/soSequenceTypes.d.ts.map +1 -0
- package/dist/Validations/soSequenceTypes.js +1 -3
- package/dist/Validations/soSequenceTypes.js.map +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/util.d.ts +3 -2
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +4 -10
- package/dist/util.js.map +1 -1
- package/package.json +16 -13
- package/src/Changes/AddAssemblyAliasesChange.ts +3 -1
- package/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts +38 -16
- package/src/Changes/AddAssemblyFromExternalChange.ts +3 -2
- package/src/Changes/AddAssemblyFromFileChange.ts +11 -8
- package/src/Changes/AddFeatureChange.ts +8 -3
- package/src/Changes/AddFeaturesFromFileChange.ts +35 -18
- package/src/Changes/AddRefSeqAliasesChange.ts +3 -0
- package/src/Changes/DeleteAssemblyChange.ts +1 -0
- package/src/Changes/DeleteFeatureChange.ts +21 -3
- package/src/Changes/FeatureAttributeChange.ts +14 -1
- package/src/Changes/FromFileBaseChange.ts +4 -9
- package/src/Changes/LocationEndChange.ts +1 -1
- package/src/Changes/LocationStartChange.ts +1 -1
- package/src/Changes/MergeExonsChange.ts +4 -4
- package/src/Changes/MergeTranscriptsChange.ts +8 -8
- package/src/Changes/SplitExonChange.ts +3 -3
- package/src/Changes/StrandChange.ts +1 -1
- package/src/Changes/TypeChange.ts +1 -1
- package/src/Changes/UndoMergeExonsChange.ts +2 -2
- package/src/Changes/UndoMergeTranscriptsChange.ts +2 -2
- package/src/Changes/UndoSplitExonChange.ts +3 -3
- package/src/Changes/index.ts +46 -46
- package/src/Checks/CDSCheck.ts +8 -10
- package/src/Checks/TranscriptCheck.ts +4 -4
- package/src/Checks/index.ts +2 -2
- package/src/Checks/util.ts +1 -1
- package/src/Common/index.ts +1 -1
- package/src/GFF3/annotationFeatureToGFF3.test.ts +3 -3
- package/src/GFF3/annotationFeatureToGFF3.ts +105 -99
- package/src/GFF3/gff3ToAnnotationFeature.test.ts +3 -3
- package/src/GFF3/gff3ToAnnotationFeature.ts +29 -13
- package/src/GFF3/index.ts +3 -3
- package/src/GFF3/testUtil.ts +5 -1
- package/src/Messages.ts +2 -2
- package/src/Operations/index.ts +4 -4
- package/src/Validations/CoreValidation.ts +4 -4
- package/src/Validations/ParentChildValidation.ts +6 -6
- package/src/Validations/Validation.ts +5 -5
- package/src/Validations/ValidationSet.ts +4 -8
- package/src/Validations/index.ts +4 -4
- package/src/declare.d.ts +58 -0
- package/src/index.ts +8 -8
- package/src/util.ts +3 -3
- package/test_data/single_feature_mutliple_locations.gff3 +5 -0
- package/test_data/single_feature_mutliple_locations.json +76 -0
- package/tsconfig.json +6 -4
package/dist/util.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Feature } from '@apollo-annotation/schemas';
|
|
2
|
+
import type { IKeyValueMap } from 'mobx';
|
|
3
3
|
export declare function splitStringIntoChunks(input: string, chunkSize: number): string[];
|
|
4
4
|
export declare function getPrintableId(feature: Feature): string;
|
|
5
5
|
export declare function attributesToRecords(attributes: IKeyValueMap<readonly string[] | undefined> | undefined): Record<string, string[] | undefined>;
|
|
6
6
|
export declare function stringifyAttributes(attributes: Record<string, string[] | undefined> | undefined): string;
|
|
7
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAOV;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAWvD;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,YAAY,CAAC,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,GAClE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAStC;AAED,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,GAC3D,MAAM,CAmBR"}
|
package/dist/util.js
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.splitStringIntoChunks = splitStringIntoChunks;
|
|
4
|
-
exports.getPrintableId = getPrintableId;
|
|
5
|
-
exports.attributesToRecords = attributesToRecords;
|
|
6
|
-
exports.stringifyAttributes = stringifyAttributes;
|
|
7
|
-
function splitStringIntoChunks(input, chunkSize) {
|
|
1
|
+
export function splitStringIntoChunks(input, chunkSize) {
|
|
8
2
|
const chunks = [];
|
|
9
3
|
for (let i = 0; i < input.length; i += chunkSize) {
|
|
10
4
|
const chunk = input.slice(i, i + chunkSize);
|
|
@@ -12,7 +6,7 @@ function splitStringIntoChunks(input, chunkSize) {
|
|
|
12
6
|
}
|
|
13
7
|
return chunks;
|
|
14
8
|
}
|
|
15
|
-
function getPrintableId(feature) {
|
|
9
|
+
export function getPrintableId(feature) {
|
|
16
10
|
const ff = feature;
|
|
17
11
|
const gff_id = ff.attributes.get('gff_id')?.join(',');
|
|
18
12
|
if (gff_id) {
|
|
@@ -24,7 +18,7 @@ function getPrintableId(feature) {
|
|
|
24
18
|
}
|
|
25
19
|
return `_id: ${feature._id.toString()}`;
|
|
26
20
|
}
|
|
27
|
-
function attributesToRecords(attributes) {
|
|
21
|
+
export function attributesToRecords(attributes) {
|
|
28
22
|
const records = {};
|
|
29
23
|
if (!attributes) {
|
|
30
24
|
return records;
|
|
@@ -34,7 +28,7 @@ function attributesToRecords(attributes) {
|
|
|
34
28
|
}
|
|
35
29
|
return records;
|
|
36
30
|
}
|
|
37
|
-
function stringifyAttributes(attributes) {
|
|
31
|
+
export function stringifyAttributes(attributes) {
|
|
38
32
|
if (!attributes) {
|
|
39
33
|
return '';
|
|
40
34
|
}
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,qBAAqB,CACnC,KAAa,EACb,SAAiB;IAEjB,MAAM,MAAM,GAAa,EAAE,CAAA;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;QACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAA;QAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,MAAM,EAAE,GAAG,OAAuC,CAAA;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IACrD,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,MAAM,UAAU,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAA;IACxD,CAAC;IACD,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IACzD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,QAAQ,UAAU,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAA;IAC5D,CAAC;IACD,OAAO,QAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAA;AACzC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,UAAmE;IAEnE,MAAM,OAAO,GAAyC,EAAE,CAAA;IACxD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,OAAO,CAAA;IAChB,CAAC;IACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,KAAK,EAAE,CAAA;IAC/B,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,UAA4D;IAE5D,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,MAAM,GAAG,GAAG,EAAE,CAAA;IACd,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACtD,IAAI,aAAa,GAAG,GAAG,CAAA;QACvB,IAAI,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACrC,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;YACtC,aAAa;gBACX,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAClE,CAAC;QACD,IAAI,KAAK,EAAE,CAAC;YACV,GAAG,CAAC,IAAI,CAAC,GAAG,aAAa,IAAI,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACjD,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACzB,CAAC;IACH,CAAC;IACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAC1C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo-annotation/shared",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.3.12",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": "./dist/index.js",
|
|
5
7
|
"scripts": {
|
|
6
8
|
"build": "yarn clean && tsc --build",
|
|
7
9
|
"clean": "rimraf dist",
|
|
@@ -10,27 +12,27 @@
|
|
|
10
12
|
"test:ci": "NODE_V8_COVERAGE=./coverage glob -c \"tsx --test --test-reporter spec --experimental-test-coverage \" \"**/*.test.ts\""
|
|
11
13
|
},
|
|
12
14
|
"dependencies": {
|
|
13
|
-
"@apollo-annotation/common": "^0.3.
|
|
14
|
-
"@apollo-annotation/mst": "^0.3.
|
|
15
|
-
"@apollo-annotation/schemas": "^0.3.
|
|
16
|
-
"@gmod/gff": "^2.
|
|
17
|
-
"@gmod/indexedfasta": "^
|
|
18
|
-
"@jbrowse/core": "^
|
|
15
|
+
"@apollo-annotation/common": "^0.3.12",
|
|
16
|
+
"@apollo-annotation/mst": "^0.3.12",
|
|
17
|
+
"@apollo-annotation/schemas": "^0.3.12",
|
|
18
|
+
"@gmod/gff": "^2.1.0",
|
|
19
|
+
"@gmod/indexedfasta": "^5.0.2",
|
|
20
|
+
"@jbrowse/core": "^4.1.1",
|
|
19
21
|
"bson-objectid": "^2.0.4",
|
|
20
|
-
"generic-
|
|
22
|
+
"generic-filehandle2": "^2.0.18",
|
|
21
23
|
"jwt-decode": "^3.1.2",
|
|
22
24
|
"tslib": "^2.3.1"
|
|
23
25
|
},
|
|
24
26
|
"devDependencies": {
|
|
27
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
25
28
|
"@nestjs/common": "^10.1.0",
|
|
26
29
|
"@nestjs/core": "^10.1.0",
|
|
27
30
|
"@types/chai": "^4.3.19",
|
|
28
|
-
"@types/node": "^
|
|
31
|
+
"@types/node": "^24.10.9",
|
|
29
32
|
"chai": "^5.1.1",
|
|
30
33
|
"chai-exclude": "^3.0.0",
|
|
31
34
|
"glob": "^11.0.0",
|
|
32
35
|
"mobx": "^6.6.1",
|
|
33
|
-
"mobx-state-tree": "^5.4.0",
|
|
34
36
|
"mongoose": "^6.12.0",
|
|
35
37
|
"react-dom": "^18.2.0",
|
|
36
38
|
"rimraf": "^3.0.2",
|
|
@@ -39,14 +41,15 @@
|
|
|
39
41
|
"typescript": "^5.5.3"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
42
|
-
"@
|
|
44
|
+
"@jbrowse/mobx-state-tree": "^5.5.0",
|
|
45
|
+
"@mui/material": "^7.3.7",
|
|
43
46
|
"@mui/x-data-grid": "^8.0.0",
|
|
44
47
|
"mobx": "^6.6.1",
|
|
45
48
|
"mobx-react": "^7.2.1",
|
|
46
|
-
"mobx-state-tree": "^5.4.0",
|
|
47
49
|
"prop-types": "^15.8.1",
|
|
48
50
|
"react": "^18.2.0",
|
|
49
51
|
"react-dom": "^18.2.0",
|
|
52
|
+
"reflect-metadata": "^0.1.13",
|
|
50
53
|
"rxjs": "^7.4.0"
|
|
51
54
|
},
|
|
52
55
|
"publishConfig": {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
4
|
import {
|
|
2
5
|
AssemblySpecificChange,
|
|
3
6
|
type Change,
|
|
@@ -30,7 +33,6 @@ export class AddAssemblyAliasesChange extends AssemblySpecificChange {
|
|
|
30
33
|
if (!assembly) {
|
|
31
34
|
throw new Error(`assembly ${this.assembly} not found`)
|
|
32
35
|
}
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
|
34
36
|
assembly.configuration.aliases.set(this.aliases)
|
|
35
37
|
return Promise.resolve()
|
|
36
38
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
5
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
6
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import type {
|
|
8
|
+
ChangeOptions,
|
|
9
|
+
ClientDataStore,
|
|
10
|
+
LocalGFF3DataStore,
|
|
11
|
+
SerializedAssemblySpecificChange,
|
|
12
|
+
ServerDataStore,
|
|
9
13
|
} from '@apollo-annotation/common'
|
|
10
|
-
import { type GFF3Feature } from '@gmod/gff'
|
|
11
14
|
|
|
12
|
-
import { FromFileBaseChange } from './FromFileBaseChange'
|
|
15
|
+
import { FromFileBaseChange } from './FromFileBaseChange.js'
|
|
13
16
|
|
|
14
17
|
export interface SerializedAddAssemblyAndFeaturesFromFileChangeBase
|
|
15
18
|
extends SerializedAssemblySpecificChange {
|
|
@@ -19,7 +22,7 @@ export interface SerializedAddAssemblyAndFeaturesFromFileChangeBase
|
|
|
19
22
|
export interface AddAssemblyAndFeaturesFromFileChangeDetails {
|
|
20
23
|
assemblyName: string
|
|
21
24
|
fileIds: { fa: string }
|
|
22
|
-
parseOptions?: { bufferSize
|
|
25
|
+
parseOptions?: { bufferSize?: number; strict?: boolean }
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
export interface SerializedAddAssemblyAndFeaturesFromFileChangeSingle
|
|
@@ -111,18 +114,37 @@ export class AddAssemblyAndFeaturesFromFileChange extends FromFileBaseChange {
|
|
|
111
114
|
backend,
|
|
112
115
|
)
|
|
113
116
|
|
|
114
|
-
const { bufferSize = 10_000 } = parseOptions ?? {}
|
|
117
|
+
const { bufferSize = 10_000, strict = true } = parseOptions ?? {}
|
|
115
118
|
const featureStream = filesService.parseGFF3(
|
|
116
119
|
filesService.getFileStream(fileDoc),
|
|
117
120
|
{ bufferSize },
|
|
118
121
|
)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
for await (const
|
|
122
|
-
const gff3Feature = f as GFF3Feature
|
|
123
|
-
logger.verbose?.(`ENTRY=${JSON.stringify(gff3Feature)}`)
|
|
122
|
+
let featureCount = 0
|
|
123
|
+
let errorCount = 0
|
|
124
|
+
for await (const gff3Feature of featureStream) {
|
|
124
125
|
// Add new feature into database
|
|
125
|
-
|
|
126
|
+
try {
|
|
127
|
+
await this.addFeatureIntoDb(gff3Feature, backend)
|
|
128
|
+
} catch (error) {
|
|
129
|
+
// if the first feature is an error, assume the file isn't valid and throw
|
|
130
|
+
if (strict || featureCount === 0) {
|
|
131
|
+
throw error
|
|
132
|
+
}
|
|
133
|
+
if (errorCount <= 99) {
|
|
134
|
+
logger.warn('Error parsing feature')
|
|
135
|
+
logger.warn(error)
|
|
136
|
+
if (errorCount === 99) {
|
|
137
|
+
logger.warn(
|
|
138
|
+
'Reached 100 parsing errors, omitting further warnings from log',
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
errorCount++
|
|
143
|
+
}
|
|
144
|
+
featureCount++
|
|
145
|
+
if (featureCount % 1000 === 0) {
|
|
146
|
+
logger.debug?.(`Processed ${featureCount} features`)
|
|
147
|
+
}
|
|
126
148
|
}
|
|
127
149
|
}
|
|
128
150
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
4
|
|
|
4
5
|
/* eslint-disable @typescript-eslint/require-await */
|
|
@@ -11,7 +12,7 @@ import {
|
|
|
11
12
|
type ServerDataStore,
|
|
12
13
|
} from '@apollo-annotation/common'
|
|
13
14
|
import { BgzipIndexedFasta, IndexedFasta } from '@gmod/indexedfasta'
|
|
14
|
-
import { RemoteFile } from 'generic-
|
|
15
|
+
import { RemoteFile } from 'generic-filehandle2'
|
|
15
16
|
|
|
16
17
|
export interface SerializedAddAssemblyFromExternalChangeBase
|
|
17
18
|
extends SerializedAssemblySpecificChange {
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
5
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import type {
|
|
7
|
+
ChangeOptions,
|
|
8
|
+
ClientDataStore,
|
|
9
|
+
LocalGFF3DataStore,
|
|
10
|
+
SerializedAssemblySpecificChange,
|
|
11
|
+
ServerDataStore,
|
|
9
12
|
} from '@apollo-annotation/common'
|
|
10
13
|
import { BgzipIndexedFasta } from '@gmod/indexedfasta'
|
|
11
14
|
|
|
12
|
-
import { FromFileBaseChange } from './FromFileBaseChange'
|
|
15
|
+
import { FromFileBaseChange } from './FromFileBaseChange.js'
|
|
13
16
|
|
|
14
17
|
export interface SerializedAddAssemblyFromFileChangeBase
|
|
15
18
|
extends SerializedAssemblySpecificChange {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
1
2
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
2
3
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
4
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
@@ -9,9 +10,9 @@ import {
|
|
|
9
10
|
type SerializedFeatureChange,
|
|
10
11
|
type ServerDataStore,
|
|
11
12
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
13
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
14
|
|
|
14
|
-
import { DeleteFeatureChange } from './DeleteFeatureChange'
|
|
15
|
+
import { DeleteFeatureChange } from './DeleteFeatureChange.js'
|
|
15
16
|
|
|
16
17
|
interface SerializedAddFeatureChangeBase extends SerializedFeatureChange {
|
|
17
18
|
typeName: 'AddFeatureChange'
|
|
@@ -123,6 +124,7 @@ export class AddFeatureChange extends FeatureChange {
|
|
|
123
124
|
)
|
|
124
125
|
featureCnt++
|
|
125
126
|
} else {
|
|
127
|
+
const indexedIds = this.getIndexedIds(addedFeature, idsToIndex)
|
|
126
128
|
// Adding new child feature
|
|
127
129
|
if (parentFeatureId) {
|
|
128
130
|
const topLevelFeature = await featureModel
|
|
@@ -146,11 +148,14 @@ export class AddFeatureChange extends FeatureChange {
|
|
|
146
148
|
this.addChild(parentFeature, addedFeature)
|
|
147
149
|
const childIds = this.getChildFeatureIds(addedFeature)
|
|
148
150
|
topLevelFeature.allIds.push(_id, ...childIds)
|
|
151
|
+
if (indexedIds.length > 0 && !topLevelFeature.indexedIds) {
|
|
152
|
+
topLevelFeature.indexedIds = []
|
|
153
|
+
}
|
|
154
|
+
topLevelFeature.indexedIds?.push(...indexedIds)
|
|
149
155
|
await topLevelFeature.save()
|
|
150
156
|
} else {
|
|
151
157
|
const childIds = this.getChildFeatureIds(addedFeature)
|
|
152
158
|
const allIdsV2 = [_id, ...childIds]
|
|
153
|
-
const indexedIds = this.getIndexedIds(addedFeature, idsToIndex)
|
|
154
159
|
const [newFeatureDoc] = await featureModel.create(
|
|
155
160
|
[{ allIds: allIdsV2, indexedIds, status: 0, ...addedFeature }],
|
|
156
161
|
{ session },
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import type {
|
|
3
|
+
ChangeOptions,
|
|
4
|
+
ClientDataStore,
|
|
5
|
+
LocalGFF3DataStore,
|
|
6
|
+
SerializedAssemblySpecificChange,
|
|
7
|
+
ServerDataStore,
|
|
8
8
|
} from '@apollo-annotation/common'
|
|
9
|
-
import { type GFF3Feature } from '@gmod/gff'
|
|
10
9
|
|
|
11
|
-
import { FromFileBaseChange } from './FromFileBaseChange'
|
|
10
|
+
import { FromFileBaseChange } from './FromFileBaseChange.js'
|
|
12
11
|
|
|
13
12
|
export interface SerializedAddFeaturesFromFileChangeBase
|
|
14
13
|
extends SerializedAssemblySpecificChange {
|
|
@@ -18,7 +17,7 @@ export interface SerializedAddFeaturesFromFileChangeBase
|
|
|
18
17
|
|
|
19
18
|
export interface AddFeaturesFromFileChangeDetails {
|
|
20
19
|
fileId: string
|
|
21
|
-
parseOptions?: { bufferSize
|
|
20
|
+
parseOptions?: { bufferSize?: number; strict?: boolean }
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
export interface SerializedAddFeaturesFromFileChangeSingle
|
|
@@ -89,21 +88,39 @@ export class AddFeaturesFromFileChange extends FromFileBaseChange {
|
|
|
89
88
|
}
|
|
90
89
|
logger.debug?.(`FileId "${fileId}", checksum "${fileDoc.checksum}"`)
|
|
91
90
|
|
|
91
|
+
let errorCount = 0
|
|
92
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
93
|
+
const errorLogger = (error: unknown) => {
|
|
94
|
+
if (errorCount <= 99) {
|
|
95
|
+
logger.warn('Error parsing or adding feature')
|
|
96
|
+
logger.warn(error)
|
|
97
|
+
if (errorCount === 99) {
|
|
98
|
+
logger.warn(
|
|
99
|
+
'Reached 100 feature errors, omitting further warnings from log',
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
errorCount++
|
|
104
|
+
}
|
|
105
|
+
|
|
92
106
|
// Read data from compressed file and parse the content
|
|
93
|
-
const { bufferSize = 10_000 } = parseOptions ?? {}
|
|
107
|
+
const { bufferSize = 10_000, strict = true } = parseOptions ?? {}
|
|
94
108
|
const featureStream = filesService.parseGFF3(
|
|
95
109
|
filesService.getFileStream(fileDoc),
|
|
96
|
-
{ bufferSize },
|
|
110
|
+
{ bufferSize, errorCallback: strict ? undefined : errorLogger },
|
|
97
111
|
)
|
|
98
112
|
let featureCount = 0
|
|
99
|
-
|
|
100
|
-
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
101
|
-
for await (const f of featureStream) {
|
|
102
|
-
const gff3Feature = f as GFF3Feature
|
|
103
|
-
|
|
113
|
+
for await (const gff3Feature of featureStream) {
|
|
104
114
|
// Add new feature into database
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
try {
|
|
116
|
+
await this.addFeatureIntoDb(gff3Feature, backend)
|
|
117
|
+
} catch (error) {
|
|
118
|
+
// if the first feature is an error, assume the file isn't valid and throw
|
|
119
|
+
if (strict || featureCount === 0) {
|
|
120
|
+
throw error
|
|
121
|
+
}
|
|
122
|
+
errorLogger(error)
|
|
123
|
+
}
|
|
107
124
|
featureCount++
|
|
108
125
|
if (featureCount % 1000 === 0) {
|
|
109
126
|
logger.debug?.(`Processed ${featureCount} features`)
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
|
+
import type { Feature } from '@apollo-annotation/schemas'
|
|
14
14
|
|
|
15
|
-
import { AddFeatureChange } from './AddFeatureChange'
|
|
15
|
+
import { AddFeatureChange } from './AddFeatureChange.js'
|
|
16
16
|
|
|
17
17
|
interface SerializedDeleteFeatureChangeBase extends SerializedFeatureChange {
|
|
18
18
|
typeName: 'DeleteFeatureChange'
|
|
@@ -67,6 +67,12 @@ export class DeleteFeatureChange extends FeatureChange {
|
|
|
67
67
|
const { featureModel, session } = backend
|
|
68
68
|
const { changes, logger } = this
|
|
69
69
|
|
|
70
|
+
const { INDEXED_IDS } = process.env
|
|
71
|
+
let idsToIndex: string[] | undefined
|
|
72
|
+
if (INDEXED_IDS) {
|
|
73
|
+
idsToIndex = INDEXED_IDS.split(',')
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
// Loop the changes
|
|
71
77
|
for (const change of changes) {
|
|
72
78
|
const { deletedFeature, parentFeatureId } = change
|
|
@@ -105,6 +111,18 @@ export class DeleteFeatureChange extends FeatureChange {
|
|
|
105
111
|
featureDoc.allIds = featureDoc.allIds.filter(
|
|
106
112
|
(id) => !deletedIds.includes(id),
|
|
107
113
|
)
|
|
114
|
+
const indexedIds = this.getIndexedIds(featureDoc, idsToIndex)
|
|
115
|
+
if (featureDoc.indexedIds) {
|
|
116
|
+
if (indexedIds.length > 0) {
|
|
117
|
+
featureDoc.indexedIds = indexedIds
|
|
118
|
+
} else {
|
|
119
|
+
delete featureDoc.indexedIds
|
|
120
|
+
}
|
|
121
|
+
} else {
|
|
122
|
+
if (indexedIds.length > 0) {
|
|
123
|
+
featureDoc.indexedIds = indexedIds
|
|
124
|
+
}
|
|
125
|
+
}
|
|
108
126
|
// Save updated document in Mongo
|
|
109
127
|
featureDoc.markModified('children') // Mark as modified. Without this save() -method is not updating data in database
|
|
110
128
|
try {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedFeatureAttributeChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'FeatureAttributeChange'
|
|
@@ -100,11 +100,24 @@ export class FeatureAttributeChange extends FeatureChange {
|
|
|
100
100
|
featuresForChanges.push({ feature: foundFeature, topLevelFeature })
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
const { INDEXED_IDS } = process.env
|
|
104
|
+
let idsToIndex: string[] | undefined
|
|
105
|
+
if (INDEXED_IDS) {
|
|
106
|
+
idsToIndex = INDEXED_IDS.split(',')
|
|
107
|
+
}
|
|
103
108
|
// Let's update objects
|
|
104
109
|
for (const [idx, change] of changes.entries()) {
|
|
105
110
|
const { newAttributes } = change
|
|
106
111
|
const { feature, topLevelFeature } = featuresForChanges[idx]
|
|
112
|
+
const indexedIdsChanged = idsToIndex?.some(
|
|
113
|
+
(id) => id in newAttributes || id in (feature?.attributes ?? {}),
|
|
114
|
+
)
|
|
107
115
|
feature.attributes = newAttributes
|
|
116
|
+
if (indexedIdsChanged) {
|
|
117
|
+
const indexedIds = this.getIndexedIds(topLevelFeature, idsToIndex)
|
|
118
|
+
topLevelFeature.indexedIds = indexedIds
|
|
119
|
+
topLevelFeature.markModified('indexedIds')
|
|
120
|
+
}
|
|
108
121
|
if (topLevelFeature._id.equals(feature._id)) {
|
|
109
122
|
topLevelFeature.markModified('attributes') // Mark as modified. Without this save() -method is not updating data in database
|
|
110
123
|
} else {
|
|
@@ -4,14 +4,11 @@ import {
|
|
|
4
4
|
AssemblySpecificChange,
|
|
5
5
|
type ServerDataStore,
|
|
6
6
|
} from '@apollo-annotation/common'
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
type RefSeqDocument,
|
|
11
|
-
} from '@apollo-annotation/schemas'
|
|
12
|
-
import { type GFF3Feature } from '@gmod/gff'
|
|
7
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
8
|
+
import type { FileDocument, RefSeqDocument } from '@apollo-annotation/schemas'
|
|
9
|
+
import type { GFF3Feature } from '@gmod/gff'
|
|
13
10
|
|
|
14
|
-
import { gff3ToAnnotationFeature } from '../GFF3'
|
|
11
|
+
import { gff3ToAnnotationFeature } from '../GFF3/index.js'
|
|
15
12
|
|
|
16
13
|
export abstract class FromFileBaseChange extends AssemblySpecificChange {
|
|
17
14
|
async addRefSeqIntoDb(
|
|
@@ -37,8 +34,6 @@ export abstract class FromFileBaseChange extends AssemblySpecificChange {
|
|
|
37
34
|
logger.debug?.('starting sequence stream')
|
|
38
35
|
let lineCount = 0
|
|
39
36
|
const decoder = new TextDecoder()
|
|
40
|
-
// @ts-expect-error type is wrong here
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/await-thenable
|
|
42
37
|
for await (const data of sequenceStream) {
|
|
43
38
|
const chunk = decoder.decode(data)
|
|
44
39
|
lastLineIsIncomplete = !chunk.endsWith('\n')
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedLocationEndChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'LocationEndChange'
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedLocationStartChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'LocationStartChange'
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
type SerializedFeatureChange,
|
|
11
11
|
type ServerDataStore,
|
|
12
12
|
} from '@apollo-annotation/common'
|
|
13
|
-
import {
|
|
13
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
14
14
|
|
|
15
|
-
import { attributesToRecords, stringifyAttributes } from '../util'
|
|
15
|
+
import { attributesToRecords, stringifyAttributes } from '../util.js'
|
|
16
16
|
|
|
17
|
-
import { findAndDeleteChildFeature } from './DeleteFeatureChange'
|
|
18
|
-
import { UndoMergeExonsChange } from './UndoMergeExonsChange'
|
|
17
|
+
import { findAndDeleteChildFeature } from './DeleteFeatureChange.js'
|
|
18
|
+
import { UndoMergeExonsChange } from './UndoMergeExonsChange.js'
|
|
19
19
|
|
|
20
20
|
interface SerializedMergeExonsChangeBase extends SerializedFeatureChange {
|
|
21
21
|
typeName: 'MergeExonsChange'
|
|
@@ -10,18 +10,18 @@ import {
|
|
|
10
10
|
type SerializedFeatureChange,
|
|
11
11
|
type ServerDataStore,
|
|
12
12
|
} from '@apollo-annotation/common'
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import type {
|
|
14
|
+
AnnotationFeature,
|
|
15
|
+
AnnotationFeatureSnapshot,
|
|
16
16
|
} from '@apollo-annotation/mst'
|
|
17
|
-
import {
|
|
17
|
+
import type { Feature } from '@apollo-annotation/schemas'
|
|
18
18
|
import { doesIntersect2 } from '@jbrowse/core/util'
|
|
19
|
-
import { getSnapshot } from 'mobx-state-tree'
|
|
19
|
+
import { getSnapshot } from '@jbrowse/mobx-state-tree'
|
|
20
20
|
|
|
21
|
-
import { attributesToRecords, stringifyAttributes } from '../util'
|
|
21
|
+
import { attributesToRecords, stringifyAttributes } from '../util.js'
|
|
22
22
|
|
|
23
|
-
import { findAndDeleteChildFeature } from './DeleteFeatureChange'
|
|
24
|
-
import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange'
|
|
23
|
+
import { findAndDeleteChildFeature } from './DeleteFeatureChange.js'
|
|
24
|
+
import { UndoMergeTranscriptsChange } from './UndoMergeTranscriptsChange.js'
|
|
25
25
|
|
|
26
26
|
interface SerializedMergeTranscriptsChangeBase extends SerializedFeatureChange {
|
|
27
27
|
typeName: 'MergeTranscriptsChange'
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
13
|
|
|
14
|
-
import { findAndDeleteChildFeature } from './DeleteFeatureChange'
|
|
15
|
-
import { UndoSplitExonChange } from './UndoSplitExonChange'
|
|
14
|
+
import { findAndDeleteChildFeature } from './DeleteFeatureChange.js'
|
|
15
|
+
import { UndoSplitExonChange } from './UndoSplitExonChange.js'
|
|
16
16
|
|
|
17
17
|
interface SerializedSplitExonChangeBase extends SerializedFeatureChange {
|
|
18
18
|
typeName: 'SplitExonChange'
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedStrandChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'StrandChange'
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type SerializedFeatureChange,
|
|
10
10
|
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import {
|
|
12
|
+
import type { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedTypeChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'TypeChange'
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
type SerializedFeatureChange,
|
|
9
9
|
type ServerDataStore,
|
|
10
10
|
} from '@apollo-annotation/common'
|
|
11
|
-
import {
|
|
11
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
12
12
|
|
|
13
|
-
import { MergeExonsChange } from './MergeExonsChange'
|
|
13
|
+
import { MergeExonsChange } from './MergeExonsChange.js'
|
|
14
14
|
|
|
15
15
|
interface SerializedUndoMergeExonsChangeBase extends SerializedFeatureChange {
|
|
16
16
|
typeName: 'UndoMergeExonsChange'
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
type SerializedFeatureChange,
|
|
9
9
|
type ServerDataStore,
|
|
10
10
|
} from '@apollo-annotation/common'
|
|
11
|
-
import {
|
|
11
|
+
import type { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
12
12
|
|
|
13
|
-
import { MergeTranscriptsChange } from './MergeTranscriptsChange'
|
|
13
|
+
import { MergeTranscriptsChange } from './MergeTranscriptsChange.js'
|
|
14
14
|
|
|
15
15
|
interface SerializedUndoMergeTranscriptsChangeBase
|
|
16
16
|
extends SerializedFeatureChange {
|