@jbrowse/plugin-comparative-adapters 2.17.0 → 3.0.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 (141) hide show
  1. package/dist/BlastTabularAdapter/BlastTabularAdapter.d.ts +3 -57
  2. package/dist/BlastTabularAdapter/BlastTabularAdapter.js +3 -10
  3. package/dist/BlastTabularAdapter/configSchema.d.ts +0 -15
  4. package/dist/BlastTabularAdapter/configSchema.js +1 -19
  5. package/dist/BlastTabularAdapter/index.d.ts +1 -1
  6. package/dist/BlastTabularAdapter/index.js +18 -8
  7. package/dist/ChainAdapter/ChainAdapter.d.ts +1 -1
  8. package/dist/ChainAdapter/ChainAdapter.js +2 -3
  9. package/dist/ChainAdapter/configSchema.d.ts +0 -14
  10. package/dist/ChainAdapter/configSchema.js +1 -19
  11. package/dist/ChainAdapter/index.d.ts +1 -1
  12. package/dist/ChainAdapter/index.js +18 -8
  13. package/dist/ChainAdapter/util.d.ts +1 -2
  14. package/dist/ChainAdapter/util.js +2 -49
  15. package/dist/ComparativeAddTrackComponent/ComparativeAddTrackComponent.d.ts +2 -0
  16. package/dist/ComparativeAddTrackComponent/ComparativeAddTrackComponent.js +31 -0
  17. package/dist/ComparativeAddTrackComponent/index.d.ts +2 -0
  18. package/dist/ComparativeAddTrackComponent/index.js +46 -0
  19. package/dist/DeltaAdapter/DeltaAdapter.d.ts +1 -1
  20. package/dist/DeltaAdapter/DeltaAdapter.js +2 -3
  21. package/dist/DeltaAdapter/configSchema.d.ts +0 -14
  22. package/dist/DeltaAdapter/configSchema.js +1 -19
  23. package/dist/DeltaAdapter/index.d.ts +1 -1
  24. package/dist/DeltaAdapter/index.js +18 -8
  25. package/dist/DeltaAdapter/util.d.ts +1 -2
  26. package/dist/DeltaAdapter/util.js +3 -30
  27. package/dist/GuessAdapter/index.d.ts +2 -0
  28. package/dist/GuessAdapter/index.js +74 -0
  29. package/dist/MCScanAddTrackComponent/MCScanAddTrackComponent.d.ts +2 -0
  30. package/dist/MCScanAddTrackComponent/MCScanAddTrackComponent.js +39 -0
  31. package/dist/MCScanAddTrackComponent/index.d.ts +2 -0
  32. package/dist/MCScanAddTrackComponent/index.js +46 -0
  33. package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
  34. package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +2 -15
  35. package/dist/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
  36. package/dist/MCScanAnchorsAdapter/configSchema.js +1 -16
  37. package/dist/MCScanAnchorsAdapter/index.d.ts +1 -1
  38. package/dist/MCScanAnchorsAdapter/index.js +18 -8
  39. package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
  40. package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +2 -13
  41. package/dist/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
  42. package/dist/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
  43. package/dist/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
  44. package/dist/MCScanSimpleAnchorsAdapter/index.js +18 -8
  45. package/dist/MashMapAdapter/MashMapAdapter.d.ts +1 -1
  46. package/dist/MashMapAdapter/MashMapAdapter.js +1 -2
  47. package/dist/MashMapAdapter/configSchema.d.ts +0 -12
  48. package/dist/MashMapAdapter/configSchema.js +1 -16
  49. package/dist/MashMapAdapter/index.d.ts +1 -1
  50. package/dist/MashMapAdapter/index.js +18 -8
  51. package/dist/PAFAdapter/PAFAdapter.d.ts +6 -5
  52. package/dist/PAFAdapter/PAFAdapter.js +4 -15
  53. package/dist/PAFAdapter/configSchema.d.ts +0 -12
  54. package/dist/PAFAdapter/configSchema.js +1 -16
  55. package/dist/PAFAdapter/index.d.ts +1 -1
  56. package/dist/PAFAdapter/index.js +18 -8
  57. package/dist/PAFAdapter/util.js +0 -35
  58. package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
  59. package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +5 -6
  60. package/dist/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
  61. package/dist/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
  62. package/dist/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
  63. package/dist/PairwiseIndexedPAFAdapter/index.js +18 -8
  64. package/dist/SyntenyFeature/index.js +0 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +11 -25
  67. package/dist/syntenyTypes.d.ts +3 -0
  68. package/dist/syntenyTypes.js +25 -0
  69. package/dist/util.d.ts +4 -5
  70. package/dist/util.js +2 -4
  71. package/esm/BlastTabularAdapter/BlastTabularAdapter.d.ts +3 -57
  72. package/esm/BlastTabularAdapter/BlastTabularAdapter.js +5 -12
  73. package/esm/BlastTabularAdapter/configSchema.d.ts +0 -15
  74. package/esm/BlastTabularAdapter/configSchema.js +1 -19
  75. package/esm/BlastTabularAdapter/index.d.ts +1 -1
  76. package/esm/BlastTabularAdapter/index.js +1 -1
  77. package/esm/ChainAdapter/ChainAdapter.d.ts +1 -1
  78. package/esm/ChainAdapter/ChainAdapter.js +2 -3
  79. package/esm/ChainAdapter/configSchema.d.ts +0 -14
  80. package/esm/ChainAdapter/configSchema.js +1 -19
  81. package/esm/ChainAdapter/index.d.ts +1 -1
  82. package/esm/ChainAdapter/index.js +1 -1
  83. package/esm/ChainAdapter/util.d.ts +1 -2
  84. package/esm/ChainAdapter/util.js +2 -49
  85. package/esm/ComparativeAddTrackComponent/ComparativeAddTrackComponent.d.ts +2 -0
  86. package/esm/ComparativeAddTrackComponent/ComparativeAddTrackComponent.js +29 -0
  87. package/esm/ComparativeAddTrackComponent/index.d.ts +2 -0
  88. package/esm/ComparativeAddTrackComponent/index.js +10 -0
  89. package/esm/DeltaAdapter/DeltaAdapter.d.ts +1 -1
  90. package/esm/DeltaAdapter/DeltaAdapter.js +2 -3
  91. package/esm/DeltaAdapter/configSchema.d.ts +0 -14
  92. package/esm/DeltaAdapter/configSchema.js +1 -19
  93. package/esm/DeltaAdapter/index.d.ts +1 -1
  94. package/esm/DeltaAdapter/index.js +1 -1
  95. package/esm/DeltaAdapter/util.d.ts +1 -2
  96. package/esm/DeltaAdapter/util.js +3 -30
  97. package/esm/GuessAdapter/index.d.ts +2 -0
  98. package/esm/GuessAdapter/index.js +71 -0
  99. package/esm/MCScanAddTrackComponent/MCScanAddTrackComponent.d.ts +2 -0
  100. package/esm/MCScanAddTrackComponent/MCScanAddTrackComponent.js +37 -0
  101. package/esm/MCScanAddTrackComponent/index.d.ts +2 -0
  102. package/esm/MCScanAddTrackComponent/index.js +10 -0
  103. package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
  104. package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +4 -17
  105. package/esm/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
  106. package/esm/MCScanAnchorsAdapter/configSchema.js +1 -16
  107. package/esm/MCScanAnchorsAdapter/index.d.ts +1 -1
  108. package/esm/MCScanAnchorsAdapter/index.js +1 -1
  109. package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
  110. package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +4 -15
  111. package/esm/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
  112. package/esm/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
  113. package/esm/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
  114. package/esm/MCScanSimpleAnchorsAdapter/index.js +1 -1
  115. package/esm/MashMapAdapter/MashMapAdapter.d.ts +1 -1
  116. package/esm/MashMapAdapter/MashMapAdapter.js +1 -2
  117. package/esm/MashMapAdapter/configSchema.d.ts +0 -12
  118. package/esm/MashMapAdapter/configSchema.js +1 -16
  119. package/esm/MashMapAdapter/index.d.ts +1 -1
  120. package/esm/MashMapAdapter/index.js +1 -1
  121. package/esm/PAFAdapter/PAFAdapter.d.ts +6 -5
  122. package/esm/PAFAdapter/PAFAdapter.js +6 -17
  123. package/esm/PAFAdapter/configSchema.d.ts +0 -12
  124. package/esm/PAFAdapter/configSchema.js +1 -16
  125. package/esm/PAFAdapter/index.d.ts +1 -1
  126. package/esm/PAFAdapter/index.js +1 -1
  127. package/esm/PAFAdapter/util.js +0 -35
  128. package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
  129. package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +6 -7
  130. package/esm/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
  131. package/esm/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
  132. package/esm/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
  133. package/esm/PairwiseIndexedPAFAdapter/index.js +1 -1
  134. package/esm/SyntenyFeature/index.js +0 -1
  135. package/esm/index.d.ts +1 -1
  136. package/esm/index.js +11 -25
  137. package/esm/syntenyTypes.d.ts +3 -0
  138. package/esm/syntenyTypes.js +22 -0
  139. package/esm/util.d.ts +4 -5
  140. package/esm/util.js +3 -5
  141. package/package.json +5 -5
