@apollo-annotation/shared 0.3.5 → 0.3.6
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/AddAssemblyAndFeaturesFromFileChange.d.ts +1 -1
- package/dist/Changes/AddAssemblyFromExternalChange.d.ts +1 -1
- package/dist/Changes/AddAssemblyFromFileChange.d.ts +1 -1
- package/dist/Changes/AddFeatureChange.d.ts +2 -2
- package/dist/Changes/AddFeaturesFromFileChange.d.ts +1 -1
- package/dist/Changes/AddRefSeqAliasesChange.d.ts +1 -1
- package/dist/Changes/DeleteAssemblyChange.d.ts +1 -1
- package/dist/Changes/DeleteFeatureChange.d.ts +3 -3
- package/dist/Changes/DeleteUserChange.d.ts +1 -1
- package/dist/Changes/FeatureAttributeChange.d.ts +1 -1
- package/dist/Changes/FromFileBaseChange.d.ts +3 -3
- package/dist/Changes/FromFileBaseChange.js.map +1 -1
- package/dist/Changes/ImportJBrowseConfigChange.d.ts +1 -1
- package/dist/Changes/LocationEndChange.d.ts +1 -1
- package/dist/Changes/LocationStartChange.d.ts +1 -1
- package/dist/Changes/StrandChange.d.ts +1 -1
- package/dist/Changes/TypeChange.d.ts +1 -1
- package/dist/Changes/UserChange.d.ts +1 -1
- package/dist/Checks/CDSCheck.d.ts +1 -1
- package/dist/GFF3/annotationFeatureToGFF3.d.ts +2 -2
- package/dist/GFF3/annotationFeatureToGFF3.test.js +1 -1
- package/dist/GFF3/annotationFeatureToGFF3.test.js.map +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.d.ts +2 -2
- package/dist/GFF3/gff3ToAnnotationFeature.test.d.ts +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.test.js +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.test.js.map +1 -1
- package/dist/GFF3/gffReservedKeys.d.ts +7 -0
- package/dist/GFF3/gffReservedKeys.js +21 -1
- package/dist/GFF3/gffReservedKeys.js.map +1 -1
- package/dist/Messages.d.ts +2 -2
- package/dist/Operations/GetAssembliesOperation.d.ts +1 -1
- package/dist/Operations/GetFeaturesOperation.d.ts +1 -1
- package/dist/Validations/CoreValidation.d.ts +2 -2
- package/dist/Validations/CoreValidation.js +1 -1
- package/dist/Validations/CoreValidation.js.map +1 -1
- package/dist/Validations/ParentChildValidation.d.ts +5 -5
- package/dist/Validations/ParentChildValidation.js.map +1 -1
- package/dist/Validations/Validation.d.ts +5 -5
- package/dist/Validations/ValidationSet.d.ts +4 -4
- package/dist/Validations/ValidationSet.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/Changes/AddAssemblyAndFeaturesFromFileChange.ts +6 -6
- package/src/Changes/AddAssemblyFromExternalChange.ts +5 -5
- package/src/Changes/AddAssemblyFromFileChange.ts +5 -5
- package/src/Changes/AddFeatureChange.ts +6 -6
- package/src/Changes/AddFeaturesFromFileChange.ts +6 -6
- package/src/Changes/AddRefSeqAliasesChange.ts +6 -6
- package/src/Changes/DeleteAssemblyChange.ts +4 -4
- package/src/Changes/DeleteFeatureChange.ts +7 -7
- package/src/Changes/DeleteUserChange.ts +5 -5
- package/src/Changes/FeatureAttributeChange.ts +6 -6
- package/src/Changes/FromFileBaseChange.ts +6 -3
- package/src/Changes/ImportJBrowseConfigChange.ts +4 -4
- package/src/Changes/LocationEndChange.ts +6 -6
- package/src/Changes/LocationStartChange.ts +6 -6
- package/src/Changes/StrandChange.ts +6 -6
- package/src/Changes/TypeChange.ts +6 -6
- package/src/Changes/UserChange.ts +5 -5
- package/src/Checks/CDSCheck.ts +2 -2
- package/src/GFF3/annotationFeatureToGFF3.test.ts +4 -2
- package/src/GFF3/annotationFeatureToGFF3.ts +4 -4
- package/src/GFF3/gff3ToAnnotationFeature.test.ts +3 -3
- package/src/GFF3/gff3ToAnnotationFeature.ts +2 -2
- package/src/GFF3/gffReservedKeys.ts +25 -0
- package/src/Messages.ts +2 -2
- package/src/Operations/GetAssembliesOperation.ts +3 -3
- package/src/Operations/GetFeaturesOperation.ts +4 -4
- package/src/Validations/CoreValidation.ts +4 -3
- package/src/Validations/ParentChildValidation.ts +7 -6
- package/src/Validations/Validation.ts +5 -5
- package/src/Validations/ValidationSet.ts +8 -4
- package/test_data/example01.json +3 -3
- package/test_data/example02.json +3 -3
- package/test_data/example04.json +3 -3
- package/test_data/gene_representations.gff3 +686 -1686
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apollo-annotation/shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn clean && tsc --build",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"test:ci": "NODE_V8_COVERAGE=./coverage glob -c \"tsx --test --test-reporter spec --experimental-test-coverage \" \"**/*.test.ts\""
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@apollo-annotation/common": "^0.3.
|
|
14
|
-
"@apollo-annotation/mst": "^0.3.
|
|
15
|
-
"@apollo-annotation/schemas": "^0.3.
|
|
13
|
+
"@apollo-annotation/common": "^0.3.6",
|
|
14
|
+
"@apollo-annotation/mst": "^0.3.6",
|
|
15
|
+
"@apollo-annotation/schemas": "^0.3.6",
|
|
16
16
|
"@gmod/gff": "1.2.0",
|
|
17
17
|
"@gmod/indexedfasta": "^2.0.4",
|
|
18
18
|
"@jbrowse/core": "^3.0.1",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
SerializedAssemblySpecificChange,
|
|
8
|
-
ServerDataStore,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type SerializedAssemblySpecificChange,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
|
-
import { GFF3Feature } from '@gmod/gff'
|
|
10
|
+
import { type GFF3Feature } from '@gmod/gff'
|
|
11
11
|
|
|
12
12
|
import { FromFileBaseChange } from './FromFileBaseChange'
|
|
13
13
|
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/require-await */
|
|
5
5
|
import {
|
|
6
6
|
AssemblySpecificChange,
|
|
7
|
-
ChangeOptions,
|
|
8
|
-
ClientDataStore,
|
|
9
|
-
LocalGFF3DataStore,
|
|
10
|
-
SerializedAssemblySpecificChange,
|
|
11
|
-
ServerDataStore,
|
|
7
|
+
type ChangeOptions,
|
|
8
|
+
type ClientDataStore,
|
|
9
|
+
type LocalGFF3DataStore,
|
|
10
|
+
type SerializedAssemblySpecificChange,
|
|
11
|
+
type ServerDataStore,
|
|
12
12
|
} from '@apollo-annotation/common'
|
|
13
13
|
import { BgzipIndexedFasta, IndexedFasta } from '@gmod/indexedfasta'
|
|
14
14
|
import { RemoteFile } from 'generic-filehandle'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
import {
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
SerializedAssemblySpecificChange,
|
|
8
|
-
ServerDataStore,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type SerializedAssemblySpecificChange,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
10
|
import { BgzipIndexedFasta } from '@gmod/indexedfasta'
|
|
11
11
|
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
/* eslint-disable @typescript-eslint/require-await */
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
5
5
|
import {
|
|
6
|
-
ChangeOptions,
|
|
7
|
-
ClientDataStore,
|
|
6
|
+
type ChangeOptions,
|
|
7
|
+
type ClientDataStore,
|
|
8
8
|
FeatureChange,
|
|
9
|
-
LocalGFF3DataStore,
|
|
10
|
-
SerializedFeatureChange,
|
|
11
|
-
ServerDataStore,
|
|
9
|
+
type LocalGFF3DataStore,
|
|
10
|
+
type SerializedFeatureChange,
|
|
11
|
+
type ServerDataStore,
|
|
12
12
|
} from '@apollo-annotation/common'
|
|
13
|
-
import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
14
14
|
|
|
15
15
|
import { DeleteFeatureChange } from './DeleteFeatureChange'
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
|
-
ChangeOptions,
|
|
4
|
-
ClientDataStore,
|
|
5
|
-
LocalGFF3DataStore,
|
|
6
|
-
SerializedAssemblySpecificChange,
|
|
7
|
-
ServerDataStore,
|
|
3
|
+
type ChangeOptions,
|
|
4
|
+
type ClientDataStore,
|
|
5
|
+
type LocalGFF3DataStore,
|
|
6
|
+
type SerializedAssemblySpecificChange,
|
|
7
|
+
type ServerDataStore,
|
|
8
8
|
} from '@apollo-annotation/common'
|
|
9
|
-
import { GFF3Feature } from '@gmod/gff'
|
|
9
|
+
import { type GFF3Feature } from '@gmod/gff'
|
|
10
10
|
|
|
11
11
|
import { FromFileBaseChange } from './FromFileBaseChange'
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AssemblySpecificChange,
|
|
3
|
-
Change,
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
SerializedAssemblySpecificChange,
|
|
8
|
-
ServerDataStore,
|
|
3
|
+
type Change,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type SerializedAssemblySpecificChange,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
10
|
import { getSession } from '@jbrowse/core/util'
|
|
11
11
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
5
5
|
import {
|
|
6
6
|
AssemblySpecificChange,
|
|
7
|
-
ClientDataStore,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedAssemblySpecificChange,
|
|
10
|
-
ServerDataStore,
|
|
7
|
+
type ClientDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedAssemblySpecificChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
12
|
import { getSession } from '@jbrowse/core/util'
|
|
13
13
|
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
|
-
import { Feature } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
13
|
+
import { type Feature } from '@apollo-annotation/schemas'
|
|
14
14
|
|
|
15
15
|
import { AddFeatureChange } from './AddFeatureChange'
|
|
16
16
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
3
|
Change,
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
SerializedChange,
|
|
8
|
-
ServerDataStore,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type SerializedChange,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
10
|
|
|
11
11
|
export interface SerializedDeleteUserChangeBase extends SerializedChange {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedFeatureAttributeChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'FeatureAttributeChange'
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
6
6
|
import {
|
|
7
7
|
AssemblySpecificChange,
|
|
8
|
-
ServerDataStore,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import {
|
|
11
|
+
type FileDocument,
|
|
12
|
+
type RefSeqDocument,
|
|
13
|
+
} from '@apollo-annotation/schemas'
|
|
14
|
+
import { type GFF3Feature } from '@gmod/gff'
|
|
12
15
|
|
|
13
16
|
import { gff3ToAnnotationFeature } from '../GFF3'
|
|
14
17
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
3
|
Change,
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
ServerDataStore,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type ServerDataStore,
|
|
8
8
|
} from '@apollo-annotation/common'
|
|
9
9
|
|
|
10
10
|
interface JBrowseAssembly {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedLocationEndChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'LocationEndChange'
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedLocationStartChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'LocationStartChange'
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedStrandChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'StrandChange'
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
3
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
4
4
|
import {
|
|
5
|
-
ChangeOptions,
|
|
6
|
-
ClientDataStore,
|
|
5
|
+
type ChangeOptions,
|
|
6
|
+
type ClientDataStore,
|
|
7
7
|
FeatureChange,
|
|
8
|
-
LocalGFF3DataStore,
|
|
9
|
-
SerializedFeatureChange,
|
|
10
|
-
ServerDataStore,
|
|
8
|
+
type LocalGFF3DataStore,
|
|
9
|
+
type SerializedFeatureChange,
|
|
10
|
+
type ServerDataStore,
|
|
11
11
|
} from '@apollo-annotation/common'
|
|
12
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
12
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
13
13
|
|
|
14
14
|
interface SerializedTypeChangeBase extends SerializedFeatureChange {
|
|
15
15
|
typeName: 'TypeChange'
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
3
|
Change,
|
|
4
|
-
ChangeOptions,
|
|
5
|
-
ClientDataStore,
|
|
6
|
-
LocalGFF3DataStore,
|
|
7
|
-
SerializedChange,
|
|
8
|
-
ServerDataStore,
|
|
4
|
+
type ChangeOptions,
|
|
5
|
+
type ClientDataStore,
|
|
6
|
+
type LocalGFF3DataStore,
|
|
7
|
+
type SerializedChange,
|
|
8
|
+
type ServerDataStore,
|
|
9
9
|
} from '@apollo-annotation/common'
|
|
10
10
|
|
|
11
11
|
export interface SerializedUserChangeBase extends SerializedChange {
|
package/src/Checks/CDSCheck.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Check } from '@apollo-annotation/common'
|
|
2
2
|
import {
|
|
3
|
-
AnnotationFeatureSnapshot,
|
|
4
|
-
CheckResultSnapshot,
|
|
3
|
+
type AnnotationFeatureSnapshot,
|
|
4
|
+
type CheckResultSnapshot,
|
|
5
5
|
} from '@apollo-annotation/mst'
|
|
6
6
|
import { intersection2 } from '@jbrowse/core/util'
|
|
7
7
|
import ObjectID from 'bson-objectid'
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/* eslint-disable prefer-destructuring */
|
|
2
2
|
/* eslint-disable @typescript-eslint/no-floating-promises */
|
|
3
3
|
import { describe, it } from 'node:test'
|
|
4
|
+
|
|
5
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
4
6
|
import { assert } from 'chai'
|
|
5
|
-
|
|
7
|
+
|
|
6
8
|
import { annotationFeatureToGFF3 } from './annotationFeatureToGFF3'
|
|
7
|
-
import {
|
|
9
|
+
import { readAnnotationFeatureSnapshot } from './gff3ToAnnotationFeature.test'
|
|
8
10
|
|
|
9
11
|
describe('annotationFeatureToGFF3', () => {
|
|
10
12
|
it('Test mandatory columns', () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
AnnotationFeatureSnapshot,
|
|
5
|
-
TranscriptPartLocation,
|
|
6
|
-
TranscriptPartNonCoding,
|
|
4
|
+
type AnnotationFeatureSnapshot,
|
|
5
|
+
type TranscriptPartLocation,
|
|
6
|
+
type TranscriptPartNonCoding,
|
|
7
7
|
} from '@apollo-annotation/mst'
|
|
8
|
-
import { GFF3Feature } from '@gmod/gff'
|
|
8
|
+
import { type GFF3Feature } from '@gmod/gff'
|
|
9
9
|
import { intersection2 } from '@jbrowse/core/util'
|
|
10
10
|
|
|
11
11
|
export function annotationFeatureToGFF3(
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-floating-promises */
|
|
2
|
-
import { describe, it } from 'node:test'
|
|
3
2
|
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { describe, it } from 'node:test'
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
6
|
+
import gff, { type GFF3Feature } from '@gmod/gff'
|
|
6
7
|
import { assert, use } from 'chai'
|
|
7
8
|
import chaiExclude from 'chai-exclude'
|
|
8
9
|
|
|
9
10
|
import { gff3ToAnnotationFeature } from './gff3ToAnnotationFeature'
|
|
10
|
-
import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
11
11
|
|
|
12
12
|
use(chaiExclude)
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
2
|
-
import { GFF3Feature, GFF3FeatureLineWithRefs } from '@gmod/gff'
|
|
1
|
+
import { type AnnotationFeatureSnapshot } from '@apollo-annotation/mst'
|
|
2
|
+
import { type GFF3Feature, type GFF3FeatureLineWithRefs } from '@gmod/gff'
|
|
3
3
|
import { doesIntersect2 } from '@jbrowse/core/util'
|
|
4
4
|
import ObjectID from 'bson-objectid'
|
|
5
5
|
|
|
@@ -59,3 +59,28 @@ export const internalToGFF: Record<GFFInternalAttribute, GFFReservedAttribute> =
|
|
|
59
59
|
gff_ontology_term: 'Ontology_term',
|
|
60
60
|
gff_is_circular: 'Is_circular',
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
export function isGFFInternalAttribute(
|
|
64
|
+
attribute: string,
|
|
65
|
+
): attribute is GFFInternalAttribute {
|
|
66
|
+
return attribute in internalToGFF
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type GFFColumn = 'score' | 'source'
|
|
70
|
+
export type GFFColumnInternal = 'gff_score' | 'gff_source'
|
|
71
|
+
export const gffColumnToInternal: Record<GFFColumn, GFFColumnInternal> = {
|
|
72
|
+
score: 'gff_score',
|
|
73
|
+
source: 'gff_source',
|
|
74
|
+
}
|
|
75
|
+
export function isGFFColumn(attribute: string): attribute is GFFColumn {
|
|
76
|
+
return attribute in gffColumnToInternal
|
|
77
|
+
}
|
|
78
|
+
export const gffInternalToColumn: Record<GFFColumnInternal, GFFColumn> = {
|
|
79
|
+
gff_score: 'score',
|
|
80
|
+
gff_source: 'source',
|
|
81
|
+
}
|
|
82
|
+
export function isGFFColumnInternal(
|
|
83
|
+
column: string,
|
|
84
|
+
): column is GFFColumnInternal {
|
|
85
|
+
return column in gffInternalToColumn
|
|
86
|
+
}
|
package/src/Messages.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SerializedChange } from '@apollo-annotation/common'
|
|
2
|
-
import { CheckResultSnapshot } from '@apollo-annotation/mst'
|
|
1
|
+
import { type SerializedChange } from '@apollo-annotation/common'
|
|
2
|
+
import { type CheckResultSnapshot } from '@apollo-annotation/mst'
|
|
3
3
|
|
|
4
4
|
interface BaseMessage {
|
|
5
5
|
channel: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
|
-
LocalGFF3DataStore,
|
|
3
|
+
type LocalGFF3DataStore,
|
|
4
4
|
Operation,
|
|
5
|
-
SerializedOperation,
|
|
6
|
-
ServerDataStore,
|
|
5
|
+
type SerializedOperation,
|
|
6
|
+
type ServerDataStore,
|
|
7
7
|
} from '@apollo-annotation/common'
|
|
8
8
|
|
|
9
9
|
interface SerializedGetAssembliesOperation extends SerializedOperation {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
2
|
import {
|
|
3
|
-
LocalGFF3DataStore,
|
|
3
|
+
type LocalGFF3DataStore,
|
|
4
4
|
Operation,
|
|
5
|
-
OperationOptions,
|
|
6
|
-
SerializedOperation,
|
|
7
|
-
ServerDataStore,
|
|
5
|
+
type OperationOptions,
|
|
6
|
+
type SerializedOperation,
|
|
7
|
+
type ServerDataStore,
|
|
8
8
|
} from '@apollo-annotation/common'
|
|
9
9
|
|
|
10
10
|
interface SerializedGetFeaturesOperation extends SerializedOperation {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/require-await */
|
|
2
|
-
import { Change } from '@apollo-annotation/common'
|
|
2
|
+
import { type Change } from '@apollo-annotation/common'
|
|
3
|
+
|
|
4
|
+
import { type TypeChange } from '../Changes'
|
|
3
5
|
|
|
4
|
-
import { TypeChange } from '../Changes'
|
|
5
|
-
import soSequenceTypes from './soSequenceTypes'
|
|
6
6
|
import { Validation } from './Validation'
|
|
7
|
+
import soSequenceTypes from './soSequenceTypes'
|
|
7
8
|
|
|
8
9
|
export function isTypeChange(thing: Change): thing is TypeChange {
|
|
9
10
|
return 'oldType' in thing && 'newType' in thing
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
2
|
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
|
3
|
-
import { Change } from '@apollo-annotation/common'
|
|
4
|
-
import { Feature, FeatureDocument } from '@apollo-annotation/schemas'
|
|
5
|
-
import { ClientSession, Model } from 'mongoose'
|
|
3
|
+
import { type Change } from '@apollo-annotation/common'
|
|
4
|
+
import { type Feature, type FeatureDocument } from '@apollo-annotation/schemas'
|
|
5
|
+
import { type ClientSession, type Model } from 'mongoose'
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
LocationEndChange,
|
|
9
|
-
LocationStartChange,
|
|
8
|
+
type LocationEndChange,
|
|
9
|
+
type LocationStartChange,
|
|
10
10
|
isLocationEndChange,
|
|
11
11
|
isLocationStartChange,
|
|
12
12
|
} from '../Changes'
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
import { Validation, type ValidationResult } from './Validation'
|
|
14
15
|
|
|
15
16
|
export class ParentChildValidation extends Validation {
|
|
16
17
|
name = 'ParentChildValidation' as const
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
2
2
|
/* eslint-disable @typescript-eslint/require-await */
|
|
3
|
-
import { Change, ClientDataStore } from '@apollo-annotation/common'
|
|
4
|
-
import { FeatureDocument } from '@apollo-annotation/schemas'
|
|
5
|
-
import type
|
|
6
|
-
import type
|
|
7
|
-
import { ClientSession, Model } from 'mongoose'
|
|
3
|
+
import { type Change, type ClientDataStore } from '@apollo-annotation/common'
|
|
4
|
+
import { type FeatureDocument } from '@apollo-annotation/schemas'
|
|
5
|
+
import { type ExecutionContext } from '@nestjs/common'
|
|
6
|
+
import { type Reflector } from '@nestjs/core'
|
|
7
|
+
import { type ClientSession, type Model } from 'mongoose'
|
|
8
8
|
|
|
9
9
|
export interface Context {
|
|
10
10
|
context: ExecutionContext
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Change, ClientDataStore } from '@apollo-annotation/common'
|
|
2
|
-
import { FeatureDocument } from '@apollo-annotation/schemas'
|
|
3
|
-
import { ClientSession, Model } from 'mongoose'
|
|
1
|
+
import { type Change, type ClientDataStore } from '@apollo-annotation/common'
|
|
2
|
+
import { type FeatureDocument } from '@apollo-annotation/schemas'
|
|
3
|
+
import { type ClientSession, type Model } from 'mongoose'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
type Context,
|
|
7
|
+
type Validation,
|
|
8
|
+
type ValidationResult,
|
|
9
|
+
} from './Validation'
|
|
6
10
|
|
|
7
11
|
export class ValidationResultSet {
|
|
8
12
|
results: ValidationResult[] = []
|
package/test_data/example01.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"refSeq": "chr1",
|
|
31
31
|
"type": "exon",
|
|
32
32
|
"min": 1049,
|
|
33
|
-
"max":
|
|
33
|
+
"max": 1499,
|
|
34
34
|
"strand": 1,
|
|
35
35
|
"attributes": {
|
|
36
36
|
"gff_id": ["exon10002"]
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"refSeq": "chr1",
|
|
101
101
|
"type": "exon",
|
|
102
102
|
"min": 1049,
|
|
103
|
-
"max":
|
|
103
|
+
"max": 1499,
|
|
104
104
|
"strand": 1,
|
|
105
105
|
"attributes": {
|
|
106
106
|
"gff_id": ["exon10002"]
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"refSeq": "chr1",
|
|
160
160
|
"type": "exon",
|
|
161
161
|
"min": 1299,
|
|
162
|
-
"max":
|
|
162
|
+
"max": 1499,
|
|
163
163
|
"strand": 1,
|
|
164
164
|
"attributes": {
|
|
165
165
|
"gff_id": ["exon10001"]
|
package/test_data/example02.json
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"refSeq": "chr1",
|
|
20
20
|
"type": "exon",
|
|
21
21
|
"min": 11049,
|
|
22
|
-
"max":
|
|
22
|
+
"max": 11499,
|
|
23
23
|
"strand": 1,
|
|
24
24
|
"attributes": {
|
|
25
25
|
"gff_id": ["exon20001"]
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"refSeq": "chr1",
|
|
90
90
|
"type": "exon",
|
|
91
91
|
"min": 11049,
|
|
92
|
-
"max":
|
|
92
|
+
"max": 11499,
|
|
93
93
|
"strand": 1,
|
|
94
94
|
"attributes": {
|
|
95
95
|
"gff_id": ["exon20002"]
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"refSeq": "chr1",
|
|
149
149
|
"type": "exon",
|
|
150
150
|
"min": 11299,
|
|
151
|
-
"max":
|
|
151
|
+
"max": 11499,
|
|
152
152
|
"strand": 1,
|
|
153
153
|
"attributes": {
|
|
154
154
|
"gff_id": ["exon20003"]
|