@jbrowse/plugin-comparative-adapters 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 (95) 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/ChainAdapter/ChainAdapter.d.ts +1 -1
  7. package/dist/ChainAdapter/ChainAdapter.js +2 -3
  8. package/dist/ChainAdapter/configSchema.d.ts +0 -14
  9. package/dist/ChainAdapter/configSchema.js +1 -19
  10. package/dist/ChainAdapter/index.d.ts +1 -1
  11. package/dist/ChainAdapter/util.js +1 -48
  12. package/dist/DeltaAdapter/DeltaAdapter.d.ts +1 -1
  13. package/dist/DeltaAdapter/DeltaAdapter.js +2 -3
  14. package/dist/DeltaAdapter/configSchema.d.ts +0 -14
  15. package/dist/DeltaAdapter/configSchema.js +1 -19
  16. package/dist/DeltaAdapter/index.d.ts +1 -1
  17. package/dist/DeltaAdapter/util.js +2 -29
  18. package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
  19. package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +2 -15
  20. package/dist/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
  21. package/dist/MCScanAnchorsAdapter/configSchema.js +1 -16
  22. package/dist/MCScanAnchorsAdapter/index.d.ts +1 -1
  23. package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
  24. package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +2 -13
  25. package/dist/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
  26. package/dist/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
  27. package/dist/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
  28. package/dist/MashMapAdapter/MashMapAdapter.d.ts +1 -1
  29. package/dist/MashMapAdapter/MashMapAdapter.js +1 -2
  30. package/dist/MashMapAdapter/configSchema.d.ts +0 -12
  31. package/dist/MashMapAdapter/configSchema.js +1 -16
  32. package/dist/MashMapAdapter/index.d.ts +1 -1
  33. package/dist/PAFAdapter/PAFAdapter.d.ts +6 -5
  34. package/dist/PAFAdapter/PAFAdapter.js +4 -15
  35. package/dist/PAFAdapter/configSchema.d.ts +0 -12
  36. package/dist/PAFAdapter/configSchema.js +1 -16
  37. package/dist/PAFAdapter/index.d.ts +1 -1
  38. package/dist/PAFAdapter/util.js +0 -35
  39. package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
  40. package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +5 -6
  41. package/dist/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
  42. package/dist/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
  43. package/dist/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
  44. package/dist/SyntenyFeature/index.js +0 -1
  45. package/dist/index.d.ts +1 -1
  46. package/dist/index.js +6 -6
  47. package/dist/util.d.ts +3 -3
  48. package/esm/BlastTabularAdapter/BlastTabularAdapter.d.ts +3 -57
  49. package/esm/BlastTabularAdapter/BlastTabularAdapter.js +5 -12
  50. package/esm/BlastTabularAdapter/configSchema.d.ts +0 -15
  51. package/esm/BlastTabularAdapter/configSchema.js +1 -19
  52. package/esm/BlastTabularAdapter/index.d.ts +1 -1
  53. package/esm/ChainAdapter/ChainAdapter.d.ts +1 -1
  54. package/esm/ChainAdapter/ChainAdapter.js +2 -3
  55. package/esm/ChainAdapter/configSchema.d.ts +0 -14
  56. package/esm/ChainAdapter/configSchema.js +1 -19
  57. package/esm/ChainAdapter/index.d.ts +1 -1
  58. package/esm/ChainAdapter/util.js +1 -48
  59. package/esm/DeltaAdapter/DeltaAdapter.d.ts +1 -1
  60. package/esm/DeltaAdapter/DeltaAdapter.js +2 -3
  61. package/esm/DeltaAdapter/configSchema.d.ts +0 -14
  62. package/esm/DeltaAdapter/configSchema.js +1 -19
  63. package/esm/DeltaAdapter/index.d.ts +1 -1
  64. package/esm/DeltaAdapter/util.js +2 -29
  65. package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
  66. package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +4 -17
  67. package/esm/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
  68. package/esm/MCScanAnchorsAdapter/configSchema.js +1 -16
  69. package/esm/MCScanAnchorsAdapter/index.d.ts +1 -1
  70. package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
  71. package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +4 -15
  72. package/esm/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
  73. package/esm/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
  74. package/esm/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
  75. package/esm/MashMapAdapter/MashMapAdapter.d.ts +1 -1
  76. package/esm/MashMapAdapter/MashMapAdapter.js +1 -2
  77. package/esm/MashMapAdapter/configSchema.d.ts +0 -12
  78. package/esm/MashMapAdapter/configSchema.js +1 -16
  79. package/esm/MashMapAdapter/index.d.ts +1 -1
  80. package/esm/PAFAdapter/PAFAdapter.d.ts +6 -5
  81. package/esm/PAFAdapter/PAFAdapter.js +6 -17
  82. package/esm/PAFAdapter/configSchema.d.ts +0 -12
  83. package/esm/PAFAdapter/configSchema.js +1 -16
  84. package/esm/PAFAdapter/index.d.ts +1 -1
  85. package/esm/PAFAdapter/util.js +0 -35
  86. package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
  87. package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +6 -7
  88. package/esm/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
  89. package/esm/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
  90. package/esm/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
  91. package/esm/SyntenyFeature/index.js +0 -1
  92. package/esm/index.d.ts +1 -1
  93. package/esm/index.js +6 -6
  94. package/esm/util.d.ts +3 -3
  95. package/package.json +2 -2
