@jbrowse/plugin-sequence 2.17.0 → 2.18.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.
Files changed (100) hide show
  1. package/dist/BgzipFastaAdapter/configSchema.d.ts +0 -12
  2. package/dist/BgzipFastaAdapter/configSchema.js +1 -16
  3. package/dist/BgzipFastaAdapter/index.d.ts +1 -1
  4. package/dist/BgzipFastaAdapter/index.js +11 -9
  5. package/dist/ChromSizesAdapter/ChromSizesAdapter.d.ts +2 -1
  6. package/dist/ChromSizesAdapter/ChromSizesAdapter.js +1 -1
  7. package/dist/ChromSizesAdapter/configSchema.d.ts +0 -3
  8. package/dist/ChromSizesAdapter/configSchema.js +1 -7
  9. package/dist/ChromSizesAdapter/index.d.ts +1 -1
  10. package/dist/DivSequenceRenderer/components/DivSequenceRendering.d.ts +3 -3
  11. package/dist/DivSequenceRenderer/components/DivSequenceRendering.js +4 -10
  12. package/dist/DivSequenceRenderer/configSchema.d.ts +0 -3
  13. package/dist/DivSequenceRenderer/configSchema.js +1 -7
  14. package/dist/DivSequenceRenderer/index.d.ts +1 -1
  15. package/dist/DivSequenceRenderer/index.js +0 -1
  16. package/dist/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +6 -10
  17. package/dist/IndexedFastaAdapter/IndexedFastaAdapter.js +46 -40
  18. package/dist/IndexedFastaAdapter/configSchema.d.ts +0 -9
  19. package/dist/IndexedFastaAdapter/configSchema.js +1 -13
  20. package/dist/IndexedFastaAdapter/index.d.ts +1 -1
  21. package/dist/IndexedFastaAdapter/index.js +11 -9
  22. package/dist/LinearReferenceSequenceDisplay/configSchema.d.ts +0 -3
  23. package/dist/LinearReferenceSequenceDisplay/configSchema.js +1 -7
  24. package/dist/LinearReferenceSequenceDisplay/index.d.ts +1 -1
  25. package/dist/LinearReferenceSequenceDisplay/model.d.ts +11 -92
  26. package/dist/LinearReferenceSequenceDisplay/model.js +4 -65
  27. package/dist/ReferenceSequenceTrack/configSchema.d.ts +1 -27
  28. package/dist/ReferenceSequenceTrack/configSchema.js +2 -42
  29. package/dist/ReferenceSequenceTrack/index.d.ts +1 -1
  30. package/dist/SequenceSearchAdapter/SequenceSearchAdapter.d.ts +3 -2
  31. package/dist/SequenceSearchAdapter/SequenceSearchAdapter.js +2 -2
  32. package/dist/SequenceSearchAdapter/configSchema.d.ts +0 -15
  33. package/dist/SequenceSearchAdapter/configSchema.js +1 -19
  34. package/dist/SequenceSearchAdapter/index.d.ts +1 -1
  35. package/dist/SequenceSearchAdapter/index.js +11 -9
  36. package/dist/TwoBitAdapter/TwoBitAdapter.d.ts +22 -19
  37. package/dist/TwoBitAdapter/TwoBitAdapter.js +35 -37
  38. package/dist/TwoBitAdapter/configSchema.d.ts +0 -6
  39. package/dist/TwoBitAdapter/configSchema.js +1 -10
  40. package/dist/TwoBitAdapter/index.d.ts +1 -1
  41. package/dist/UnindexedFastaAdapter/UnindexedFastaAdapter.d.ts +4 -3
  42. package/dist/UnindexedFastaAdapter/UnindexedFastaAdapter.js +3 -3
  43. package/dist/UnindexedFastaAdapter/configSchema.d.ts +0 -6
  44. package/dist/UnindexedFastaAdapter/configSchema.js +1 -10
  45. package/dist/UnindexedFastaAdapter/index.d.ts +1 -1
  46. package/dist/UnindexedFastaAdapter/index.js +11 -9
  47. package/dist/createExtensionPoints.d.ts +1 -1
  48. package/dist/index.d.ts +1 -1
  49. package/dist/index.js +5 -5
  50. package/esm/BgzipFastaAdapter/configSchema.d.ts +0 -12
  51. package/esm/BgzipFastaAdapter/configSchema.js +1 -16
  52. package/esm/BgzipFastaAdapter/index.d.ts +1 -1
  53. package/esm/BgzipFastaAdapter/index.js +11 -9
  54. package/esm/ChromSizesAdapter/ChromSizesAdapter.d.ts +2 -1
  55. package/esm/ChromSizesAdapter/ChromSizesAdapter.js +2 -2
  56. package/esm/ChromSizesAdapter/configSchema.d.ts +0 -3
  57. package/esm/ChromSizesAdapter/configSchema.js +1 -7
  58. package/esm/ChromSizesAdapter/index.d.ts +1 -1
  59. package/esm/DivSequenceRenderer/components/DivSequenceRendering.d.ts +3 -3
  60. package/esm/DivSequenceRenderer/components/DivSequenceRendering.js +4 -10
  61. package/esm/DivSequenceRenderer/configSchema.d.ts +0 -3
  62. package/esm/DivSequenceRenderer/configSchema.js +1 -7
  63. package/esm/DivSequenceRenderer/index.d.ts +1 -1
  64. package/esm/DivSequenceRenderer/index.js +0 -1
  65. package/esm/IndexedFastaAdapter/IndexedFastaAdapter.d.ts +6 -10
  66. package/esm/IndexedFastaAdapter/IndexedFastaAdapter.js +47 -41
  67. package/esm/IndexedFastaAdapter/configSchema.d.ts +0 -9
  68. package/esm/IndexedFastaAdapter/configSchema.js +1 -13
  69. package/esm/IndexedFastaAdapter/index.d.ts +1 -1
  70. package/esm/IndexedFastaAdapter/index.js +11 -9
  71. package/esm/LinearReferenceSequenceDisplay/configSchema.d.ts +0 -3
  72. package/esm/LinearReferenceSequenceDisplay/configSchema.js +1 -7
  73. package/esm/LinearReferenceSequenceDisplay/index.d.ts +1 -1
  74. package/esm/LinearReferenceSequenceDisplay/model.d.ts +11 -92
  75. package/esm/LinearReferenceSequenceDisplay/model.js +5 -66
  76. package/esm/ReferenceSequenceTrack/configSchema.d.ts +1 -27
  77. package/esm/ReferenceSequenceTrack/configSchema.js +2 -42
  78. package/esm/ReferenceSequenceTrack/index.d.ts +1 -1
  79. package/esm/SequenceSearchAdapter/SequenceSearchAdapter.d.ts +3 -2
  80. package/esm/SequenceSearchAdapter/SequenceSearchAdapter.js +3 -3
  81. package/esm/SequenceSearchAdapter/configSchema.d.ts +0 -15
  82. package/esm/SequenceSearchAdapter/configSchema.js +1 -19
  83. package/esm/SequenceSearchAdapter/index.d.ts +1 -1
  84. package/esm/SequenceSearchAdapter/index.js +11 -9
  85. package/esm/TwoBitAdapter/TwoBitAdapter.d.ts +22 -19
  86. package/esm/TwoBitAdapter/TwoBitAdapter.js +35 -37
  87. package/esm/TwoBitAdapter/configSchema.d.ts +0 -6
  88. package/esm/TwoBitAdapter/configSchema.js +1 -10
  89. package/esm/TwoBitAdapter/index.d.ts +1 -1
  90. package/esm/UnindexedFastaAdapter/UnindexedFastaAdapter.d.ts +4 -3
  91. package/esm/UnindexedFastaAdapter/UnindexedFastaAdapter.js +4 -4
  92. package/esm/UnindexedFastaAdapter/configSchema.d.ts +0 -6
  93. package/esm/UnindexedFastaAdapter/configSchema.js +1 -10
  94. package/esm/UnindexedFastaAdapter/index.d.ts +1 -1
  95. package/esm/UnindexedFastaAdapter/index.js +11 -9
  96. package/esm/createExtensionPoints.d.ts +1 -1
  97. package/esm/createExtensionPoints.js +1 -1
  98. package/esm/index.d.ts +1 -1
  99. package/esm/index.js +5 -5
  100. package/package.json +2 -2
