@apollo-annotation/shared 0.3.9 → 0.3.11
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/AddFeatureChange.js +13 -2
- package/dist/Changes/AddFeatureChange.js.map +1 -1
- package/dist/Changes/DeleteFeatureChange.js +19 -0
- package/dist/Changes/DeleteFeatureChange.js.map +1 -1
- package/dist/Changes/FeatureAttributeChange.js +11 -0
- package/dist/Changes/FeatureAttributeChange.js.map +1 -1
- package/dist/Changes/FromFileBaseChange.d.ts +2 -0
- package/dist/Changes/FromFileBaseChange.js +20 -5
- package/dist/Changes/FromFileBaseChange.js.map +1 -1
- package/dist/GFF3/annotationFeatureToGFF3.test.js +19 -5
- package/dist/GFF3/annotationFeatureToGFF3.test.js.map +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.d.ts +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.js +8 -11
- package/dist/GFF3/gff3ToAnnotationFeature.js.map +1 -1
- package/dist/GFF3/gff3ToAnnotationFeature.test.d.ts +1 -2
- package/dist/GFF3/gff3ToAnnotationFeature.test.js +23 -96
- package/dist/GFF3/gff3ToAnnotationFeature.test.js.map +1 -1
- package/dist/GFF3/testUtil.d.ts +6 -0
- package/dist/GFF3/testUtil.js +24 -0
- package/dist/GFF3/testUtil.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/Changes/AddFeatureChange.ts +14 -2
- package/src/Changes/DeleteFeatureChange.ts +18 -0
- package/src/Changes/FeatureAttributeChange.ts +13 -0
- package/src/Changes/FromFileBaseChange.ts +22 -10
- package/src/GFF3/annotationFeatureToGFF3.test.ts +24 -2
- package/src/GFF3/gff3ToAnnotationFeature.test.ts +24 -95
- package/src/GFF3/gff3ToAnnotationFeature.ts +6 -15
- package/src/GFF3/testUtil.ts +25 -0
- package/test_data/gene_with_two_cds.gff3 +6 -0
- package/test_data/gene_with_two_cds.json +69 -0
- package/test_data/single_feature_no_children.gff3 +1 -0
- package/test_data/single_feature_no_children.json +14 -0
- package/test_data/single_feature_two_children.gff3 +3 -0
- package/test_data/single_feature_two_children.json +44 -0
- package/test_data/two_cds.gff3 +0 -9
- package/test_data/two_cds.json +0 -67
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readAnnotationFeatureSnapshot = readAnnotationFeatureSnapshot;
|
|
4
3
|
const tslib_1 = require("tslib");
|
|
5
4
|
/* eslint-disable @typescript-eslint/no-floating-promises */
|
|
6
5
|
const node_fs_1 = require("node:fs");
|
|
@@ -9,74 +8,8 @@ const gff_1 = require("@gmod/gff");
|
|
|
9
8
|
const chai_1 = require("chai");
|
|
10
9
|
const chai_exclude_1 = tslib_1.__importDefault(require("chai-exclude"));
|
|
11
10
|
const gff3ToAnnotationFeature_1 = require("./gff3ToAnnotationFeature");
|
|
11
|
+
const testUtil_1 = require("./testUtil");
|
|
12
12
|
(0, chai_1.use)(chai_exclude_1.default);
|
|
13
|
-
const testCases = [
|
|
14
|
-
[
|
|
15
|
-
'a feature with no children',
|
|
16
|
-
'ctgA example remark 1000 2000 . . . Name=Remark:hga;Alias=hga\n',
|
|
17
|
-
{
|
|
18
|
-
_id: '66c51f3e002c683eaf98a223',
|
|
19
|
-
refSeq: 'ctgA',
|
|
20
|
-
type: 'remark',
|
|
21
|
-
min: 999,
|
|
22
|
-
max: 2000,
|
|
23
|
-
attributes: {
|
|
24
|
-
gff_source: ['example'],
|
|
25
|
-
gff_name: ['Remark:hga'],
|
|
26
|
-
gff_alias: ['hga'],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
[
|
|
31
|
-
'a feature with two children',
|
|
32
|
-
`ctgA est EST_match 1050 3202 . + . ID=Match1;Name=agt830.5;Target=agt830.5 1 654
|
|
33
|
-
ctgA est match_part 1050 1500 . + . Parent=Match1;Name=agt830.5;Target=agt830.5 1 451
|
|
34
|
-
ctgA est match_part 3000 3202 . + . Parent=Match1;Name=agt830.5;Target=agt830.5 452 654
|
|
35
|
-
`,
|
|
36
|
-
{
|
|
37
|
-
_id: '66cf9fbb4e947fa2c27d3d6a',
|
|
38
|
-
refSeq: 'ctgA',
|
|
39
|
-
type: 'EST_match',
|
|
40
|
-
min: 1049,
|
|
41
|
-
max: 3202,
|
|
42
|
-
strand: 1,
|
|
43
|
-
children: {
|
|
44
|
-
'66cf9fbb4e947fa2c27d3d68': {
|
|
45
|
-
_id: '66cf9fbb4e947fa2c27d3d68',
|
|
46
|
-
refSeq: 'ctgA',
|
|
47
|
-
type: 'match_part',
|
|
48
|
-
min: 1049,
|
|
49
|
-
max: 1500,
|
|
50
|
-
strand: 1,
|
|
51
|
-
attributes: {
|
|
52
|
-
gff_source: ['est'],
|
|
53
|
-
gff_name: ['agt830.5'],
|
|
54
|
-
gff_target: ['agt830.5 1 451'],
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
'66cf9fbb4e947fa2c27d3d69': {
|
|
58
|
-
_id: '66cf9fbb4e947fa2c27d3d69',
|
|
59
|
-
refSeq: 'ctgA',
|
|
60
|
-
type: 'match_part',
|
|
61
|
-
min: 2999,
|
|
62
|
-
max: 3202,
|
|
63
|
-
strand: 1,
|
|
64
|
-
attributes: {
|
|
65
|
-
gff_source: ['est'],
|
|
66
|
-
gff_name: ['agt830.5'],
|
|
67
|
-
gff_target: ['agt830.5 452 654'],
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
attributes: {
|
|
72
|
-
gff_source: ['est'],
|
|
73
|
-
gff_id: ['Match1'],
|
|
74
|
-
gff_name: ['agt830.5'],
|
|
75
|
-
gff_target: ['agt830.5 1 654'],
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
],
|
|
79
|
-
];
|
|
80
13
|
function childrenToArray(feature) {
|
|
81
14
|
const { children } = feature;
|
|
82
15
|
if (!children) {
|
|
@@ -88,6 +21,21 @@ function childrenToArray(feature) {
|
|
|
88
21
|
function compareFeatures(feature1, feature2) {
|
|
89
22
|
chai_1.assert.deepEqualExcludingEvery(childrenToArray(feature1), childrenToArray(feature2), '_id');
|
|
90
23
|
}
|
|
24
|
+
(0, node_test_1.describe)('Converts GFF3 to AnnotationFeatureSnapshot JSON when', () => {
|
|
25
|
+
for (const testCase of testUtil_1.testCases) {
|
|
26
|
+
const { filenameStem, description } = testCase;
|
|
27
|
+
(0, node_test_1.it)(description, () => {
|
|
28
|
+
const fileText = (0, node_fs_1.readFileSync)(`test_data/${filenameStem}.gff3`, 'utf8');
|
|
29
|
+
const gffFeatures = (0, gff_1.parseStringSync)(fileText, { parseSequences: false });
|
|
30
|
+
const annotationFeatures = gffFeatures.map((gff3Feature) => (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(gff3Feature));
|
|
31
|
+
const annotationFeaturesExpected = JSON.parse((0, node_fs_1.readFileSync)(`test_data/${filenameStem}.json`, 'utf8'));
|
|
32
|
+
for (const [i, annotationFeatureExpected,] of annotationFeaturesExpected.entries()) {
|
|
33
|
+
const annotationFeature = annotationFeatures[i];
|
|
34
|
+
compareFeatures(annotationFeature, annotationFeatureExpected);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
91
39
|
function readFeatureFile(fn) {
|
|
92
40
|
const lines = (0, node_fs_1.readFileSync)(fn).toString().split('\n');
|
|
93
41
|
const feature = [];
|
|
@@ -99,20 +47,11 @@ function readFeatureFile(fn) {
|
|
|
99
47
|
const inGff = (0, gff_1.parseStringSync)(feature.join('\n'));
|
|
100
48
|
return inGff;
|
|
101
49
|
}
|
|
102
|
-
function readAnnotationFeatureSnapshot(fn) {
|
|
103
|
-
const lines = (0, node_fs_1.readFileSync)(fn).toString();
|
|
104
|
-
return JSON.parse(lines);
|
|
105
|
-
}
|
|
106
50
|
const [ex1, , ex2, , ex3, , ex4] = readFeatureFile('test_data/gene_representations.gff3');
|
|
107
51
|
(0, node_test_1.describe)('gff3ToAnnotationFeature examples', () => {
|
|
108
52
|
(0, node_test_1.it)('Convert one CDS', () => {
|
|
109
53
|
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(readFeatureFile('test_data/one_cds.gff3')[0]);
|
|
110
|
-
const expected = readAnnotationFeatureSnapshot('test_data/one_cds.json');
|
|
111
|
-
compareFeatures(actual, expected);
|
|
112
|
-
});
|
|
113
|
-
(0, node_test_1.it)('Convert two CDSs', () => {
|
|
114
|
-
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(readFeatureFile('test_data/two_cds.gff3')[0]);
|
|
115
|
-
const expected = readAnnotationFeatureSnapshot('test_data/two_cds.json');
|
|
54
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/one_cds.json');
|
|
116
55
|
compareFeatures(actual, expected);
|
|
117
56
|
});
|
|
118
57
|
(0, node_test_1.it)('Convert example 1', () => {
|
|
@@ -120,14 +59,14 @@ const [ex1, , ex2, , ex3, , ex4] = readFeatureFile('test_data/gene_representatio
|
|
|
120
59
|
const txt = JSON.stringify(actual, null, 2);
|
|
121
60
|
chai_1.assert.equal(txt.match(/"type": "CDS"/g)?.length, 4);
|
|
122
61
|
chai_1.assert.equal(txt.match(/"type": "TF_binding_site"/g)?.length, 1);
|
|
123
|
-
const expected = readAnnotationFeatureSnapshot('test_data/example01.json');
|
|
62
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/example01.json');
|
|
124
63
|
compareFeatures(actual, expected);
|
|
125
64
|
});
|
|
126
65
|
(0, node_test_1.it)('Convert example 2', () => {
|
|
127
66
|
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(ex2);
|
|
128
67
|
const txt = JSON.stringify(actual, null, 2);
|
|
129
68
|
chai_1.assert.equal(txt.match(/"type": "CDS"/g)?.length, 4);
|
|
130
|
-
const expected = readAnnotationFeatureSnapshot('test_data/example02.json');
|
|
69
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/example02.json');
|
|
131
70
|
compareFeatures(actual, expected);
|
|
132
71
|
});
|
|
133
72
|
(0, node_test_1.it)('Convert example 3', () => {
|
|
@@ -149,7 +88,7 @@ const [ex1, , ex2, , ex3, , ex4] = readFeatureFile('test_data/gene_representatio
|
|
|
149
88
|
const txt = JSON.stringify(actual, null, 2);
|
|
150
89
|
chai_1.assert.equal(txt.match(/"type": "CDS"/g)?.length, 4);
|
|
151
90
|
chai_1.assert.equal(txt.match(/prime_UTR/g), null);
|
|
152
|
-
const expected = readAnnotationFeatureSnapshot('test_data/example04.json');
|
|
91
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/example04.json');
|
|
153
92
|
compareFeatures(actual, expected);
|
|
154
93
|
});
|
|
155
94
|
(0, node_test_1.it)('Convert braker gff', () => {
|
|
@@ -164,34 +103,22 @@ const [ex1, , ex2, , ex3, , ex4] = readFeatureFile('test_data/gene_representatio
|
|
|
164
103
|
(0, node_test_1.it)('Convert mRNA with CDS but without exon', () => {
|
|
165
104
|
const [gffFeature] = readFeatureFile('test_data/cds_without_exon.gff');
|
|
166
105
|
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(gffFeature);
|
|
167
|
-
const expected = readAnnotationFeatureSnapshot('test_data/cds_without_exon.json');
|
|
106
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/cds_without_exon.json');
|
|
168
107
|
compareFeatures(actual, expected);
|
|
169
108
|
});
|
|
170
109
|
(0, node_test_1.it)('Convert mRNA with CDS but without exon and spliced UTR', () => {
|
|
171
110
|
const [gffFeature] = readFeatureFile('test_data/cds_without_exon_spliced_utr.gff');
|
|
172
111
|
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(gffFeature);
|
|
173
|
-
const expected = readAnnotationFeatureSnapshot('test_data/cds_without_exon_spliced_utr.json');
|
|
112
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/cds_without_exon_spliced_utr.json');
|
|
174
113
|
compareFeatures(actual, expected);
|
|
175
114
|
});
|
|
176
115
|
(0, node_test_1.it)('Convert mRNA with one CDS, without exons non-adjacent UTR', () => {
|
|
177
116
|
const [gffFeature] = readFeatureFile('test_data/onecds_without_exon_spliced_utr.gff');
|
|
178
117
|
const actual = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(gffFeature);
|
|
179
|
-
const expected = readAnnotationFeatureSnapshot('test_data/onecds_without_exon_spliced_utr.json');
|
|
118
|
+
const expected = (0, testUtil_1.readAnnotationFeatureSnapshot)('test_data/onecds_without_exon_spliced_utr.json');
|
|
180
119
|
compareFeatures(actual, expected);
|
|
181
120
|
});
|
|
182
121
|
});
|
|
183
|
-
(0, node_test_1.describe)('gff3ToAnnotationFeature', () => {
|
|
184
|
-
for (const testCase of testCases) {
|
|
185
|
-
const [description, featureLine, convertedFeature] = testCase;
|
|
186
|
-
(0, node_test_1.it)(`converts ${description}`, () => {
|
|
187
|
-
const gff3Feature = (0, gff_1.parseStringSync)(featureLine, {
|
|
188
|
-
parseSequences: false,
|
|
189
|
-
});
|
|
190
|
-
const feature = (0, gff3ToAnnotationFeature_1.gff3ToAnnotationFeature)(gff3Feature[0]);
|
|
191
|
-
compareFeatures(convertedFeature, feature);
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
122
|
(0, node_test_1.describe)('Source and score', () => {
|
|
196
123
|
(0, node_test_1.it)('Convert score and source', () => {
|
|
197
124
|
const gffFeature = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gff3ToAnnotationFeature.test.js","sourceRoot":"","sources":["../../src/GFF3/gff3ToAnnotationFeature.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gff3ToAnnotationFeature.test.js","sourceRoot":"","sources":["../../src/GFF3/gff3ToAnnotationFeature.test.ts"],"names":[],"mappings":";;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
|
3
|
+
exports.testCases = void 0;
|
|
4
|
+
exports.readAnnotationFeatureSnapshot = readAnnotationFeatureSnapshot;
|
|
5
|
+
const node_fs_1 = require("node:fs");
|
|
6
|
+
function readAnnotationFeatureSnapshot(fn) {
|
|
7
|
+
const lines = (0, node_fs_1.readFileSync)(fn).toString();
|
|
8
|
+
return JSON.parse(lines);
|
|
9
|
+
}
|
|
10
|
+
exports.testCases = [
|
|
11
|
+
{
|
|
12
|
+
filenameStem: 'single_feature_no_children',
|
|
13
|
+
description: 'there is a single feature with no children',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
filenameStem: 'single_feature_two_children',
|
|
17
|
+
description: 'there is a single feature with two children',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
filenameStem: 'gene_with_two_cds',
|
|
21
|
+
description: 'Gene with two CDS',
|
|
22
|
+
},
|
|
23
|
+
];
|
|
24
|
+
//# sourceMappingURL=testUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testUtil.js","sourceRoot":"","sources":["../../src/GFF3/testUtil.ts"],"names":[],"mappings":";;;AAIA,sEAKC;AATD,qCAAsC;AAItC,SAAgB,6BAA6B,CAC3C,EAAU;IAEV,MAAM,KAAK,GAAG,IAAA,sBAAY,EAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAA;IACzC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAA8B,CAAA;AACvD,CAAC;AAEY,QAAA,SAAS,GAAoD;IACxE;QACE,YAAY,EAAE,4BAA4B;QAC1C,WAAW,EAAE,4CAA4C;KAC1D;IACD;QACE,YAAY,EAAE,6BAA6B;QAC3C,WAAW,EAAE,6CAA6C;KAC3D;IACD;QACE,YAAY,EAAE,mBAAmB;QACjC,WAAW,EAAE,mBAAmB;KACjC;CACF,CAAA"}
|