Skip to content

Commit

Permalink
Disable resolution of Derives_from fields in GFF3 parsing, fixes TAIR…
Browse files Browse the repository at this point in the history
… gff (#3272)
  • Loading branch information
cmdcolin committed Oct 19, 2022
1 parent cb9159a commit f96ec17
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugins/gff3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 2 additions & 1 deletion plugins/gff3/src/Gff3Adapter/Gff3Adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default class extends BaseFeatureDataAdapter {
parseComments: false,
parseDirectives: false,
parseSequences: false,
disableDerivesFromReferences: true,
})

const intervalTree = feats
Expand Down Expand Up @@ -158,7 +159,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -14,6 +15,7 @@ Array [
"uniqueId": "test-offset-187",
},
Object {
"derived_features": Array [],
"end": 1984,
"name": "f07",
"note": "This is an example",
Expand All @@ -26,6 +28,7 @@ Array [
"uniqueId": "test-offset-188",
},
Object {
"derived_features": Array [],
"end": 6130,
"name": "f06",
"note": "This is another example",
Expand All @@ -38,6 +41,7 @@ Array [
"uniqueId": "test-offset-189",
},
Object {
"derived_features": Array [],
"end": 5968,
"name": "f05",
"note": "ああ、この機能は、世界中を旅しています!",
Expand Down
4 changes: 3 additions & 1 deletion plugins/gff3/src/Gff3TabixAdapter/Gff3TabixAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default class extends BaseFeatureDataAdapter {
parseComments: false,
parseDirectives: false,
parseSequences: false,
disableDerivesFromReferences: true,
})

features.forEach(featureLocs =>
Expand Down Expand Up @@ -247,10 +248,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
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -14,6 +15,7 @@ Array [
"uniqueId": "test-offset-794327",
},
Object {
"derived_features": Array [],
"end": 1984,
"name": "f07",
"note": "This is an example",
Expand All @@ -26,6 +28,7 @@ Array [
"uniqueId": "test-offset-794370",
},
Object {
"derived_features": Array [],
"end": 6130,
"name": "f06",
"note": "This is another example",
Expand All @@ -38,6 +41,7 @@ Array [
"uniqueId": "test-offset-794439",
},
Object {
"derived_features": Array [],
"end": 5968,
"name": "f05",
"note": "ああ、この機能は、世界中を旅しています!",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f96ec17

Please sign in to comment.