@jbrowse/text-indexing 2.15.3 → 2.15.4

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.
@@ -120,7 +120,22 @@ async function* indexFiles({ tracks, attributesToIndex: idx1, outDir, featureTyp
120
120
  const { type } = adapter || {};
121
121
  const { indexingFeatureTypesToExclude: featureTypesToExclude = edx1, indexingAttributes: attributesToIndex = idx1, } = textSearching || {};
122
122
  let myTotalBytes;
123
- if (type === 'Gff3TabixAdapter' || type === 'Gff3Adapter') {
123
+ if (type === 'Gff3Adapter') {
124
+ yield* (0, gff3Adapter_1.indexGff3)({
125
+ config: track,
126
+ attributesToIndex,
127
+ inLocation: getLoc('gffLocation', track),
128
+ outDir,
129
+ featureTypesToExclude,
130
+ onStart: totalBytes => {
131
+ myTotalBytes = totalBytes;
132
+ },
133
+ onUpdate: progressBytes => {
134
+ statusCallback(`${progressBytes}/${myTotalBytes}`);
135
+ },
136
+ });
137
+ }
138
+ if (type === 'Gff3TabixAdapter') {
124
139
  yield* (0, gff3Adapter_1.indexGff3)({
125
140
  config: track,
126
141
  attributesToIndex,
@@ -135,7 +150,21 @@ async function* indexFiles({ tracks, attributesToIndex: idx1, outDir, featureTyp
135
150
  },
136
151
  });
137
152
  }
138
- else if (type === 'VcfTabixAdapter' || type === 'VcfAdapter') {
153
+ else if (type === 'VcfAdapter') {
154
+ yield* (0, vcfAdapter_1.indexVcf)({
155
+ config: track,
156
+ attributesToIndex,
157
+ inLocation: getLoc('vcfLocation', track),
158
+ outDir,
159
+ onStart: totalBytes => {
160
+ myTotalBytes = totalBytes;
161
+ },
162
+ onUpdate: progressBytes => {
163
+ statusCallback(`${progressBytes}/${myTotalBytes}`);
164
+ },
165
+ });
166
+ }
167
+ else if (type === 'VcfTabixAdapter') {
139
168
  yield* (0, vcfAdapter_1.indexVcf)({
140
169
  config: track,
141
170
  attributesToIndex,
@@ -156,7 +185,7 @@ function getLoc(attr, config) {
156
185
  var _a;
157
186
  const elt = (_a = config.adapter) === null || _a === void 0 ? void 0 : _a[attr];
158
187
  if (!elt) {
159
- throw new Error('none');
188
+ throw new Error(`can't get find ${attr} from ${config.adapter} for text indexing`);
160
189
  }
161
190
  return elt.uri || elt.localPath;
162
191
  }
@@ -114,7 +114,22 @@ async function* indexFiles({ tracks, attributesToIndex: idx1, outDir, featureTyp
114
114
  const { type } = adapter || {};
115
115
  const { indexingFeatureTypesToExclude: featureTypesToExclude = edx1, indexingAttributes: attributesToIndex = idx1, } = textSearching || {};
116
116
  let myTotalBytes;
117
- if (type === 'Gff3TabixAdapter' || type === 'Gff3Adapter') {
117
+ if (type === 'Gff3Adapter') {
118
+ yield* indexGff3({
119
+ config: track,
120
+ attributesToIndex,
121
+ inLocation: getLoc('gffLocation', track),
122
+ outDir,
123
+ featureTypesToExclude,
124
+ onStart: totalBytes => {
125
+ myTotalBytes = totalBytes;
126
+ },
127
+ onUpdate: progressBytes => {
128
+ statusCallback(`${progressBytes}/${myTotalBytes}`);
129
+ },
130
+ });
131
+ }
132
+ if (type === 'Gff3TabixAdapter') {
118
133
  yield* indexGff3({
119
134
  config: track,
120
135
  attributesToIndex,
@@ -129,7 +144,21 @@ async function* indexFiles({ tracks, attributesToIndex: idx1, outDir, featureTyp
129
144
  },
130
145
  });
131
146
  }
132
- else if (type === 'VcfTabixAdapter' || type === 'VcfAdapter') {
147
+ else if (type === 'VcfAdapter') {
148
+ yield* indexVcf({
149
+ config: track,
150
+ attributesToIndex,
151
+ inLocation: getLoc('vcfLocation', track),
152
+ outDir,
153
+ onStart: totalBytes => {
154
+ myTotalBytes = totalBytes;
155
+ },
156
+ onUpdate: progressBytes => {
157
+ statusCallback(`${progressBytes}/${myTotalBytes}`);
158
+ },
159
+ });
160
+ }
161
+ else if (type === 'VcfTabixAdapter') {
133
162
  yield* indexVcf({
134
163
  config: track,
135
164
  attributesToIndex,
@@ -150,7 +179,7 @@ function getLoc(attr, config) {
150
179
  var _a;
151
180
  const elt = (_a = config.adapter) === null || _a === void 0 ? void 0 : _a[attr];
152
181
  if (!elt) {
153
- throw new Error('none');
182
+ throw new Error(`can't get find ${attr} from ${config.adapter} for text indexing`);
154
183
  }
155
184
  return elt.uri || elt.localPath;
156
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/text-indexing",
3
- "version": "2.15.3",
3
+ "version": "2.15.4",
4
4
  "description": "JBrowse 2 text indexing for desktop",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {
44
44
  "@babel/runtime": "^7.16.3",
45
- "@jbrowse/core": "^2.15.3",
45
+ "@jbrowse/core": "^2.15.4",
46
46
  "ixixx": "^2.0.1",
47
47
  "node-fetch": "^2.6.0",
48
48
  "sanitize-filename": "^1.6.3"
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "c0f82fe7b210622dd462e702641cc6da01109c6e"
61
+ "gitHead": "686b4ad9016b3586e8230180f7adb44c238ba4fb"
62
62
  }