@@ -2,38 +2,23 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
4
  const mobx_state_tree_1 = require("mobx-state-tree");
5
- /**
6
- * #config PairwiseIndexedPAFAdapter
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
5
+ function x() { }
9
6
  const PairwiseIndexedPAFAdapter = (0, configuration_1.ConfigurationSchema)('PairwiseIndexedPAFAdapter', {
10
- /**
11
- * #slot
12
- */
13
7
  assemblyNames: {
14
8
  type: 'stringArray',
15
9
  defaultValue: [],
16
10
  description: 'Array of assembly names to use for this file. The query assembly name is the first value in the array, target assembly name is the second',
17
11
  },
18
- /**
19
- * #slot
20
- */
21
12
  targetAssembly: {
22
13
  type: 'string',
23
14
  defaultValue: '',
24
15
  description: 'Alternative to assemblyNames: the target assembly name',
25
16
  },
26
- /**
27
- * #slot
28
- */
29
17
  queryAssembly: {
30
18
  type: 'string',
31
19
  defaultValue: '',
32
20
  description: 'Alternative to assemblyNames: the query assembly name',
33
21
  },
34
- /**
35
- * #slot
36
- */
37
22
  pifGzLocation: {
38
23
  type: 'fileLocation',
39
24
  description: 'location of pairwise tabix indexed PAF (pif)',
@@ -42,21 +27,12 @@ const PairwiseIndexedPAFAdapter = (0, configuration_1.ConfigurationSchema)('Pair
42
27
  locationType: 'UriLocation',
43
28
  },
44
29
  },
