@apollo-annotation/common 0.3.8 → 0.3.10
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/AssemblySpecificChange.d.ts +2 -0
- package/dist/AssemblySpecificChange.js +17 -1
- package/dist/AssemblySpecificChange.js.map +1 -1
- package/dist/Change.d.ts +1 -1
- package/dist/Operation.d.ts +5 -3
- package/dist/Operation.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/AssemblySpecificChange.ts +22 -0
- package/src/Change.ts +1 -1
- package/src/Operation.ts +6 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst';
|
|
1
2
|
import { Change, type ChangeOptions, type SerializedChange } from './Change';
|
|
2
3
|
export interface SerializedAssemblySpecificChange extends SerializedChange {
|
|
3
4
|
assembly: string;
|
|
@@ -6,4 +7,5 @@ export declare function isAssemblySpecificChange(thing: any): thing is AssemblyS
|
|
|
6
7
|
export declare abstract class AssemblySpecificChange extends Change {
|
|
7
8
|
assembly: string;
|
|
8
9
|
constructor(json: SerializedAssemblySpecificChange, options?: ChangeOptions);
|
|
10
|
+
getIndexedIds(feature: AnnotationFeatureSnapshot, idsToIndex: string[] | undefined): string[];
|
|
9
11
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AssemblySpecificChange = void 0;
|
|
4
4
|
exports.isAssemblySpecificChange = isAssemblySpecificChange;
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
6
5
|
const Change_1 = require("./Change");
|
|
7
6
|
function isAssemblySpecificChange(
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14,6 +13,23 @@ class AssemblySpecificChange extends Change_1.Change {
|
|
|
14
13
|
super(json, options);
|
|
15
14
|
this.assembly = json.assembly;
|
|
16
15
|
}
|
|
16
|
+
getIndexedIds(feature, idsToIndex) {
|
|
17
|
+
var _a;
|
|
18
|
+
const indexedIds = [];
|
|
19
|
+
for (const additionalId of idsToIndex !== null && idsToIndex !== void 0 ? idsToIndex : []) {
|
|
20
|
+
const idValue = (_a = feature.attributes) === null || _a === void 0 ? void 0 : _a[additionalId];
|
|
21
|
+
if (idValue) {
|
|
22
|
+
indexedIds.push(idValue[0]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (feature.children) {
|
|
26
|
+
for (const child of Object.values(feature.children)) {
|
|
27
|
+
const childIndexedIds = this.getIndexedIds(child, idsToIndex);
|
|
28
|
+
indexedIds.push(...childIndexedIds);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return indexedIds;
|
|
32
|
+
}
|
|
17
33
|
}
|
|
18
34
|
exports.AssemblySpecificChange = AssemblySpecificChange;
|
|
19
35
|
//# sourceMappingURL=AssemblySpecificChange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssemblySpecificChange.js","sourceRoot":"","sources":["../src/AssemblySpecificChange.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AssemblySpecificChange.js","sourceRoot":"","sources":["../src/AssemblySpecificChange.ts"],"names":[],"mappings":";;;AAcA,4DAOC;AAlBD,qCAKiB;AAMjB,SAAgB,wBAAwB;AACtC,8DAA8D;AAC9D,KAAU;IAEV,OAAO,CACL,IAAA,iBAAQ,EAAC,KAAK,CAAC,IAAK,KAAgC,CAAC,QAAQ,KAAK,SAAS,CAC5E,CAAA;AACH,CAAC;AAED,MAAsB,sBAAuB,SAAQ,eAAM;IAGzD,YAAY,IAAsC,EAAE,OAAuB;QACzE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAED,aAAa,CACX,OAAkC,EAClC,UAAgC;;QAEhC,MAAM,UAAU,GAAa,EAAE,CAAA;QAC/B,KAAK,MAAM,YAAY,IAAI,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,EAAE,EAAE,CAAC;YAC5C,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,UAAU,0CAAG,YAAY,CAAC,CAAA;YAClD,IAAI,OAAO,EAAE,CAAC;gBACZ,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7B,CAAC;QACH,CAAC;QACD,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACrB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACpD,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,CAAC,CAAA;gBAC7D,UAAU,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAA;YACrC,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AA3BD,wDA2BC"}
|
package/dist/Change.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ClientDataStore {
|
|
|
7
7
|
checkResults: Map<string | number, CheckResultI>;
|
|
8
8
|
internetAccounts: AppRootModel['internetAccounts'];
|
|
9
9
|
getInternetAccount(assemblyName?: string, internetAccountId?: string): AppRootModel['internetAccounts'][0];
|
|
10
|
-
loadFeatures(regions: Region[]): void
|
|
10
|
+
loadFeatures(regions: Region[]): Promise<void>;
|
|
11
11
|
loadRefSeq(regions: Region[]): void;
|
|
12
12
|
getFeature(featureId: string): AnnotationFeature | undefined;
|
|
13
13
|
addFeature(assemblyId: string, feature: AnnotationFeatureSnapshot): void;
|
package/dist/Operation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ReadStream } from 'node:fs';
|
|
2
1
|
import { type FileHandle } from 'node:fs/promises';
|
|
3
2
|
import { type AssemblyDocument, type CheckDocument, type FeatureDocument, type FileDocument, type JBrowseConfigDocument, type RefSeqChunkDocument, type RefSeqDocument, type UserDocument } from '@apollo-annotation/schemas';
|
|
3
|
+
import { type GFF3Feature } from '@gmod/gff';
|
|
4
4
|
import { type LoggerService } from '@nestjs/common';
|
|
5
5
|
import { type GenericFilehandle } from 'generic-filehandle';
|
|
6
6
|
import { type ClientSession, type Model } from 'mongoose';
|
|
@@ -27,9 +27,11 @@ export interface ServerDataStore {
|
|
|
27
27
|
jbrowseConfigModel: Model<JBrowseConfigDocument>;
|
|
28
28
|
session: ClientSession;
|
|
29
29
|
filesService: {
|
|
30
|
-
getFileStream(file: FileDocument):
|
|
30
|
+
getFileStream(file: FileDocument): ReadableStream<Uint8Array>;
|
|
31
31
|
getFileHandle(file: FileDocument): GenericFilehandle;
|
|
32
|
-
parseGFF3(stream:
|
|
32
|
+
parseGFF3(stream: ReadableStream<Uint8Array>, parseOptions?: {
|
|
33
|
+
bufferSize?: number;
|
|
34
|
+
}): ReadableStream<GFF3Feature>;
|
|
33
35
|
create(createFileDto: CreateFileDto): void;
|
|
34
36
|
remove(id: string): void;
|
|
35
37
|
};
|
package/dist/Operation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.js","sourceRoot":"","sources":["../src/Operation.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Operation.js","sourceRoot":"","sources":["../src/Operation.ts"],"names":[],"mappings":";;;AA4EA,MAAsB,SAAS;IAI7B,YAAY,IAAyB,EAAE,OAA0B;;QAC/D,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,OAAO,CAAA;IAC1C,CAAC;IAID,KAAK,CAAC,OAAO,CAAC,OAAyB;QACrC,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAA;QACpC,IAAI,WAAW,KAAK,QAAQ,EAAE,CAAC;YAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAA;YACnD,OAAO,OAAO,CAAC,cAAc,CAAC,sBAAsB,CAClD,GAAG,IAAI,CAAC,QAAQ,mBAAmB,EACnC,aAAa,EACb,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAC7B,CAAA;QACH,CAAC;QACD,IAAI,WAAW,KAAK,WAAW,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;QACzC,CAAC;QACD,MAAM,IAAI,KAAK,CACb,iDAAiD,WAAW,GAAG,CAChE,CAAA;IACH,CAAC;CAIF;AA9BD,8BA8BC"}
|