From b031decd8d3ee2000cf32b5ef486d026bb3b1b7e Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 14 Oct 2022 00:39:35 -0600 Subject: [PATCH 1/2] Restore display of derived_features --- plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts | 2 +- .../src/Gff3Adapter/__snapshots__/Gff3Adapter.test.ts.snap | 4 ++++ plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts | 3 ++- .../__snapshots__/Gff3TabixAdapter.test.ts.snap | 4 ++++ products/jbrowse-desktop/craco.config.js | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts b/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts index b35bb7eb6a..cf8d263745 100644 --- a/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts +++ b/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts @@ -158,7 +158,7 @@ export default class extends BaseFeatureDataAdapter { delete f.child_features delete f.data - delete f.derived_features + // delete f.derived_features delete f.attributes delete f.seq_id return f diff --git a/plugins/gff3/src/Gff3Adapter/__snapshots__/Gff3Adapter.test.ts.snap b/plugins/gff3/src/Gff3Adapter/__snapshots__/Gff3Adapter.test.ts.snap index d2e143697b..649eee250d 100644 --- a/plugins/gff3/src/Gff3Adapter/__snapshots__/Gff3Adapter.test.ts.snap +++ b/plugins/gff3/src/Gff3Adapter/__snapshots__/Gff3Adapter.test.ts.snap @@ -3,6 +3,7 @@ exports[`adapter can fetch features from volvox.gff3 test getfeatures on gff plain text adapter 1`] = ` Array [ Object { + "derived_features": Array [], "end": 6079, "name": "ctgB", "phase": 0, @@ -14,6 +15,7 @@ Array [ "uniqueId": "test-offset-187", }, Object { + "derived_features": Array [], "end": 1984, "name": "f07", "note": "This is an example", @@ -26,6 +28,7 @@ Array [ "uniqueId": "test-offset-188", }, Object { + "derived_features": Array [], "end": 6130, "name": "f06", "note": "This is another example", @@ -38,6 +41,7 @@ Array [ "uniqueId": "test-offset-189", }, Object { + "derived_features": Array [], "end": 5968, "name": "f05", "note": "ああ、この機能は、世界中を旅しています!", diff --git a/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts b/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts index 597ab1dc96..cc8a5b162b 100644 --- a/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts +++ b/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts @@ -247,10 +247,11 @@ export default class extends BaseFeatureDataAdapter { delete f.child_features delete f.data - delete f.derived_features + // delete f.derived_features delete f._linehash delete f.attributes delete f.seq_id + return f } diff --git a/plugins/gff3/src/Gff3TabixAdapter/__snapshots__/Gff3TabixAdapter.test.ts.snap b/plugins/gff3/src/Gff3TabixAdapter/__snapshots__/Gff3TabixAdapter.test.ts.snap index f9e7a69945..4024ebd14b 100644 --- a/plugins/gff3/src/Gff3TabixAdapter/__snapshots__/Gff3TabixAdapter.test.ts.snap +++ b/plugins/gff3/src/Gff3TabixAdapter/__snapshots__/Gff3TabixAdapter.test.ts.snap @@ -3,6 +3,7 @@ exports[`adapter can fetch features from volvox.gff3 test getfeatures on gff plain text adapter 1`] = ` Array [ Object { + "derived_features": Array [], "end": 6079, "name": "ctgB", "phase": 0, @@ -14,6 +15,7 @@ Array [ "uniqueId": "test-offset-794327", }, Object { + "derived_features": Array [], "end": 1984, "name": "f07", "note": "This is an example", @@ -26,6 +28,7 @@ Array [ "uniqueId": "test-offset-794370", }, Object { + "derived_features": Array [], "end": 6130, "name": "f06", "note": "This is another example", @@ -38,6 +41,7 @@ Array [ "uniqueId": "test-offset-794439", }, Object { + "derived_features": Array [], "end": 5968, "name": "f05", "note": "ああ、この機能は、世界中を旅しています!", diff --git a/products/jbrowse-desktop/craco.config.js b/products/jbrowse-desktop/craco.config.js index fa0260a5ac..19cc6f05cd 100644 --- a/products/jbrowse-desktop/craco.config.js +++ b/products/jbrowse-desktop/craco.config.js @@ -53,6 +53,7 @@ module.exports = { // worker chunks xref // https://github.com/webpack/webpack/issues/13791#issuecomment-897579223 config.output.publicPath = 'auto' + config.cache = false return config }, }, From 60e1d8d3372e70f1c487a94b024833392a30bbbf Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 17 Oct 2022 11:48:25 -0600 Subject: [PATCH 2/2] Disable derives from --- plugins/gff3/package.json | 2 +- plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts | 1 + plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts | 1 + products/jbrowse-desktop/craco.config.js | 1 - yarn.lock | 8 ++++---- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/gff3/package.json b/plugins/gff3/package.json index 316fe8d0c9..d511d87ed0 100644 --- a/plugins/gff3/package.json +++ b/plugins/gff3/package.json @@ -39,7 +39,7 @@ "dependencies": { "@flatten-js/interval-tree": "^1.0.15", "@gmod/bgzf-filehandle": "^1.4.3", - "@gmod/gff": "^1.2.0", + "@gmod/gff": "^1.2.3", "@gmod/tabix": "^1.5.2" }, "peerDependencies": { diff --git a/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts b/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts index cf8d263745..3a916960c4 100644 --- a/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts +++ b/plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts @@ -42,6 +42,7 @@ export default class extends BaseFeatureDataAdapter { parseComments: false, parseDirectives: false, parseSequences: false, + disableDerivesFromReferences: true, }) const intervalTree = feats diff --git a/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts b/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts index cc8a5b162b..0d5a2fab82 100644 --- a/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts +++ b/plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts @@ -141,6 +141,7 @@ export default class extends BaseFeatureDataAdapter { parseComments: false, parseDirectives: false, parseSequences: false, + disableDerivesFromReferences: true, }) features.forEach(featureLocs => diff --git a/products/jbrowse-desktop/craco.config.js b/products/jbrowse-desktop/craco.config.js index 19cc6f05cd..fa0260a5ac 100644 --- a/products/jbrowse-desktop/craco.config.js +++ b/products/jbrowse-desktop/craco.config.js @@ -53,7 +53,6 @@ module.exports = { // worker chunks xref // https://github.com/webpack/webpack/issues/13791#issuecomment-897579223 config.output.publicPath = 'auto' - config.cache = false return config }, }, diff --git a/yarn.lock b/yarn.lock index 3b106ea254..1b25eb6626 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1596,10 +1596,10 @@ pump "^3.0.0" split2 "^4.1.0" -"@gmod/gff@^1.2.0": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@gmod/gff/-/gff-1.2.1.tgz#4d1e3694f2268215aa6c7bad366be84a1449034d" - integrity sha512-YUqPOfoaSfVVXs3Unwph4Ap3NxQIghNtNm+57DEhf+cMeUloFU6v44dKwSUcZZ+PBgAop1BD11QUVSVzmSqNgQ== +"@gmod/gff@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@gmod/gff/-/gff-1.2.3.tgz#ae057592a14e3cd73a0ae430e94aa6a49e4312ca" + integrity sha512-ONnS+otYGLmrcd/c+j8IwRfm/gw0kWNxUOpGMap5G860LlFMYr4ltlQYucnTXDXnhcUsQHJlgLrQYhBnHf4y6A== "@gmod/gtf@^0.0.6": version "0.0.6"