45
- /**
46
- * #slot
47
- */
48
30
  index: (0, configuration_1.ConfigurationSchema)('TabixIndex', {
49
- /**
50
- * #slot index.indexType
51
- */
52
31
  indexType: {
53
32
  model: mobx_state_tree_1.types.enumeration('IndexType', ['TBI', 'CSI']),
54
33
  type: 'stringEnum',
55
34
  defaultValue: 'TBI',
56
35
  },
57
- /**
58
- * #slot index.location
59
- */
60
36
  location: {
61
37
  type: 'fileLocation',
62
38
  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 PairwiseIndexedPAFAdapterF(pluginManager: PluginManager): void;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -35,7 +45,7 @@ function PairwiseIndexedPAFAdapterF(pluginManager) {
35
45
  displayName: 'Pairwise indexed PAF adapter',
36
46
  configSchema: configSchema_1.default,
37
47
  adapterMetadata: {
38
- hiddenFromGUI: true,
48
+ category: 'Synteny adapters',
39
49
  },
40
50
  getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./PairwiseIndexedPAFAdapter'))).then(r => r.default),
41
51
  }));
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const util_1 = require("@jbrowse/core/util");
4
4
  const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
5
- // locals
6
5
  const { getMismatches } = plugin_alignments_1.MismatchParser;
7
6
  class SyntenyFeature extends util_1.SimpleFeature {
8
7
  get(arg) {
package/dist/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 ComparativeAdaptersPlugin extends Plugin {
4
4
  name: string;
5
5
  install(pluginManager: PluginManager): void;
package/dist/index.js CHANGED
@@ -4,15 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
7
- const PAFAdapter_1 = __importDefault(require("./PAFAdapter"));
8
- const PairwiseIndexedPAFAdapter_1 = __importDefault(require("./PairwiseIndexedPAFAdapter"));
7
+ const BlastTabularAdapter_1 = __importDefault(require("./BlastTabularAdapter"));
8
+ const ChainAdapter_1 = __importDefault(require("./ChainAdapter"));
9
+ const ComparativeAddTrackComponent_1 = __importDefault(require("./ComparativeAddTrackComponent"));
10
+ const DeltaAdapter_1 = __importDefault(require("./DeltaAdapter"));
11
+ const GuessAdapter_1 = __importDefault(require("./GuessAdapter"));
12
+ const MCScanAddTrackComponent_1 = __importDefault(require("./MCScanAddTrackComponent"));
9
13
  const MCScanAnchorsAdapter_1 = __importDefault(require("./MCScanAnchorsAdapter"));
10
14
  const MCScanSimpleAnchorsAdapter_1 = __importDefault(require("./MCScanSimpleAnchorsAdapter"));
11
15
  const MashMapAdapter_1 = __importDefault(require("./MashMapAdapter"));
12
- const DeltaAdapter_1 = __importDefault(require("./DeltaAdapter"));
13
- const ChainAdapter_1 = __importDefault(require("./ChainAdapter"));
14
- const BlastTabularAdapter_1 = __importDefault(require("./BlastTabularAdapter"));
15
- const tracks_1 = require("@jbrowse/core/util/tracks");
16
+ const PAFAdapter_1 = __importDefault(require("./PAFAdapter"));
17
+ const PairwiseIndexedPAFAdapter_1 = __importDefault(require("./PairwiseIndexedPAFAdapter"));
16
18
  class ComparativeAdaptersPlugin extends Plugin_1.default {
17
19
  constructor() {
18
20
  super(...arguments);
@@ -27,25 +29,9 @@ class ComparativeAdaptersPlugin extends Plugin_1.default {
27
29
  (0, MCScanSimpleAnchorsAdapter_1.default)(pluginManager);
28
30
  (0, MashMapAdapter_1.default)(pluginManager);
29
31
  (0, BlastTabularAdapter_1.default)(pluginManager);
30
- pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
31
- return (file, index, adapterHint) => {
32
- const regexGuess = /\.paf/i;
33
- const adapterName = 'PAFAdapter';
34
- const fileName = (0, tracks_1.getFileName)(file);
35
- if (regexGuess.test(fileName) || adapterHint === adapterName) {
36
- return {
37
- type: adapterName,
38
- pafLocation: file,
39
- };
40
- }
41
- return adapterGuesser(file, index, adapterHint);
42
- };
43
- });
44
- pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', (trackTypeGuesser) => {
45
- return (adapterName) => adapterName === 'PAFAdapter'
46
- ? 'SyntenyTrack'
47
- : trackTypeGuesser(adapterName);
48
- });
32
+ (0, ComparativeAddTrackComponent_1.default)(pluginManager);
33
+ (0, MCScanAddTrackComponent_1.default)(pluginManager);
34
+ (0, GuessAdapter_1.default)(pluginManager);
49
35
  }
50
36
  }
51
37
  exports.default = ComparativeAdaptersPlugin;
@@ -0,0 +1,3 @@
1
+ export declare const syntenyTypes: string[];
2
+ export declare const pairwiseTypes: string[];
3
+ export declare const mcscanTypes: string[];
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mcscanTypes = exports.pairwiseTypes = exports.syntenyTypes = void 0;
4
+ exports.syntenyTypes = [
5
+ 'PAFAdapter',
6
+ 'ChainAdapter',
7
+ 'DeltaAdapter',
8
+ 'BlastTabularAdapter',
9
+ 'MashMapAdapter',
10
+ 'MCScanAnchorsAdapter',
11
+ 'MCScanSimpleAnchorsAdapter',
12
+ 'PairwiseIndexedPAFAdapter',
13
+ ];
14
+ exports.pairwiseTypes = [
15
+ 'PAFAdapter',
16
+ 'ChainAdapter',
17
+ 'DeltaAdapter',
18
+ 'MashMapAdapter',
19
+ 'BlastTabularAdapter',
20
+ 'PairwiseIndexedPAFAdapter',
21
+ ];
22
+ exports.mcscanTypes = [
23
+ 'MCScanAnchorsAdapter',
24
+ 'MCScanSimpleAnchorsAdapter',
25
+ ];
package/dist/util.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { GenericFilehandle } from 'generic-filehandle';
3
- import type { Buffer } from 'buffer';
4
- import { PAFRecord } from './PAFAdapter/util';
1
+ import type { PAFRecord } from './PAFAdapter/util';
2
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import type { GenericFilehandle } from 'generic-filehandle2';
5
4
  export declare function parseBed(text: string): Map<string | undefined, {
6
5
  refName: string | undefined;
7
6
  start: number;
@@ -12,7 +11,7 @@ export declare function parseBed(text: string): Map<string | undefined, {
12
11
  }>;
13
12
  export declare function readFile(file: GenericFilehandle, opts?: BaseOptions): Promise<string>;
14
13
  export declare function zip(a: number[], b: number[]): [number, number][];
15
- export declare function parseLineByLine<T>(buffer: Buffer, cb: (line: string) => T | undefined): T[];
14
+ export declare function parseLineByLine<T>(buffer: Uint8Array, cb: (line: string) => T | undefined): T[];
16
15
  export declare function parsePAFLine(line: string): PAFRecord;
17
16
  export declare function flipCigar(cigar: string[]): (string | undefined)[];
18
17
  export declare function swapIndelCigar(cigar: string): string;
package/dist/util.js CHANGED
@@ -28,9 +28,7 @@ function parseBed(text) {
28
28
  }));
