@jbrowse/plugin-sequence 1.5.2 → 1.5.6
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/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +3 -3
- package/dist/LinearReferenceSequenceDisplay/model.d.ts +1 -1
- package/dist/TwoBitAdapter/TwoBitAdapter.d.ts +1 -1
- package/dist/plugin-sequence.cjs.development.js +22 -28
- package/dist/plugin-sequence.cjs.development.js.map +1 -1
- package/dist/plugin-sequence.cjs.production.min.js +1 -1
- package/dist/plugin-sequence.cjs.production.min.js.map +1 -1
- package/dist/plugin-sequence.esm.js +22 -28
- package/dist/plugin-sequence.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/ChromSizesAdapter/ChromSizesAdapter.ts +1 -1
- package/src/IndexedFastaAdapter/IndexedFastaAdapter.ts +1 -1
- package/src/TwoBitAdapter/TwoBitAdapter.ts +3 -7
- package/src/declare.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jbrowse/plugin-sequence",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
4
4
|
"description": "JBrowse 2 sequence adapters, tracks, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jbrowse",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "f3d36cfd90f7c5bdf86869d6698d8cb68a8e122f"
|
|
59
59
|
}
|
|
@@ -36,7 +36,7 @@ export default class extends BaseAdapter implements RegionsAdapter {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
private async init(file: GenericFilehandle) {
|
|
39
|
-
const data =
|
|
39
|
+
const data = await file.readFile('utf8')
|
|
40
40
|
const refSeqs: { [key: string]: number } = {}
|
|
41
41
|
if (!data.length) {
|
|
42
42
|
throw new Error(`Could not read file ${file.toString()}`)
|
|
@@ -16,7 +16,7 @@ import PluginManager from '@jbrowse/core/PluginManager'
|
|
|
16
16
|
import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'
|
|
17
17
|
|
|
18
18
|
export default class extends BaseFeatureDataAdapter implements SequenceAdapter {
|
|
19
|
-
protected fasta:
|
|
19
|
+
protected fasta: IndexedFasta
|
|
20
20
|
|
|
21
21
|
private seqCache = new AbortablePromiseCache({
|
|
22
22
|
cache: new LRU({ maxSize: 200 }),
|
|
@@ -16,7 +16,7 @@ export default class TwoBitAdapter
|
|
|
16
16
|
extends BaseFeatureDataAdapter
|
|
17
17
|
implements SequenceAdapter
|
|
18
18
|
{
|
|
19
|
-
private twobit:
|
|
19
|
+
private twobit: TwoBitFile
|
|
20
20
|
|
|
21
21
|
// the chromSizesData can be used to speed up loading since TwoBit has to do
|
|
22
22
|
// many range requests at startup to perform the getRegions request
|
|
@@ -29,7 +29,7 @@ export default class TwoBitAdapter
|
|
|
29
29
|
// future
|
|
30
30
|
if (conf.uri !== '/path/to/default.chrom.sizes' && conf.uri !== '') {
|
|
31
31
|
const file = openLocation(conf, this.pluginManager)
|
|
32
|
-
const data =
|
|
32
|
+
const data = await file.readFile('utf8')
|
|
33
33
|
return Object.fromEntries(
|
|
34
34
|
data
|
|
35
35
|
?.split('\n')
|
|
@@ -92,11 +92,7 @@ export default class TwoBitAdapter
|
|
|
92
92
|
return ObservableCreate<Feature>(async observer => {
|
|
93
93
|
const size = await this.twobit.getSequenceSize(refName)
|
|
94
94
|
const regionEnd = size !== undefined ? Math.min(size, end) : end
|
|
95
|
-
const seq
|
|
96
|
-
refName,
|
|
97
|
-
start,
|
|
98
|
-
regionEnd,
|
|
99
|
-
)
|
|
95
|
+
const seq = await this.twobit.getSequence(refName, start, regionEnd)
|
|
100
96
|
if (seq) {
|
|
101
97
|
observer.next(
|
|
102
98
|
new SimpleFeature({
|
package/src/declare.d.ts
CHANGED