@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
@@ -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 {
@@ -5,11 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const configuration_1 = require("@jbrowse/core/configuration");
7
7
  const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
8
- const rxjs_1 = require("@jbrowse/core/util/rxjs");
9
8
  const util_1 = require("@jbrowse/core/util");
10
9
  const io_1 = require("@jbrowse/core/util/io");
11
- const util_2 = require("../util");
10
+ const rxjs_1 = require("@jbrowse/core/util/rxjs");
12
11
  const SyntenyFeature_1 = __importDefault(require("../SyntenyFeature"));
12
+ const util_2 = require("../util");
13
13
  function createBlastLineParser(columns) {
14
14
  const columnNames = columns.trim().split(' ');
15
15
  const qseqidIndex = columnNames.indexOf('qseqid');
@@ -68,7 +68,6 @@ function createBlastLineParser(columns) {
68
68
  if (!value) {
69
69
  continue;
70
70
  }
71
- // @ts-expect-error
72
71
  record[columnName] = value;
73
72
  }
74
73
  return record;
@@ -91,9 +90,6 @@ class BlastTabularAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
91
90
  return (0, util_2.parseLineByLine)(buf, createBlastLineParser(columns));
92
91
  }
93
92
  async hasDataForRefName() {
94
- // determining this properly is basically a call to getFeatures
95
- // so is not really that important, and has to be true or else
96
- // getFeatures is never called (BaseAdapter filters it out)
97
93
  return true;
98
94
  }
99
95
  getAssemblyNames() {
@@ -107,7 +103,6 @@ class BlastTabularAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
107
103
  }
108
104
  async getRefNames(opts = {}) {
109
105
  var _a;
110
- // @ts-expect-error
111
106
  const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
112
107
  const feats = await this.getData(opts);
113
108
  const idx = this.getAssemblyNames().indexOf(r1);
@@ -125,8 +120,6 @@ class BlastTabularAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
125
120
  return (0, rxjs_1.ObservableCreate)(async (observer) => {
126
121
  const blastRecords = await this.getData(opts);
127
122
  const [queryAssembly, targetAssembly] = this.getAssemblyNames();
128
- // The index of the assembly name in the query list corresponds to the
129
- // adapter in the subadapters list
130
123
  const { refName: queryRefName, assemblyName: queryAssemblyName, start: queryStart, end: queryEnd, } = query;
131
124
  if (queryAssemblyName !== targetAssembly &&
132
125
  queryAssemblyName !== queryAssembly) {
@@ -201,7 +194,7 @@ class BlastTabularAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
201
194
  observer.complete();
202
195
  });
203
196
  }
204
- freeResources( /* { query } */) { }
197
+ freeResources() { }
205
198
  }
206
199
  BlastTabularAdapter.capabilities = ['getFeatures', 'getRefNames'];
207
200
  exports.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,38 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config BlastTabularAdapter
6
- */
7
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
8
5
  const BlastTabularAdapter = (0, configuration_1.ConfigurationSchema)('BlastTabularAdapter', {
9
- /**
10
- * #slot
11
- */
12
6
  assemblyNames: {
13
7
  type: 'stringArray',
14
8
  defaultValue: [],
15
9
  description: 'Query assembly is the first value in the array, target assembly is the second',
16
10
  },
17
- /**
18
- * #slot
19
- */
20
11
  targetAssembly: {
21
12
  type: 'string',
22
13
  defaultValue: '',
23
14
  description: 'Alternative to assemblyNames array: the target assembly',
24
15
  },
25
- /**
26
- * #slot
27
- */
28
16
  queryAssembly: {
29
17
  type: 'string',
30
18
  defaultValue: '',
31
19
  description: 'Alternative to assemblyNames array: the query assembly',
32
20
  },
33
- /**
34
- * #slot
35
- */
36
21
  blastTableLocation: {
37
22
  type: 'fileLocation',
38
23
  defaultValue: {
@@ -40,9 +25,6 @@ const BlastTabularAdapter = (0, configuration_1.ConfigurationSchema)('BlastTabul
40
25
  locationType: 'UriLocation',
41
26
  },
42
27
  },
43
- /**
44
- * #slot
45
- */
46
28
  columns: {
47
29
  type: 'string',
48
30
  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;
@@ -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 BlastTabularAdapterF(pluginManager) {
35
45
  displayName: 'Tabular BLAST output 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('./BlastTabularAdapter'))).then(r => r.default),
41
51
  }));
@@ -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;
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const io_1 = require("@jbrowse/core/util/io");
7
6
  const util_1 = require("@jbrowse/core/util");
8
- // locals
9
- const PAFAdapter_1 = __importDefault(require("../PAFAdapter/PAFAdapter"));
7
+ const io_1 = require("@jbrowse/core/util/io");
10
8
  const util_2 = require("./util");
9
+ const PAFAdapter_1 = __importDefault(require("../PAFAdapter/PAFAdapter"));
11
10
  class ChainAdapter extends PAFAdapter_1.default {
12
11
  async setupPre(opts) {
13
12
  const loc = (0, io_1.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,41 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const configuration_1 = require("@jbrowse/core/configuration");
4
- /**
5
- * #config ChainAdapter
6
- * #category adapter
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
9
5
  const ChainAdapter = (0, configuration_1.ConfigurationSchema)('ChainAdapter', {
10
- /**
11
- * #slot
12
- */
13
6
  assemblyNames: {
14
7
  type: 'stringArray',
15
8
  defaultValue: [],
16
9
  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
10
  },
18
- /**
19
- * #slot
20
- * can be specified as alternative to assemblyNames
21
- */
22
11
  targetAssembly: {
23
12
  type: 'string',
24
13
  defaultValue: '',
25
14
  description: 'Alternative to assemblyNames array: the target assembly',
26
15
  },
27
- /**
28
- * #slot
29
- * can be specified as alternative to assemblyNames
30
- */
31
16
  queryAssembly: {
32
17
  type: 'string',
33
18
  defaultValue: '',
34
19
  description: 'Alternative to assemblyNames array: the query assembly',
35
20
  },
36
- /**
37
- * #slot
38
- */
39
21
  chainLocation: {
40
22
  type: 'fileLocation',
41
23
  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;
@@ -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 ChainAdapterF(pluginManager) {
35
45
  displayName: 'Liftover chain 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('./ChainAdapter'))).then(r => r.default),
41
51
  }));
@@ -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;
@@ -1,30 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paf_chain2paf = paf_chain2paf;
4
- /* adapted from chain2paf by Andrea Guarracino, license reproduced below
5
- *
6
- * MIT License
7
- *
8
- * Copyright (c) 2021 Andrea Guarracino
9
- *
10
- * Permission is hereby granted, free of charge, to any person obtaining a copy
11
- * of this software and associated documentation files (the "Software"), to deal
12
- * in the Software without restriction, including without limitation the rights
13
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- * copies of the Software, and to permit persons to whom the Software is
15
- * furnished to do so, subject to the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be included in all
18
- * copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- * SOFTWARE.
27
- */
28
4
  function generate_record(qname, qstart, qend, qstrand, tname, tstart, tend, cigar, numMatches) {
29
5
  return {
30
6
  qname,
@@ -57,33 +33,19 @@ function paf_chain2paf(buffer) {
57
33
  let blockStart = 0;
58
34
  const decoder = new TextDecoder('utf8');
59
35
  while (blockStart < buffer.length) {
60
- const n = buffer.indexOf('\n', blockStart);
36
+ const n = buffer.indexOf(10, blockStart);
61
37
  if (n === -1) {
62
38
  break;
63
39
  }
64
40
  const b = buffer.subarray(blockStart, n);
65
41
  const l = decoder.decode(b).trim();
66
42
  blockStart = n + 1;
67
- const l_tab = l.replaceAll(' ', '\t'); // There are CHAIN files with space-separated fields
43
+ const l_tab = l.replaceAll(' ', '\t');
68
44
  const l_vec = l_tab.split('\t');
69
45
  if (l_vec[0] === 'chain') {
70
- // Emit previous PAF row, if available
71
46
  if (cigar) {
72
47
  records.push(generate_record(q_name, q_start, q_end, q_strand, t_name, t_start, t_end, cigar, num_matches));
73
48
  }
74
- // Save query/target information
75
- // score -- chain score
76
- // tName -- chromosome (reference sequence)
77
- // tSize -- chromosome size (reference sequence)
78
- // tStrand -- strand (reference sequence)
79
- // tStart -- alignment start position (reference sequence)
80
- // tEnd -- alignment end position (reference sequence)
81
- // qName -- chromosome (query sequence)
82
- // qSize -- chromosome size (query sequence)
83
- // qStrand -- strand (query sequence)
84
- // qStart -- alignment start position (query sequence)
85
- // qEnd -- alignment end position (query sequence)
86
- // id -- chain ID
87
49
  t_name = l_vec[2];
88
50
  t_start = +l_vec[5];
89
51
  t_end = +l_vec[6];
@@ -97,18 +59,10 @@ function paf_chain2paf(buffer) {
97
59
  q_start = +q_size - q_end;
98
60
  q_end = +q_size - tmp;
99
61
  }
100
- // Initialize PAF fields
101
62
  num_matches = 0;
102
63
  cigar = '';
103
64
  }
104
65
  else {
105
- // size -- the size of the ungapped alignment
106
- //
107
- // dt -- the difference between the end of this block and the beginning
108
- // of the next block (reference sequence)
109
- //
110
- // dq -- the difference between the end of this block and the beginning
111
- // of the next block (query sequence)
112
66
  const size_ungapped_alignment = +l_vec[0] || 0;
113
67
  const diff_in_target = l_vec.length > 1 ? +l_vec[1] : 0;
114
68
  const diff_in_query = l_vec.length > 2 ? +l_vec[2] : 0;
@@ -124,7 +78,6 @@ function paf_chain2paf(buffer) {
124
78
  }
125
79
  }
126
80
  }
127
- // Emit last PAF row, if available
128
81
  if (cigar) {
129
82
  generate_record(q_name, q_start, q_end, q_strand, t_name, t_start, t_end, cigar, num_matches);
130
83
  }
@@ -0,0 +1,2 @@
1
+ declare const ComparativeAddTrackComponent: ({ model }: any) => import("react/jsx-runtime").JSX.Element;
2
+ export default ComparativeAddTrackComponent;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ const react_1 = require("react");
5
+ const ui_1 = require("@jbrowse/core/ui");
6
+ const util_1 = require("@jbrowse/core/util");
7
+ const mobx_react_1 = require("mobx-react");
8
+ const ComparativeAddTrackComponent = (0, mobx_react_1.observer)(function ({ model }) {
9
+ var _a, _b;
10
+ const session = (0, util_1.getSession)(model);
11
+ const [r0, setR0] = (0, react_1.useState)((_a = session.assemblies[0]) === null || _a === void 0 ? void 0 : _a.name);
12
+ const [r1, setR1] = (0, react_1.useState)((_b = session.assemblies[0]) === null || _b === void 0 ? void 0 : _b.name);
13
+ (0, react_1.useEffect)(() => {
14
+ model.setMixinData({
15
+ adapter: {
16
+ queryAssembly: r0,
17
+ targetAssembly: r1,
18
+ },
19
+ });
20
+ }, [model, r0, r1]);
21
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { session: session, label: "Query assembly", helperText: "", selected: r0, onChange: asm => {
22
+ setR0(asm);
23
+ }, TextFieldProps: {
24
+ fullWidth: true,
25
+ } }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { session: session, label: "Target assembly", helperText: "", selected: r1, onChange: asm => {
26
+ setR1(asm);
27
+ }, TextFieldProps: {
28
+ fullWidth: true,
29
+ } })] }));
30
+ });
31
+ exports.default = ComparativeAddTrackComponent;
@@ -0,0 +1,2 @@
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ export default function ComparativeAddTrackComponentF(pluginManager: PluginManager): void;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
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
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.default = ComparativeAddTrackComponentF;
37
+ const react_1 = require("react");
38
+ const syntenyTypes_1 = require("../syntenyTypes");
39
+ const ComparativeAddTrackComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./ComparativeAddTrackComponent'))));
40
+ function ComparativeAddTrackComponentF(pluginManager) {
41
+ pluginManager.addToExtensionPoint('Core-addTrackComponent', (comp, { model }) => {
42
+ return syntenyTypes_1.pairwiseTypes.includes(model.trackAdapterType)
43
+ ? ComparativeAddTrackComponent
44
+ : comp;
45
+ });
46
+ }
@@ -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 DeltaAdapter extends PAFAdapter {
4
4
  setupPre(opts?: BaseOptions): Promise<{
5
5
  qname: string;
@@ -3,11 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const io_1 = require("@jbrowse/core/util/io");
7
6
  const util_1 = require("@jbrowse/core/util");
8
- // locals
9
- const PAFAdapter_1 = __importDefault(require("../PAFAdapter/PAFAdapter"));
7
+ const io_1 = require("@jbrowse/core/util/io");
10
8
  const util_2 = require("./util");
9
+ const PAFAdapter_1 = __importDefault(require("../PAFAdapter/PAFAdapter"));
11
10
  class DeltaAdapter extends PAFAdapter_1.default {
12
11
  async setupPre(opts) {
13
12
  const loc = (0, io_1.openLocation)(this.getConf('deltaLocation'), this.pluginManager);