@jbrowse/plugin-bed 3.5.0 → 3.5.1
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.
|
@@ -167,23 +167,44 @@ class BigBedAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
Object.entries(parentAggregation).map(([name, subfeatures]) => {
|
|
170
|
-
var _a, _b;
|
|
170
|
+
var _a, _b, _c;
|
|
171
171
|
const s = (0, util_1.min)(subfeatures.map(f => f.start));
|
|
172
172
|
const e = (0, util_1.max)(subfeatures.map(f => f.end));
|
|
173
173
|
if ((0, util_1.doesIntersect2)(s, e, originalQuery.start, originalQuery.end)) {
|
|
174
174
|
const subs = subfeatures.sort((a, b) => a.uniqueId.localeCompare(b.uniqueId));
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
175
|
+
if (subs.every(s => {
|
|
176
|
+
var _a;
|
|
177
|
+
return s.strand === (((_a = subs[0]) === null || _a === void 0 ? void 0 : _a.strand) || 1);
|
|
178
|
+
})) {
|
|
179
|
+
observer.next(new util_1.SimpleFeature({
|
|
180
|
+
id: `${this.id}-${(_a = subs[0]) === null || _a === void 0 ? void 0 : _a.uniqueId}-parent`,
|
|
181
|
+
data: {
|
|
182
|
+
type: 'gene',
|
|
183
|
+
subfeatures: subs,
|
|
184
|
+
strand: ((_b = subs[0]) === null || _b === void 0 ? void 0 : _b.strand) || 1,
|
|
185
|
+
name,
|
|
186
|
+
start: s,
|
|
187
|
+
end: e,
|
|
188
|
+
refName: query.refName,
|
|
189
|
+
},
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
for (const sub of subs) {
|
|
194
|
+
observer.next(new util_1.SimpleFeature({
|
|
195
|
+
id: `${this.id}-${sub.uniqueId}-parent`,
|
|
196
|
+
data: {
|
|
197
|
+
type: 'gene',
|
|
198
|
+
subfeatures: [sub],
|
|
199
|
+
strand: ((_c = subs[0]) === null || _c === void 0 ? void 0 : _c.strand) || 1,
|
|
200
|
+
name,
|
|
201
|
+
start: sub.start,
|
|
202
|
+
end: sub.end,
|
|
203
|
+
refName: query.refName,
|
|
204
|
+
},
|
|
205
|
+
}));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
187
208
|
}
|
|
188
209
|
});
|
|
189
210
|
});
|
|
@@ -162,23 +162,44 @@ export default class BigBedAdapter extends BaseFeatureDataAdapter {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
Object.entries(parentAggregation).map(([name, subfeatures]) => {
|
|
165
|
-
var _a, _b;
|
|
165
|
+
var _a, _b, _c;
|
|
166
166
|
const s = min(subfeatures.map(f => f.start));
|
|
167
167
|
const e = max(subfeatures.map(f => f.end));
|
|
168
168
|
if (doesIntersect2(s, e, originalQuery.start, originalQuery.end)) {
|
|
169
169
|
const subs = subfeatures.sort((a, b) => a.uniqueId.localeCompare(b.uniqueId));
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
if (subs.every(s => {
|
|
171
|
+
var _a;
|
|
172
|
+
return s.strand === (((_a = subs[0]) === null || _a === void 0 ? void 0 : _a.strand) || 1);
|
|
173
|
+
})) {
|
|
174
|
+
observer.next(new SimpleFeature({
|
|
175
|
+
id: `${this.id}-${(_a = subs[0]) === null || _a === void 0 ? void 0 : _a.uniqueId}-parent`,
|
|
176
|
+
data: {
|
|
177
|
+
type: 'gene',
|
|
178
|
+
subfeatures: subs,
|
|
179
|
+
strand: ((_b = subs[0]) === null || _b === void 0 ? void 0 : _b.strand) || 1,
|
|
180
|
+
name,
|
|
181
|
+
start: s,
|
|
182
|
+
end: e,
|
|
183
|
+
refName: query.refName,
|
|
184
|
+
},
|
|
185
|
+
}));
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
for (const sub of subs) {
|
|
189
|
+
observer.next(new SimpleFeature({
|
|
190
|
+
id: `${this.id}-${sub.uniqueId}-parent`,
|
|
191
|
+
data: {
|
|
192
|
+
type: 'gene',
|
|
193
|
+
subfeatures: [sub],
|
|
194
|
+
strand: ((_c = subs[0]) === null || _c === void 0 ? void 0 : _c.strand) || 1,
|
|
195
|
+
name,
|
|
196
|
+
start: sub.start,
|
|
197
|
+
end: sub.end,
|
|
198
|
+
refName: query.refName,
|
|
199
|
+
},
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
182
203
|
}
|
|
183
204
|
});
|
|
184
205
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-bed",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "JBrowse 2 bed adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@gmod/bed": "^2.1.2",
|
|
42
42
|
"@gmod/bgzf-filehandle": "^4.0.0",
|
|
43
43
|
"@gmod/tabix": "^3.0.1",
|
|
44
|
-
"@jbrowse/core": "^3.5.
|
|
44
|
+
"@jbrowse/core": "^3.5.1",
|
|
45
45
|
"mobx": "^6.0.0",
|
|
46
46
|
"mobx-react": "^9.0.0",
|
|
47
47
|
"mobx-state-tree": "^5.0.0",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"distModule": "esm/index.js",
|
|
54
54
|
"srcModule": "src/index.ts",
|
|
55
55
|
"module": "esm/index.js",
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "cb8859da9d838ad2594964777c5c54f385d98f5e"
|
|
57
57
|
}
|