@jbrowse/plugin-rdf 3.0.5 → 3.2.0
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.
|
@@ -68,15 +68,15 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
68
68
|
const rows = results.results.bindings || [];
|
|
69
69
|
const fields = results.head.vars;
|
|
70
70
|
const requiredFields = ['start', 'end', 'uniqueId'];
|
|
71
|
-
|
|
71
|
+
for (const requiredField of requiredFields) {
|
|
72
72
|
if (!fields.includes(requiredField)) {
|
|
73
73
|
console.error(`Required field ${requiredField} missing from feature data`);
|
|
74
74
|
}
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
const seenFeatures = {};
|
|
77
|
-
|
|
77
|
+
for (const row of rows) {
|
|
78
78
|
const rawData = [{}];
|
|
79
|
-
|
|
79
|
+
for (let field of fields) {
|
|
80
80
|
if (field in row) {
|
|
81
81
|
const { value } = row[field];
|
|
82
82
|
let idx = 0;
|
|
@@ -89,8 +89,8 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
89
89
|
}
|
|
90
90
|
rawData[idx][field] = value;
|
|
91
91
|
}
|
|
92
|
-
}
|
|
93
|
-
rawData.
|
|
92
|
+
}
|
|
93
|
+
for (const [idx, rd] of rawData.entries()) {
|
|
94
94
|
const { uniqueId, start, end, strand } = rd;
|
|
95
95
|
if (idx < rawData.length - 1) {
|
|
96
96
|
rawData[idx + 1].parentUniqueId = uniqueId;
|
|
@@ -105,8 +105,8 @@ class SPARQLAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
105
105
|
strand: Number.parseInt(strand, 10) || 0,
|
|
106
106
|
},
|
|
107
107
|
};
|
|
108
|
-
}
|
|
109
|
-
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
110
|
for (const [uniqueId, f] of Object.entries(seenFeatures)) {
|
|
111
111
|
const pid = f.data.parentUniqueId;
|
|
112
112
|
f.data.parentUniqueId = undefined;
|
|
@@ -63,15 +63,15 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
63
63
|
const rows = results.results.bindings || [];
|
|
64
64
|
const fields = results.head.vars;
|
|
65
65
|
const requiredFields = ['start', 'end', 'uniqueId'];
|
|
66
|
-
|
|
66
|
+
for (const requiredField of requiredFields) {
|
|
67
67
|
if (!fields.includes(requiredField)) {
|
|
68
68
|
console.error(`Required field ${requiredField} missing from feature data`);
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|
|
71
71
|
const seenFeatures = {};
|
|
72
|
-
|
|
72
|
+
for (const row of rows) {
|
|
73
73
|
const rawData = [{}];
|
|
74
|
-
|
|
74
|
+
for (let field of fields) {
|
|
75
75
|
if (field in row) {
|
|
76
76
|
const { value } = row[field];
|
|
77
77
|
let idx = 0;
|
|
@@ -84,8 +84,8 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
84
84
|
}
|
|
85
85
|
rawData[idx][field] = value;
|
|
86
86
|
}
|
|
87
|
-
}
|
|
88
|
-
rawData.
|
|
87
|
+
}
|
|
88
|
+
for (const [idx, rd] of rawData.entries()) {
|
|
89
89
|
const { uniqueId, start, end, strand } = rd;
|
|
90
90
|
if (idx < rawData.length - 1) {
|
|
91
91
|
rawData[idx + 1].parentUniqueId = uniqueId;
|
|
@@ -100,8 +100,8 @@ export default class SPARQLAdapter extends BaseFeatureDataAdapter {
|
|
|
100
100
|
strand: Number.parseInt(strand, 10) || 0,
|
|
101
101
|
},
|
|
102
102
|
};
|
|
103
|
-
}
|
|
104
|
-
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
105
|
for (const [uniqueId, f] of Object.entries(seenFeatures)) {
|
|
106
106
|
const pid = f.data.parentUniqueId;
|
|
107
107
|
f.data.parentUniqueId = undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-rdf",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "JBrowse 2 RDF resources",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"clean": "rimraf dist esm *.tsbuildinfo"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@jbrowse/core": "^3.0
|
|
39
|
+
"@jbrowse/core": "^3.2.0",
|
|
40
40
|
"mobx": "^6.0.0",
|
|
41
41
|
"mobx-react": "^9.0.0",
|
|
42
42
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
|
|
53
53
|
}
|