@@ -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;
@@ -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;
@@ -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,
@@ -64,26 +40,12 @@ function paf_chain2paf(buffer) {
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
  }
@@ -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);
@@ -1,33 +1,19 @@
1
1
  declare const DeltaAdapter: 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
- * alternative to assembly names
13
- */
14
7
  targetAssembly: {
15
8
  type: string;
16
9
  defaultValue: string;
17
10
  description: string;
18
11
  };
19
- /**
20
- * #slot
21
- * alternative to assembly names
22
- */
23
12
  queryAssembly: {
24
13
  type: string;
25
14
  defaultValue: string;
26
15
  description: string;
27
16
  };
28
- /**
29
- * #slot
30
- */
31
17
  deltaLocation: {
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 DeltaAdapter
6
- * #category adapter
7
- */
8
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
4
+ function x() { }
9
5
  const DeltaAdapter = (0, configuration_1.ConfigurationSchema)('DeltaAdapter', {
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
- * alternative to assembly names
21
- */
22
11
  targetAssembly: {
23
12
  type: 'string',
24
13
  defaultValue: '',
25
14
  description: 'Alternative to assemblyNames: the target assembly name',
26
15
  },
27
- /**
28
- * #slot
29
- * alternative to assembly names
30
- */
31
16
  queryAssembly: {
32
17
  type: 'string',
33
18
  defaultValue: '',
34
19
  description: 'Alternative to assemblyNames: the query assembly name',
35
20
  },
36
- /**
37
- * #slot
38
- */
39
21
  deltaLocation: {
40
22
  type: 'fileLocation',
41
23
  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 DeltaAdapterF(pluginManager: PluginManager): void;
@@ -1,33 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paf_delta2paf = paf_delta2paf;
4
- /* paf2delta from paftools.js in the minimap2 repository, license reproduced below
5
- *
6
- * The MIT License
7
- *
8
- * Copyright (c) 2018- Dana-Farber Cancer Institute
9
- * 2017-2018 Broad Institute, Inc.
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining
12
- * a copy of this software and associated documentation files (the
13
- * "Software"), to deal in the Software without restriction, including
14
- * without limitation the rights to use, copy, modify, merge, publish,
15
- * distribute, sublicense, and/or sell copies of the Software, and to
16
- * permit persons to whom the Software is furnished to do so, subject to
17
- * the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be
20
- * included in all copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
26
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
4
  function paf_delta2paf(buffer) {
32
5
  let rname = '';
33
6
  let qname = '';
@@ -125,7 +98,7 @@ function paf_delta2paf(buffer) {
125
98
  }
126
99
  else {
127
100
  cigar.push((1 << 4) | 2);
128
- } // deletion
101
+ }
129
102
  }
130
103
  else {
131
104
  const l = -d - 1;
@@ -139,7 +112,7 @@ function paf_delta2paf(buffer) {
139
112
  }
140
113
  else {
141
114
  cigar.push((1 << 4) | 1);
142
- } // insertion
115
+ }
143
116
  }
144
117
  }
145
118
  }
@@ -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
  interface BareFeature {
4
5
  strand: number;
5
6
  refName: string;
@@ -24,11 +25,6 @@ export default class MCScanAnchorsAdapter extends BaseFeatureDataAdapter {
24
25
  getAssemblyNames(): string[];
25
26
  getRefNames(opts?: BaseOptions): Promise<string[]>;
26
27
  getFeatures(region: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
27
- /**
28
- * called to provide a hint that data tied to a certain region
29
- * will not be needed for the foreseeable future and can be purged
30
- * from caches, etc
31
- */
32
28
  freeResources(): void;
33
29
  }
34
30
  export {};