@jbrowse/plugin-sequence 1.5.3 → 1.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-sequence",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
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": "cea9023ebce8bbe5c08ae9e00c4e74fe3f02a7f1"
58
+ "gitHead": "0c398214590969168694b4ed8e20b595178b9efd"
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 = (await file.readFile('utf8')) as string
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: typeof IndexedFasta
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: typeof TwoBitFile
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 = (await file.readFile('utf8')) as string
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: string = await this.twobit.getSequence(
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
@@ -1,3 +1 @@
1
- declare module '@gmod/indexedfasta'
2
- declare module '@gmod/twobit'
3
1
  declare module '@jbrowse/core/util/QuickLRU'