@jbrowse/plugin-legacy-jbrowse 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.
- package/dist/JBrowse1Connection/jb1ConfigLoad.js +6 -6
- package/dist/JBrowse1Connection/jb1ConfigParse.js +7 -7
- package/dist/NCListAdapter/NCListFeature.js +2 -2
- package/esm/JBrowse1Connection/jb1ConfigLoad.js +6 -6
- package/esm/JBrowse1Connection/jb1ConfigParse.js +7 -7
- package/esm/NCListAdapter/NCListFeature.js +2 -2
- package/package.json +3 -3
|
@@ -130,11 +130,11 @@ function mergeTrackConfigs(a, b) {
|
|
|
130
130
|
return a;
|
|
131
131
|
}
|
|
132
132
|
const aTracks = {};
|
|
133
|
-
a.
|
|
133
|
+
for (const [i, t] of a.entries()) {
|
|
134
134
|
t.index = i;
|
|
135
135
|
aTracks[t.label] = t;
|
|
136
|
-
}
|
|
137
|
-
|
|
136
|
+
}
|
|
137
|
+
for (const bT of b) {
|
|
138
138
|
const aT = aTracks[bT.label];
|
|
139
139
|
if (aT) {
|
|
140
140
|
mergeConfigs(aT, bT);
|
|
@@ -142,7 +142,7 @@ function mergeTrackConfigs(a, b) {
|
|
|
142
142
|
else {
|
|
143
143
|
a.push(bT);
|
|
144
144
|
}
|
|
145
|
-
}
|
|
145
|
+
}
|
|
146
146
|
return a;
|
|
147
147
|
}
|
|
148
148
|
async function loadIncludes(inputConfig) {
|
|
@@ -167,9 +167,9 @@ async function loadIncludes(inputConfig) {
|
|
|
167
167
|
return loadRecur(includedData, newUpstreamConf);
|
|
168
168
|
});
|
|
169
169
|
const includedDataObjects = await Promise.all(loads);
|
|
170
|
-
|
|
170
|
+
for (const includedData of includedDataObjects) {
|
|
171
171
|
config = mergeConfigs(config, includedData) || config;
|
|
172
|
-
}
|
|
172
|
+
}
|
|
173
173
|
return config;
|
|
174
174
|
}
|
|
175
175
|
return loadRecur(inputConfig, {});
|
|
@@ -90,7 +90,7 @@ function parse(text, url) {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
text.split(/\n|\r\n|\r/).
|
|
93
|
+
for (const [i, textLine] of text.split(/\n|\r\n|\r/).entries()) {
|
|
94
94
|
lineNumber = i + 1;
|
|
95
95
|
const line = textLine.replace(/^\s*#.+/, '');
|
|
96
96
|
let match;
|
|
@@ -127,7 +127,7 @@ function parse(text, url) {
|
|
|
127
127
|
keyPath = undefined;
|
|
128
128
|
value = undefined;
|
|
129
129
|
}
|
|
130
|
-
}
|
|
130
|
+
}
|
|
131
131
|
recordVal();
|
|
132
132
|
return data;
|
|
133
133
|
}
|
|
@@ -200,11 +200,11 @@ function regularizeConf(conf, url) {
|
|
|
200
200
|
if (conf.names) {
|
|
201
201
|
addBase.push(conf.names);
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
for (const t of addBase) {
|
|
204
204
|
if (!t.baseUrl) {
|
|
205
205
|
t.baseUrl = conf.baseUrl || '/';
|
|
206
206
|
}
|
|
207
|
-
}
|
|
207
|
+
}
|
|
208
208
|
if (conf.refSeqs && typeof conf.refSeqs === 'string') {
|
|
209
209
|
conf.refSeqs = new URL(conf.refSeqs, conf.sourceUrl).href;
|
|
210
210
|
}
|
|
@@ -213,14 +213,14 @@ function regularizeConf(conf, url) {
|
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
conf.stores = conf.stores || {};
|
|
216
|
-
(conf.tracks || [])
|
|
216
|
+
for (let trackConfig of conf.tracks || []) {
|
|
217
217
|
if (trackConfig.config) {
|
|
218
218
|
const c = trackConfig.config;
|
|
219
219
|
trackConfig.config = undefined;
|
|
220
220
|
trackConfig = { ...c, ...trackConfig };
|
|
221
221
|
}
|
|
222
222
|
if (trackConfig.store) {
|
|
223
|
-
|
|
223
|
+
continue;
|
|
224
224
|
}
|
|
225
225
|
let trackClassName;
|
|
226
226
|
if (trackConfig.type === 'FeatureTrack') {
|
|
@@ -246,7 +246,7 @@ function regularizeConf(conf, url) {
|
|
|
246
246
|
}
|
|
247
247
|
synthesizeTrackStoreConfig(conf, trackConfig.histograms);
|
|
248
248
|
}
|
|
249
|
-
}
|
|
249
|
+
}
|
|
250
250
|
return conf;
|
|
251
251
|
}
|
|
252
252
|
function regularizeClass(root, className) {
|
|
@@ -40,7 +40,7 @@ class NCListFeature {
|
|
|
40
40
|
}
|
|
41
41
|
toJSON() {
|
|
42
42
|
const data = { uniqueId: this.id() };
|
|
43
|
-
this.ncFeature.tags()
|
|
43
|
+
for (const tag of this.ncFeature.tags()) {
|
|
44
44
|
const mappedTag = this.jb1TagToJb2Tag(tag);
|
|
45
45
|
const value = this.ncFeature.get(tag);
|
|
46
46
|
if (mappedTag === 'subfeatures') {
|
|
@@ -51,7 +51,7 @@ class NCListFeature {
|
|
|
51
51
|
else {
|
|
52
52
|
data[mappedTag] = value;
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
|
55
55
|
return data;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -124,11 +124,11 @@ function mergeTrackConfigs(a, b) {
|
|
|
124
124
|
return a;
|
|
125
125
|
}
|
|
126
126
|
const aTracks = {};
|
|
127
|
-
a.
|
|
127
|
+
for (const [i, t] of a.entries()) {
|
|
128
128
|
t.index = i;
|
|
129
129
|
aTracks[t.label] = t;
|
|
130
|
-
}
|
|
131
|
-
|
|
130
|
+
}
|
|
131
|
+
for (const bT of b) {
|
|
132
132
|
const aT = aTracks[bT.label];
|
|
133
133
|
if (aT) {
|
|
134
134
|
mergeConfigs(aT, bT);
|
|
@@ -136,7 +136,7 @@ function mergeTrackConfigs(a, b) {
|
|
|
136
136
|
else {
|
|
137
137
|
a.push(bT);
|
|
138
138
|
}
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
return a;
|
|
141
141
|
}
|
|
142
142
|
async function loadIncludes(inputConfig) {
|
|
@@ -161,9 +161,9 @@ async function loadIncludes(inputConfig) {
|
|
|
161
161
|
return loadRecur(includedData, newUpstreamConf);
|
|
162
162
|
});
|
|
163
163
|
const includedDataObjects = await Promise.all(loads);
|
|
164
|
-
|
|
164
|
+
for (const includedData of includedDataObjects) {
|
|
165
165
|
config = mergeConfigs(config, includedData) || config;
|
|
166
|
-
}
|
|
166
|
+
}
|
|
167
167
|
return config;
|
|
168
168
|
}
|
|
169
169
|
return loadRecur(inputConfig, {});
|
|
@@ -82,7 +82,7 @@ function parse(text, url) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
text.split(/\n|\r\n|\r/).
|
|
85
|
+
for (const [i, textLine] of text.split(/\n|\r\n|\r/).entries()) {
|
|
86
86
|
lineNumber = i + 1;
|
|
87
87
|
const line = textLine.replace(/^\s*#.+/, '');
|
|
88
88
|
let match;
|
|
@@ -119,7 +119,7 @@ function parse(text, url) {
|
|
|
119
119
|
keyPath = undefined;
|
|
120
120
|
value = undefined;
|
|
121
121
|
}
|
|
122
|
-
}
|
|
122
|
+
}
|
|
123
123
|
recordVal();
|
|
124
124
|
return data;
|
|
125
125
|
}
|
|
@@ -192,11 +192,11 @@ export function regularizeConf(conf, url) {
|
|
|
192
192
|
if (conf.names) {
|
|
193
193
|
addBase.push(conf.names);
|
|
194
194
|
}
|
|
195
|
-
|
|
195
|
+
for (const t of addBase) {
|
|
196
196
|
if (!t.baseUrl) {
|
|
197
197
|
t.baseUrl = conf.baseUrl || '/';
|
|
198
198
|
}
|
|
199
|
-
}
|
|
199
|
+
}
|
|
200
200
|
if (conf.refSeqs && typeof conf.refSeqs === 'string') {
|
|
201
201
|
conf.refSeqs = new URL(conf.refSeqs, conf.sourceUrl).href;
|
|
202
202
|
}
|
|
@@ -205,14 +205,14 @@ export function regularizeConf(conf, url) {
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
conf.stores = conf.stores || {};
|
|
208
|
-
(conf.tracks || [])
|
|
208
|
+
for (let trackConfig of conf.tracks || []) {
|
|
209
209
|
if (trackConfig.config) {
|
|
210
210
|
const c = trackConfig.config;
|
|
211
211
|
trackConfig.config = undefined;
|
|
212
212
|
trackConfig = { ...c, ...trackConfig };
|
|
213
213
|
}
|
|
214
214
|
if (trackConfig.store) {
|
|
215
|
-
|
|
215
|
+
continue;
|
|
216
216
|
}
|
|
217
217
|
let trackClassName;
|
|
218
218
|
if (trackConfig.type === 'FeatureTrack') {
|
|
@@ -238,7 +238,7 @@ export function regularizeConf(conf, url) {
|
|
|
238
238
|
}
|
|
239
239
|
synthesizeTrackStoreConfig(conf, trackConfig.histograms);
|
|
240
240
|
}
|
|
241
|
-
}
|
|
241
|
+
}
|
|
242
242
|
return conf;
|
|
243
243
|
}
|
|
244
244
|
function regularizeClass(root, className) {
|
|
@@ -38,7 +38,7 @@ export default class NCListFeature {
|
|
|
38
38
|
}
|
|
39
39
|
toJSON() {
|
|
40
40
|
const data = { uniqueId: this.id() };
|
|
41
|
-
this.ncFeature.tags()
|
|
41
|
+
for (const tag of this.ncFeature.tags()) {
|
|
42
42
|
const mappedTag = this.jb1TagToJb2Tag(tag);
|
|
43
43
|
const value = this.ncFeature.get(tag);
|
|
44
44
|
if (mappedTag === 'subfeatures') {
|
|
@@ -49,7 +49,7 @@ export default class NCListFeature {
|
|
|
49
49
|
else {
|
|
50
50
|
data[mappedTag] = value;
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
53
|
return data;
|
|
54
54
|
}
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-legacy-jbrowse",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "JBrowse 2 plugin for connecting to and reading JBrowse 1 data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@gmod/nclist": "^2.0.0",
|
|
40
|
-
"@jbrowse/core": "^3.0
|
|
40
|
+
"@jbrowse/core": "^3.2.0",
|
|
41
41
|
"crc": "^4.0.0",
|
|
42
42
|
"generic-filehandle2": "^1.0.0",
|
|
43
43
|
"get-value": "^3.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": "c750e3f56706a490c19ba75abd807fec5e38aebf"
|
|
57
57
|
}
|