@@ -1,70 +1,37 @@
1
- import { types } from 'mobx-state-tree';
2
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
3
- // Note: this is primarily a copy of createBaseTrackConfig, except with a
4
- // subset of the config slots, to avoid including fields that don't make sense
5
- // for the ReferenceSequenceTrack
6
- /**
7
- * #config ReferenceSequenceTrack
8
- * used to display base level DNA sequence tracks
9
- */
10
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ import { types } from 'mobx-state-tree';
3
+ function x() { }
11
4
  export function createReferenceSeqTrackConfig(pluginManager) {
12
5
  return ConfigurationSchema('ReferenceSequenceTrack', {
13
- /**
14
- * #slot
15
- * configuration for track adapter
16
- */
17
6
  adapter: pluginManager.pluggableConfigSchemaType('adapter'),
18
- /**
19
- * #slot
20
- * configuration for the displays e.g. LinearReferenceSequenceDisplay
21
- */
22
7
  displays: types.array(pluginManager.pluggableConfigSchemaType('display')),
23
- /**
24
- * #slot
25
- */
26
8
  name: {
27
9
  type: 'string',
28
10
  description: 'optional track name, otherwise uses the "Reference sequence (assemblyName)"',
29
11
  defaultValue: '',
30
12
  },
31
- /**
32
- * #slot
33
- */
34
13
  sequenceType: {
35
14
  type: 'string',
36
15
  description: 'either dna or pep',
37
16
  defaultValue: 'dna',
38
17
  },
39
- /**
40
- * #slot
41
- */
42
18
  description: {
43
19
  description: 'a description of the track',
44
20
  type: 'string',
45
21
  defaultValue: '',
46
22
  },
47
- /**
48
- * #slot
49
- */
50
23
  metadata: {
51
24
  type: 'frozen',
52
25
  description: 'anything to add about this track',
53
26
  defaultValue: {},
54
27
  },
55
28
  formatAbout: ConfigurationSchema('FormatAbout', {
56
- /**
57
- * #slot formatAbout.config
58
- */
59
29
  config: {
60
30
  type: 'frozen',
61
31
  description: 'formats configuration in about dialog',
62
32
  defaultValue: {},
63
33
  contextVariable: ['config'],
64
34
  },
65
- /**
66
- * #slot formatAbout.hideUris
67
- */
68
35
  hideUris: {
69
36
  type: 'boolean',
70
37
  defaultValue: false,
@@ -76,9 +43,6 @@ export function createReferenceSeqTrackConfig(pluginManager) {
76
43
  const displayTypes = new Set();
77
44
  const { displays = [] } = snap;
78
45
  if (snap.trackId !== 'placeholderId') {
79
- // Gets the displays on the track snapshot and the possible displays
80
- // from the track type and adds any missing possible displays to the
81
- // snapshot
82
46
  displays.forEach((d) => d && displayTypes.add(d.type));
83
47
  const trackType = pluginManager.getTrackType(snap.type);
84
48
  trackType === null || trackType === void 0 ? void 0 : trackType.displayTypes.forEach(displayType => {
@@ -92,10 +56,6 @@ export function createReferenceSeqTrackConfig(pluginManager) {
92
56
  }
93
57
  return { ...snap, displays };
94
58
  },
95
- /**
96
- * #identifier
97
- * all tracks have a globally unique 'trackId'
98
- */
99
59
  explicitIdentifier: 'trackId',
100
60
  explicitlyTyped: true,
101
61
  actions: (self) => ({
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function ReferenceSequenceTrackF(pluginManager: PluginManager): void;
@@ -1,5 +1,6 @@
1
- import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { Feature, Region } from '@jbrowse/core/util';
1
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import type { Feature, Region } from '@jbrowse/core/util';
3
4
  export default class SequenceSearchAdapter extends BaseFeatureDataAdapter {
4
5
  configure(): Promise<BaseFeatureDataAdapter>;
5
6
  getRefNames(): Promise<string[]>;
@@ -1,8 +1,8 @@
1
- import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
1
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import { SimpleFeature, doesIntersect2, revcom } from '@jbrowse/core/util';
2
3
  import { ObservableCreate } from '@jbrowse/core/util/rxjs';
3
- import { SimpleFeature, revcom, doesIntersect2, } from '@jbrowse/core/util';
4
- import { toArray } from 'rxjs/operators';
5
4
  import { firstValueFrom } from 'rxjs';
5
+ import { toArray } from 'rxjs/operators';
6
6
  export default class SequenceSearchAdapter extends BaseFeatureDataAdapter {
7
7
  async configure() {
8
8
  var _a;
@@ -1,36 +1,21 @@
1
1
  declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  search: {
6
3
  type: string;
7
4
  defaultValue: string;
8
5
  description: string;
9
6
  };
10
- /**
11
- * #slot
12
- */
13
7
  sequenceAdapter: {
14
8
  type: string;
15
9
  defaultValue: null;
16
10
  };
17
- /**
18
- * #slot
19
- */
20
11
  searchForward: {
21
12
  type: string;
22
13
  defaultValue: boolean;
23
14
  };
24
- /**
25
- * #slot
26
- */
27
15
  searchReverse: {
28
16
  type: string;
29
17
  defaultValue: boolean;
30
18
  };
31
- /**
32
- * #slot
33
- */
34
19
  caseInsensitive: {
35
20
  type: string;
36
21
  defaultValue: boolean;
@@ -1,41 +1,23 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config SequenceSearchAdapter
4
- */
5
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
6
3
  const configSchema = ConfigurationSchema('SequenceSearchAdapter', {
7
- /**
8
- * #slot
9
- */
10
4
  search: {
11
5
  type: 'string',
12
6
  defaultValue: '',
13
7
  description: 'Search string or regex to search for',
14
8
  },
15
- /**
16
- * #slot
17
- */
18
9
  sequenceAdapter: {
19
10
  type: 'frozen',
20
11
  defaultValue: null,
21
12
  },
22
- /**
23
- * #slot
24
- */
25
13
  searchForward: {
26
14
  type: 'boolean',
27
15
  defaultValue: true,
28
16
  },
29
- /**
30
- * #slot
31
- */
32
17
  searchReverse: {
33
18
  type: 'boolean',
34
19
  defaultValue: true,
35
20
  },
36
- /**
37
- * #slot
38
- */
39
21
  caseInsensitive: {
40
22
  type: 'boolean',
41
23
  defaultValue: true,
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function SequenceSearchAdapterF(pluginManager: PluginManager): void;
@@ -1,13 +1,15 @@
1
1
  import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
2
2
  import configSchema from './configSchema';
3
3
  export default function SequenceSearchAdapterF(pluginManager) {
4
- pluginManager.addAdapterType(() => new AdapterType({
5
- name: 'SequenceSearchAdapter',
6
- displayName: 'Sequence search adapter',
7
- adapterMetadata: {
8
- hiddenFromGUI: true,
9
- },
10
- configSchema,
11
- getAdapterClass: () => import('./SequenceSearchAdapter').then(r => r.default),
12
- }));
4
+ pluginManager.addAdapterType(() => {
5
+ return new AdapterType({
6
+ name: 'SequenceSearchAdapter',
7
+ displayName: 'Sequence search adapter',
8
+ adapterMetadata: {
9
+ hiddenFromGUI: true,
10
+ },
11
+ configSchema,
12
+ getAdapterClass: () => import('./SequenceSearchAdapter').then(r => r.default),
13
+ });
14
+ });
13
15
  }
@@ -1,26 +1,29 @@
1
+ import { TwoBitFile } from '@gmod/twobit';
1
2
  import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { NoAssemblyRegion } from '@jbrowse/core/util/types';
3
- import { Feature } from '@jbrowse/core/util/simpleFeature';
4
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
5
- import PluginManager from '@jbrowse/core/PluginManager';
6
- import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
3
+ import type { Feature } from '@jbrowse/core/util/simpleFeature';
4
+ import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
7
5
  export default class TwoBitAdapter extends BaseSequenceAdapter {
8
- private twobit;
9
- protected chromSizesData: Promise<Record<string, number> | undefined>;
6
+ protected setupP?: Promise<{
7
+ twobit: TwoBitFile;
8
+ chromSizesData: Record<string, number> | undefined;
9
+ }>;
10
10
  private initChromSizes;
11
- constructor(config: AnyConfigurationModel, getSubAdapter?: getSubAdapterType, pluginManager?: PluginManager);
11
+ setupPre(): Promise<{
12
+ twobit: TwoBitFile;
13
+ chromSizesData: {
14
+ [k: string]: number;
15
+ } | undefined;
16
+ }>;
17
+ setup(): Promise<{
18
+ twobit: TwoBitFile;
19
+ chromSizesData: Record<string, number> | undefined;
20
+ }>;
12
21
  getRefNames(): Promise<string[]>;
13
- getRegions(): Promise<NoAssemblyRegion[]>;
14
- /**
15
- * Fetch features for a certain region
16
- * @param param -
17
- * @returns Observable of Feature objects in the region
18
- */
22
+ getRegions(): Promise<{
23
+ refName: string;
24
+ start: number;
25
+ end: number;
26
+ }[]>;
19
27
  getFeatures({ refName, start, end }: NoAssemblyRegion): import("rxjs").Observable<Feature>;
20
- /**
21
- * called to provide a hint that data tied to a certain region
22
- * will not be needed for the foreseeable future and can be purged
23
- * from caches, etc
24
- */
25
28
  freeResources(): void;
26
29
  }
@@ -1,15 +1,12 @@
1
+ import { TwoBitFile } from '@gmod/twobit';
2
+ import { readConfObject } from '@jbrowse/core/configuration';
1
3
  import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
4
  import { openLocation } from '@jbrowse/core/util/io';
3
5
  import { ObservableCreate } from '@jbrowse/core/util/rxjs';
4
6
  import SimpleFeature from '@jbrowse/core/util/simpleFeature';
5
- import { TwoBitFile } from '@gmod/twobit';
6
- import { readConfObject } from '@jbrowse/core/configuration';
7
7
  export default class TwoBitAdapter extends BaseSequenceAdapter {
8
8
  async initChromSizes() {
9
9
  const conf = readConfObject(this.config, 'chromSizesLocation');
10
- // check against default and empty in case someone makes the field blank in
11
- // config editor, may want better way to check "optional config slots" in
12
- // future
13
10
  if (conf.uri !== '/path/to/default.chrom.sizes' && conf.uri !== '') {
14
11
  const file = openLocation(conf, this.pluginManager);
15
12
  const data = await file.readFile('utf8');
@@ -23,23 +20,31 @@ export default class TwoBitAdapter extends BaseSequenceAdapter {
23
20
  }
24
21
  return undefined;
25
22
  }
26
- constructor(config, getSubAdapter, pluginManager) {
27
- super(config, getSubAdapter, pluginManager);
28
- const pm = this.pluginManager;
29
- this.chromSizesData = this.initChromSizes();
30
- this.twobit = new TwoBitFile({
31
- filehandle: openLocation(this.getConf('twoBitLocation'), pm),
32
- });
23
+ async setupPre() {
24
+ return {
25
+ twobit: new TwoBitFile({
26
+ filehandle: openLocation(this.getConf('twoBitLocation'), this.pluginManager),
27
+ }),
28
+ chromSizesData: await this.initChromSizes(),
29
+ };
33
30
  }
34
- async getRefNames() {
35
- const chromSizesData = await this.chromSizesData;
36
- if (chromSizesData) {
37
- return Object.keys(chromSizesData);
31
+ async setup() {
32
+ if (!this.setupP) {
33
+ this.setupP = this.setupPre().catch((e) => {
34
+ this.setupP = undefined;
35
+ throw e;
36
+ });
38
37
  }
39
- return this.twobit.getSequenceNames();
38
+ return this.setupP;
39
+ }
40
+ async getRefNames() {
41
+ const { chromSizesData, twobit } = await this.setup();
42
+ return chromSizesData
43
+ ? Object.keys(chromSizesData)
44
+ : twobit.getSequenceNames();
40
45
  }
41
46
  async getRegions() {
42
- const chromSizesData = await this.chromSizesData;
47
+ const { chromSizesData, twobit } = await this.setup();
43
48
  if (chromSizesData) {
44
49
  return Object.keys(chromSizesData).map(refName => ({
45
50
  refName,
@@ -47,23 +52,21 @@ export default class TwoBitAdapter extends BaseSequenceAdapter {
47
52
  end: chromSizesData[refName],
48
53
  }));
49
54
  }
50
- const refSizes = await this.twobit.getSequenceSizes();
51
- return Object.keys(refSizes).map(refName => ({
52
- refName,
53
- start: 0,
54
- end: refSizes[refName],
55
- }));
55
+ else {
56
+ const refSizes = await twobit.getSequenceSizes();
57
+ return Object.keys(refSizes).map(refName => ({
58
+ refName,
59
+ start: 0,
60
+ end: refSizes[refName],
61
+ }));
62
+ }
56
63
  }
57
- /**
58
- * Fetch features for a certain region
59
- * @param param -
60
- * @returns Observable of Feature objects in the region
61
- */
62
64
  getFeatures({ refName, start, end }) {
63
65
  return ObservableCreate(async (observer) => {
64
- const size = await this.twobit.getSequenceSize(refName);
66
+ const { twobit } = await this.setup();
67
+ const size = await twobit.getSequenceSize(refName);
65
68
  const regionEnd = size !== undefined ? Math.min(size, end) : end;
66
- const seq = await this.twobit.getSequence(refName, start, regionEnd);
69
+ const seq = await twobit.getSequence(refName, start, regionEnd);
67
70
  if (seq) {
68
71
  observer.next(new SimpleFeature({
69
72
  id: `${refName} ${start}-${regionEnd}`,
@@ -73,10 +76,5 @@ export default class TwoBitAdapter extends BaseSequenceAdapter {
73
76
  observer.complete();
74
77
  });
75
78
  }
76
- /**
77
- * called to provide a hint that data tied to a certain region
78
- * will not be needed for the foreseeable future and can be purged
79
- * from caches, etc
80
- */
81
- freeResources( /* { region } */) { }
79
+ freeResources() { }
82
80
  }
@@ -1,7 +1,4 @@
1
1
  declare const TwoBitAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  twoBitLocation: {
6
3
  type: string;
7
4
  defaultValue: {
@@ -9,9 +6,6 @@ declare const TwoBitAdapter: import("@jbrowse/core/configuration/configurationSc
9
6
  locationType: string;
10
7
  };
11
8
  };
12
- /**
13
- * #slot
14
- */
15
9
  chromSizesLocation: {
16
10
  type: string;
17
11
  defaultValue: {
@@ -1,19 +1,10 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config TwoBitAdapter
4
- */
5
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
6
3
  const TwoBitAdapter = ConfigurationSchema('TwoBitAdapter', {
7
- /**
8
- * #slot
9
- */
10
4
  twoBitLocation: {
11
5
  type: 'fileLocation',
12
6
  defaultValue: { uri: '/path/to/my.2bit', locationType: 'UriLocation' },
13
7
  },
14
- /**
15
- * #slot
16
- */
17
8
  chromSizesLocation: {
18
9
  type: 'fileLocation',
19
10
  defaultValue: {
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function TwoBitAdapterF(pluginManager: PluginManager): void;
@@ -1,6 +1,7 @@
1
- import { BaseSequenceAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { NoAssemblyRegion } from '@jbrowse/core/util/types';
3
- import { Feature } from '@jbrowse/core/util';
1
+ import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
2
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import type { Feature } from '@jbrowse/core/util';
4
+ import type { NoAssemblyRegion } from '@jbrowse/core/util/types';
4
5
  declare function parseSmallFasta(text: string): Map<string, {
5
6
  readonly description: string;
6
7
  readonly sequence: string;
@@ -1,8 +1,8 @@
1
- import { BaseSequenceAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
1
+ import { readConfObject } from '@jbrowse/core/configuration';
2
+ import { BaseSequenceAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import { SimpleFeature } from '@jbrowse/core/util';
2
4
  import { openLocation } from '@jbrowse/core/util/io';
3
5
  import { ObservableCreate } from '@jbrowse/core/util/rxjs';
4
- import { SimpleFeature } from '@jbrowse/core/util';
5
- import { readConfObject } from '@jbrowse/core/configuration';
6
6
  function parseSmallFasta(text) {
7
7
  return new Map(text
8
8
  .split('>')
@@ -80,5 +80,5 @@ export default class UnindexedFastaAdapter extends BaseSequenceAdapter {
80
80
  observer.complete();
81
81
  });
82
82
  }
83
- freeResources( /* { region } */) { }
83
+ freeResources() { }
84
84
  }
@@ -4,9 +4,6 @@ declare const UnindexedFastaAdapter: import("@jbrowse/core/configuration/configu
4
4
  defaultValue: string;
5
5
  contextVariable: string[];
6
6
  };
7
- /**
8
- * #slot
9
- */
10
7
  fastaLocation: {
11
8
  type: string;
12
9
  defaultValue: {
@@ -14,9 +11,6 @@ declare const UnindexedFastaAdapter: import("@jbrowse/core/configuration/configu
14
11
  locationType: string;
15
12
  };
16
13
  };
17
- /**
18
- * #slot
19
- */
20
14
  metadataLocation: {
21
15
  description: string;
22
16
  type: string;
@@ -1,17 +1,11 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config UnindexedFastaAdapter
4
- */
5
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
6
3
  const UnindexedFastaAdapter = ConfigurationSchema('UnindexedFastaAdapter', {
7
4
  rewriteRefNames: {
8
5
  type: 'string',
9
6
  defaultValue: '',
10
7
  contextVariable: ['refName'],
11
8
  },
12
- /**
13
- * #slot
14
- */
15
9
  fastaLocation: {
16
10
  type: 'fileLocation',
17
11
  defaultValue: {
@@ -19,9 +13,6 @@ const UnindexedFastaAdapter = ConfigurationSchema('UnindexedFastaAdapter', {
19
13
  locationType: 'UriLocation',
20
14
  },
21
15
  },
22
- /**
23
- * #slot
24
- */
25
16
  metadataLocation: {
26
17
  description: 'Optional metadata file',
27
18
  type: 'fileLocation',
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function UnindexedFastaAdapterF(pluginManager: PluginManager): void;
@@ -1,13 +1,15 @@
1
1
  import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
2
2
  import configSchema from './configSchema';
3
3
  export default function UnindexedFastaAdapterF(pluginManager) {
4
- pluginManager.addAdapterType(() => new AdapterType({
5
- name: 'UnindexedFastaAdapter',
6
- displayName: 'Unindexed FASTA adapter',
7
- configSchema,
8
- adapterMetadata: {
9
- hiddenFromGUI: true,
10
- },
11
- getAdapterClass: () => import('./UnindexedFastaAdapter').then(r => r.default),
12
- }));
4
+ pluginManager.addAdapterType(() => {
5
+ return new AdapterType({
6
+ name: 'UnindexedFastaAdapter',
7
+ displayName: 'Unindexed FASTA adapter',
8
+ configSchema,
9
+ adapterMetadata: {
10
+ hiddenFromGUI: true,
11
+ },
12
+ getAdapterClass: () => import('./UnindexedFastaAdapter').then(r => r.default),
13
+ });
14
+ });
13
15
  }
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function ExtensionPointsF(pluginManager: PluginManager): void;
@@ -1,4 +1,4 @@
1
- import { makeIndex, getFileName, } from '@jbrowse/core/util/tracks';
1
+ import { getFileName, makeIndex } from '@jbrowse/core/util/tracks';
2
2
  export default function ExtensionPointsF(pluginManager) {
3
3
  pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
4
4
  return (file, index, adapterHint) => {
package/esm/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import PluginManager from '@jbrowse/core/PluginManager';
2
+ import type PluginManager from '@jbrowse/core/PluginManager';
3
3
  export default class SequencePlugin extends Plugin {
4
4
  name: string;
5
5
  install(pluginManager: PluginManager): void;
package/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import TwoBitAdapterF from './TwoBitAdapter';
3
- import DivSequenceRendererF from './DivSequenceRenderer';
4
2
  import BgzipFastaAdapterF from './BgzipFastaAdapter';
5
3
  import ChromSizesAdapterF from './ChromSizesAdapter';
4
+ import DivSequenceRendererF from './DivSequenceRenderer';
6
5
  import IndexedFastaAdapterF from './IndexedFastaAdapter';
7
- import UnindexedFastaAdapterF from './UnindexedFastaAdapter';
8
- import SequenceSearchAdapterF from './SequenceSearchAdapter';
9
- import ReferenceSequenceTrackF from './ReferenceSequenceTrack';
10
6
  import LinearReferenceSequenceDisplayF from './LinearReferenceSequenceDisplay';
7
+ import ReferenceSequenceTrackF from './ReferenceSequenceTrack';
8
+ import SequenceSearchAdapterF from './SequenceSearchAdapter';
9
+ import TwoBitAdapterF from './TwoBitAdapter';
10
+ import UnindexedFastaAdapterF from './UnindexedFastaAdapter';
11
11
  import createExtensionPoints from './createExtensionPoints';
12
12
  export default class SequencePlugin extends Plugin {
13
13
  constructor() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-sequence",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "JBrowse 2 sequence adapters, tracks, etc.",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -57,5 +57,5 @@
57
57
  "distModule": "esm/index.js",
58
58
  "srcModule": "src/index.ts",
59
59
  "module": "esm/index.js",
60
- "gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
60
+ "gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
61
61
  }