29
29
  }
30
30
  async function readFile(file, opts) {
31
- const buf = await (0, util_1.fetchAndMaybeUnzip)(file, opts);
32
- const decoder = new TextDecoder('utf8');
33
- return decoder.decode(buf);
31
+ return (0, util_1.fetchAndMaybeUnzipText)(file, opts);
34
32
  }
35
33
  function zip(a, b) {
36
34
  return a.map((e, i) => [e, b[i]]);
@@ -40,7 +38,7 @@ function parseLineByLine(buffer, cb) {
40
38
  const entries = [];
41
39
  const decoder = new TextDecoder('utf8');
42
40
  while (blockStart < buffer.length) {
43
- const n = buffer.indexOf('\n', blockStart);
41
+ const n = buffer.indexOf(10, blockStart);
44
42
  if (n === -1) {
45
43
  break;
46
44
  }
@@ -1,109 +1,55 @@
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
  interface BlastColumns {
4
- /** Query Seq-id */
5
5
  qseqid?: string;
6
- /** Query GI */
7
6
  qgi?: string;
8
- /** Query accesion */
9
7
  qacc?: string;
10
- /** Subject Seq-id */
11
8
  sseqid?: string;
12
- /** All subject Seq-id(s), separated by a ';' */
13
9
  sallseqid?: string;
14
- /** Subject GI */
15
10
  sgi?: string;
16
- /** All subject GIs */
17
11
  sallgi?: string;
18
- /** Subject accession */
19
12
  sacc?: string;
20
- /** All subject accessions */
21
13
  sallacc?: string;
22
- /** Start of alignment in query */
23
14
  qstart?: number;
24
- /** End of alignment in query */
25
15
  qend?: number;
26
- /** Start of alignment in subject */
27
16
  sstart?: number;
28
- /** End of alignment in subject */
29
17
  send?: number;
30
- /** Aligned part of query sequence */
31
18
  qseq?: string;
32
- /** Aligned part of subject sequence */
33
19
  sseq?: string;
34
- /** Expect value */
35
20
  evalue?: string;
36
- /** Bit score */
37
21
  bitscore?: string;
38
- /** Raw score */
39
22
  score?: string;
40
- /** Alignment length */
41
23
  length?: string;
42
- /** Percentage of identical matches */
43
24
  pident?: string;
44
- /** Number of identical matches */
45
25
  nident?: string;
46
- /** Number of mismatches */
47
26
  mismatch?: string;
48
- /** Number of positive-scoring matches */
49
27
  positive?: string;
50
- /** Number of gap openings */
51
28
  gapopen?: string;
52
- /** Total number of gap */
53
29
  gaps?: string;
54
- /** Percentage of positive-scoring matches */
55
30
  ppos?: string;
56
- /** Query and subject frames separated by a '/' */
57
31
  frames?: string;
58
- /** Query frame */
59
32
  qframe?: string;
60
- /** Subject frame */
61
33
  sframe?: string;
62
- /** Blast traceback operations (BTOP) */
63
34
  btop?: string;
64
- /** Unique Subject Taxonomy ID(s), separated by a ';'(in numerical order) */
65
35
  staxids?: string;
66
- /** Unique Subject Scientific Name(s), separated by a ';' */
67
36
  sscinames?: string;
68
- /** Unique Subject Common Name(s), separated by a ';' */
69
37
  scomnames?: string;
70
- /**
71
- * Unique Subject Blast Name(s), separated by a ';' (in alphabetical order)
72
- */
73
38
  sblastnames?: string;
74
- /**
75
- * Unique Subject Super Kingdom(s), separated by a ';' (in alphabetical order)
76
- */
77
39
  sskingdoms?: string;
78
- /** Subject Title */
79
40
  stitle?: string;
80
- /** All Subject Title(s), separated by a '<>' */
81
41
  salltitles?: string;
82
- /** Subject Strand */
83
42
  sstrand?: string;
84
- /** Query Coverage Per Subject (for all HSPs) */
85
43
  qcovs?: string;
86
- /** Query Coverage Per HSP */
87
44
  qcovhsp?: string;
88
- /**
89
- * A measure of Query Coverage that counts a position in a subject sequence
90
- * for this measure only once. The second time the position is aligned to the
91
- * query is not counted towards this measure.
92
- */
93
45
  qcovus?: string;
94
46
  }
95
47
  interface BlastRecord extends BlastColumns {
96
- /** Query Seq-id */
97
48
  qseqid: string;
98
- /** Subject Seq-id */
99
49
  sseqid: string;
100
- /** Start of alignment in query */
101
50
  qstart: number;
102
- /** End of alignment in query */
103
51
  qend: number;
104
- /** Start of alignment in subject */
105
52
  sstart: number;
106
- /** End of alignment in subject */
107
53
  send: number;
108
54
  }
109
55
  export default class BlastTabularAdapter extends BaseFeatureDataAdapter {
@@ -1,10 +1,10 @@
1
1
  import { readConfObject } from '@jbrowse/core/configuration';
2
- import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
3
- import { ObservableCreate } from '@jbrowse/core/util/rxjs';
4
- import { doesIntersect2, fetchAndMaybeUnzip, } from '@jbrowse/core/util';
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import { doesIntersect2, fetchAndMaybeUnzip } from '@jbrowse/core/util';
5
4
  import { openLocation } from '@jbrowse/core/util/io';
6
- import { parseLineByLine } from '../util';
5
+ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
7
6
  import SyntenyFeature from '../SyntenyFeature';
7
+ import { parseLineByLine } from '../util';
8
8
  function createBlastLineParser(columns) {
9
9
  const columnNames = columns.trim().split(' ');
10
10
  const qseqidIndex = columnNames.indexOf('qseqid');
@@ -63,7 +63,6 @@ function createBlastLineParser(columns) {
63
63
  if (!value) {
64
64
  continue;
65
65
  }
66
- // @ts-expect-error
67
66
  record[columnName] = value;
68
67
  }
69
68
  return record;
@@ -86,9 +85,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
86
85
  return parseLineByLine(buf, createBlastLineParser(columns));
87
86
  }
88
87
  async hasDataForRefName() {
89
- // determining this properly is basically a call to getFeatures
90
- // so is not really that important, and has to be true or else
91
- // getFeatures is never called (BaseAdapter filters it out)
92
88
  return true;
93
89
  }
94
90
  getAssemblyNames() {
@@ -102,7 +98,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
102
98
  }
103
99
  async getRefNames(opts = {}) {
104
100
  var _a;
105
- // @ts-expect-error
106
101
  const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
107
102
  const feats = await this.getData(opts);
108
103
  const idx = this.getAssemblyNames().indexOf(r1);
@@ -120,8 +115,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
120
115
  return ObservableCreate(async (observer) => {
121
116
  const blastRecords = await this.getData(opts);
122
117
  const [queryAssembly, targetAssembly] = this.getAssemblyNames();
123
- // The index of the assembly name in the query list corresponds to the
124
- // adapter in the subadapters list
125
118
  const { refName: queryRefName, assemblyName: queryAssemblyName, start: queryStart, end: queryEnd, } = query;
126
119
  if (queryAssemblyName !== targetAssembly &&
127
120
  queryAssemblyName !== queryAssembly) {
@@ -196,7 +189,7 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
196
189
  observer.complete();
197
190
  });
198
191
  }
199
- freeResources( /* { query } */) { }
192
+ freeResources() { }
200
193
  }
201
194
  BlastTabularAdapter.capabilities = ['getFeatures', 'getRefNames'];
202
195
  export default BlastTabularAdapter;
@@ -1,31 +1,19 @@
1
1
  declare const BlastTabularAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  assemblyNames: {
6
3
  type: string;
7
4
  defaultValue: never[];
8
5
  description: string;
9
6
  };
10
- /**
11
- * #slot
12
- */
13
7
  targetAssembly: {
14
8
  type: string;
15
9
  defaultValue: string;
16
10
  description: string;
17
11
  };
18
- /**
19
- * #slot
20
- */
21
12
  queryAssembly: {
22
13
  type: string;
23
14
  defaultValue: string;
24
15
  description: string;
25
16
  };
26
- /**
27
- * #slot
28
- */
29
17
  blastTableLocation: {
30
18
  type: string;
31
19
  defaultValue: {
@@ -33,9 +21,6 @@ declare const BlastTabularAdapter: import("@jbrowse/core/configuration/configura
33
21
  locationType: string;
34
22
  };
35
23
  };
36
- /**
37
- * #slot
38
- */
39
24
  columns: {
40
25
  type: string;
41
26
  description: string;
@@ -1,36 +1,21 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config BlastTabularAdapter
4
- */
5
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
6
3
  const BlastTabularAdapter = ConfigurationSchema('BlastTabularAdapter', {
7
- /**
8
- * #slot
9
- */
10
4
  assemblyNames: {
11
5
  type: 'stringArray',
12
6
  defaultValue: [],
13
7
  description: 'Query assembly is the first value in the array, target assembly is the second',
14
8
  },
15
- /**
16
- * #slot
17
- */
18
9
  targetAssembly: {
19
10
  type: 'string',
20
11
  defaultValue: '',
21
12
  description: 'Alternative to assemblyNames array: the target assembly',
22
13
  },
23
- /**
24
- * #slot
25
- */
26
14
  queryAssembly: {
27
15
  type: 'string',
28
16
  defaultValue: '',
29
17
  description: 'Alternative to assemblyNames array: the query assembly',
30
18
  },
31
- /**
32
- * #slot
33
- */
34
19
  blastTableLocation: {
35
20
  type: 'fileLocation',
36
21
  defaultValue: {
@@ -38,9 +23,6 @@ const BlastTabularAdapter = ConfigurationSchema('BlastTabularAdapter', {
38
23
  locationType: 'UriLocation',
39
24
  },
40
25
  },
41
- /**
42
- * #slot
43
- */
44
26
  columns: {
45
27
  type: 'string',
46
28
  description: 'Optional space-separated column name list. If custom columns were used in outfmt, enter them here exactly as specified in the command. At least qseqid, sseqid, qstart, qend, sstart, and send are required',
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function BlastTabularAdapterF(pluginManager: PluginManager): void;
@@ -6,7 +6,7 @@ export default function BlastTabularAdapterF(pluginManager) {
6
6
  displayName: 'Tabular BLAST output adapter',
7
7
  configSchema,
8
8
  adapterMetadata: {
9
- hiddenFromGUI: true,
9
+ category: 'Synteny adapters',
10
10
  },
11
11
  getAdapterClass: () => import('./BlastTabularAdapter').then(r => r.default),
12
12
  }));
@@ -1,5 +1,5 @@
1
- import { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
1
  import PAFAdapter from '../PAFAdapter/PAFAdapter';
2
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
3
3
  export default class ChainAdapter extends PAFAdapter {
4
4
  setupPre(opts?: BaseOptions): Promise<{
5
5
  qname: string;
@@ -1,8 +1,7 @@
1
- import { openLocation } from '@jbrowse/core/util/io';
2
1
  import { fetchAndMaybeUnzip } from '@jbrowse/core/util';
3
- // locals
4
- import PAFAdapter from '../PAFAdapter/PAFAdapter';
2
+ import { openLocation } from '@jbrowse/core/util/io';
5
3
  import { paf_chain2paf } from './util';
4
+ import PAFAdapter from '../PAFAdapter/PAFAdapter';
6
5
  export default class ChainAdapter extends PAFAdapter {
7
6
  async setupPre(opts) {
8
7
  const loc = openLocation(this.getConf('chainLocation'), this.pluginManager);
@@ -1,33 +1,19 @@
1
1
  declare const ChainAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
2
- /**
3
- * #slot
4
- */
5
2
  assemblyNames: {
6
3
  type: string;
7
4
  defaultValue: never[];
8
5
  description: string;
9
6
  };
10
- /**
11
- * #slot
12
- * can be specified as alternative to assemblyNames
13
- */
14
7
  targetAssembly: {
15
8
  type: string;
16
9
  defaultValue: string;
17
10
  description: string;
18
11
  };
19
- /**
20
- * #slot
21
- * can be specified as alternative to assemblyNames
22
- */
23
12
  queryAssembly: {
24
13
  type: string;
25
14
  defaultValue: string;
26
15
  description: string;
27
16
  };
28
- /**
29
- * #slot
30
- */
31
17
  chainLocation: {
32
18
  type: string;
33
19
  defaultValue: {
@@ -1,39 +1,21 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config ChainAdapter
4
- * #category adapter
5
- */
6
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
7
3
  const ChainAdapter = ConfigurationSchema('ChainAdapter', {
8
- /**
9
- * #slot
10
- */
11
4
  assemblyNames: {
12
5
  type: 'stringArray',
13
6
  defaultValue: [],
14
7
  description: 'Array of assembly names to use for this file. The query assembly name is the first value in the array, target assembly name is the second',
15
8
  },
16
- /**
17
- * #slot
18
- * can be specified as alternative to assemblyNames
19
- */
20
9
  targetAssembly: {
21
10
  type: 'string',
22
11
  defaultValue: '',
23
12
  description: 'Alternative to assemblyNames array: the target assembly',
24
13
  },
25
- /**
26
- * #slot
27
- * can be specified as alternative to assemblyNames
28
- */
29
14
  queryAssembly: {
30
15
  type: 'string',
31
16
  defaultValue: '',
32
17
  description: 'Alternative to assemblyNames array: the query assembly',
33
18
  },
34
- /**
35
- * #slot
36
- */
37
19
  chainLocation: {
38
20
  type: 'fileLocation',
39
21
  defaultValue: { uri: '/path/to/file.chain', locationType: 'UriLocation' },
@@ -1,2 +1,2 @@
1
- import PluginManager from '@jbrowse/core/PluginManager';
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
2
  export default function ChainAdapterF(pluginManager: PluginManager): void;
@@ -6,7 +6,7 @@ export default function ChainAdapterF(pluginManager) {
6
6
  displayName: 'Liftover chain adapter',
7
7
  configSchema,
8
8
  adapterMetadata: {
9
- hiddenFromGUI: true,
9
+ category: 'Synteny adapters',
10
10
  },
11
11
  getAdapterClass: () => import('./ChainAdapter').then(r => r.default),
12
12
  }));
@@ -1,5 +1,4 @@
1
- import type { Buffer } from 'buffer';
2
- export declare function paf_chain2paf(buffer: Buffer): {
1
+ export declare function paf_chain2paf(buffer: Uint8Array): {
3
2
  qname: string;
4
3
  qstart: number;
5
4
  qend: number;