@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,31 +1,19 @@
1
1
  declare const PAFAdapter: 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
  pafLocation: {
30
18
  type: string;
31
19
  defaultValue: {
@@ -1,36 +1,21 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
- /**
3
- * #config PAFAdapter
4
- */
5
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
2
+ function x() { }
6
3
  const PAFAdapter = ConfigurationSchema('PAFAdapter', {
7
- /**
8
- * #slot
9
- */
10
4
  assemblyNames: {
11
5
  type: 'stringArray',
12
6
  defaultValue: [],
13
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',
14
8
  },
15
- /**
16
- * #slot
17
- */
18
9
  targetAssembly: {
19
10
  type: 'string',
20
11
  defaultValue: '',
21
12
  description: 'Alternative to assemblyNames: the target assembly name',
22
13
  },
23
- /**
24
- * #slot
25
- */
26
14
  queryAssembly: {
27
15
  type: 'string',
28
16
  defaultValue: '',
29
17
  description: 'Alternative to assemblyNames: the query assembly name',
30
18
  },
31
- /**
32
- * #slot
33
- */
34
19
  pafLocation: {
35
20
  type: 'fileLocation',
36
21
  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 PAFAdapterF(pluginManager: PluginManager): void;
@@ -1,38 +1,4 @@
1
1
  import { zip } from '../util';
2
- // based on "weighted mean" method from https://github.com/tpoorten/dotPlotly
3
- // License reproduced here
4
- //
5
- // MIT License
6
- // Copyright (c) 2017 Tom Poorten
7
- // Permission is hereby granted, free of charge, to any person obtaining a copy
8
- // of this software and associated documentation files (the "Software"), to deal
9
- // in the Software without restriction, including without limitation the rights
10
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- // copies of the Software, and to permit persons to whom the Software is
12
- // furnished to do so, subject to the following conditions:
13
- // The above copyright notice and this permission notice shall be included in all
14
- // copies or substantial portions of the Software.
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- // SOFTWARE.
22
- //
23
- // Notes: in the weighted mean longer alignments factor in more heavily of all
24
- // the fragments of a query vs the reference that it mapped to
25
- //
26
- // this uses a combined key query+'-'+ref to iteratively map all the alignments
27
- // that match a particular ref from a particular query (so 1d array of what
28
- // could be a 2d map)
29
- //
30
- // the result is a single number that says e.g. chr5 from human mapped to chr5
31
- // on mouse with 0.8 quality, and that0.8 is then attached to all the pieces of
32
- // chr5 on human that mapped to chr5 on mouse. if chr5 on human also more
33
- // weakly mapped to chr6 on mouse, then it would have another value e.g. 0.6.
34
- // this can show strong and weak levels of synteny, especially in polyploidy
35
- // situations
36
2
  export function getWeightedMeans(ret) {
37
3
  const scoreMap = {};
38
4
  for (const entry of ret) {
@@ -67,7 +33,6 @@ export function getWeightedMeans(ret) {
67
33
  }
68
34
  return ret;
69
35
  }
70
- // https://gist.github.com/stekhn/a12ed417e91f90ecec14bcfa4c2ae16a
71
36
  function weightedMean(tuples) {
72
37
  const [valueSum, weightSum] = tuples.reduce(([valueSum, weightSum], [value, weight]) => [
73
38
  valueSum + value * weight,
@@ -1,10 +1,11 @@
1
- import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { Region } from '@jbrowse/core/util/types';
3
- import { Feature } from '@jbrowse/core/util';
4
- import { AnyConfigurationModel } from '@jbrowse/core/configuration';
5
- import { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
6
- import PluginManager from '@jbrowse/core/PluginManager';
7
1
  import { TabixIndexedFile } from '@gmod/tabix';
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import type PluginManager from '@jbrowse/core/PluginManager';
4
+ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
5
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
6
+ import type { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache';
7
+ import type { Feature } from '@jbrowse/core/util';
8
+ import type { Region } from '@jbrowse/core/util/types';
8
9
  interface PAFOptions extends BaseOptions {
9
10
  config?: AnyConfigurationModel;
10
11
  }
@@ -1,10 +1,9 @@
1
- import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { ObservableCreate } from '@jbrowse/core/util/rxjs';
3
- import { openLocation } from '@jbrowse/core/util/io';
4
1
  import { TabixIndexedFile } from '@gmod/tabix';
5
- // locals
6
- import { parsePAFLine } from '../util';
2
+ import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
3
+ import { openLocation } from '@jbrowse/core/util/io';
4
+ import { ObservableCreate } from '@jbrowse/core/util/rxjs';
7
5
  import SyntenyFeature from '../SyntenyFeature';
6
+ import { parsePAFLine } from '../util';
8
7
  class PAFAdapter extends BaseFeatureDataAdapter {
9
8
  constructor(config, getSubAdapter, pluginManager) {
10
9
  super(config, getSubAdapter, pluginManager);
@@ -93,12 +92,12 @@ class PAFAdapter extends BaseFeatureDataAdapter {
93
92
  },
94
93
  }));
95
94
  },
96
- signal: opts.signal,
95
+ stopToken: opts.stopToken,
97
96
  });
98
97
  observer.complete();
99
98
  });
100
99
  }
101
- freeResources( /* { query } */) { }
100
+ freeResources() { }
102
101
  }
103
102
  PAFAdapter.capabilities = ['getFeatures', 'getRefNames'];
104
103
  export default PAFAdapter;
@@ -1,31 +1,19 @@
1
1
  declare const PairwiseIndexedPAFAdapter: 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
  pifGzLocation: {
30
18
  type: string;
31
19
  description: string;
@@ -34,21 +22,12 @@ declare const PairwiseIndexedPAFAdapter: import("@jbrowse/core/configuration/con
34
22
  locationType: string;
35
23
  };
36
24
  };
37
- /**
38
- * #slot
39
- */
40
25
  index: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
41
- /**
42
- * #slot index.indexType
43
- */
44
26
  indexType: {
45
27
  model: import("mobx-state-tree").ISimpleType<string>;
46
28
  type: string;
47
29
  defaultValue: string;
48
30
  };
49
- /**
50
- * #slot index.location
51
- */
52
31
  location: {
53
32
  type: string;
54
33
  defaultValue: {
@@ -1,37 +1,22 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration';
2
2
  import { types } from 'mobx-state-tree';
3
- /**
4
- * #config PairwiseIndexedPAFAdapter
5
- */
6
- function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
3
+ function x() { }
7
4
  const PairwiseIndexedPAFAdapter = ConfigurationSchema('PairwiseIndexedPAFAdapter', {
8
- /**
9
- * #slot
10
- */
11
5
  assemblyNames: {
12
6
  type: 'stringArray',
13
7
  defaultValue: [],
14
8
  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
9
  },
16
- /**
17
- * #slot
18
- */
19
10
  targetAssembly: {
20
11
  type: 'string',
21
12
  defaultValue: '',
22
13
  description: 'Alternative to assemblyNames: the target assembly name',
23
14
  },
24
- /**
25
- * #slot
26
- */
27
15
  queryAssembly: {
28
16
  type: 'string',
29
17
  defaultValue: '',
30
18
  description: 'Alternative to assemblyNames: the query assembly name',
31
19
  },
32
- /**
33
- * #slot
34
- */
35
20
  pifGzLocation: {
36
21
  type: 'fileLocation',
37
22
  description: 'location of pairwise tabix indexed PAF (pif)',
@@ -40,21 +25,12 @@ const PairwiseIndexedPAFAdapter = ConfigurationSchema('PairwiseIndexedPAFAdapter
40
25
  locationType: 'UriLocation',
41
26
  },
42
27
  },
43
- /**
44
- * #slot
45
- */
46
28
  index: ConfigurationSchema('TabixIndex', {
47
- /**
48
- * #slot index.indexType
49
- */
50
29
  indexType: {
51
30
  model: types.enumeration('IndexType', ['TBI', 'CSI']),
52
31
  type: 'stringEnum',
53
32
  defaultValue: 'TBI',
54
33
  },
55
- /**
56
- * #slot index.location
57
- */
58
34
  location: {
59
35
  type: 'fileLocation',
60
36
  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;
@@ -1,6 +1,5 @@
1
1
  import { SimpleFeature } from '@jbrowse/core/util';
2
2
  import { MismatchParser } from '@jbrowse/plugin-alignments';
3
- // locals
4
3
  const { getMismatches } = MismatchParser;
5
4
  export default class SyntenyFeature extends SimpleFeature {
6
5
  get(arg) {
package/esm/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import PluginManager from '@jbrowse/core/PluginManager';
2
+ import type PluginManager from '@jbrowse/core/PluginManager';
3
3
  export default class ComparativeAdaptersPlugin extends Plugin {
4
4
  name: string;
5
5
  install(pluginManager: PluginManager): void;
package/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import Plugin from '@jbrowse/core/Plugin';
2
- import PAFAdapterF from './PAFAdapter';
3
- import PairwiseIndexedPAFAdapterF from './PairwiseIndexedPAFAdapter';
2
+ import { getFileName } from '@jbrowse/core/util/tracks';
3
+ import BlastTabularAdapter from './BlastTabularAdapter';
4
+ import ChainAdapterF from './ChainAdapter';
5
+ import DeltaAdapterF from './DeltaAdapter';
4
6
  import MCScanAnchorsAdapterF from './MCScanAnchorsAdapter';
5
7
  import MCScanSimpleAnchorsAdapterF from './MCScanSimpleAnchorsAdapter';
6
8
  import MashMapAdapterF from './MashMapAdapter';
7
- import DeltaAdapterF from './DeltaAdapter';
8
- import ChainAdapterF from './ChainAdapter';
9
- import BlastTabularAdapter from './BlastTabularAdapter';
10
- import { getFileName, } from '@jbrowse/core/util/tracks';
9
+ import PAFAdapterF from './PAFAdapter';
10
+ import PairwiseIndexedPAFAdapterF from './PairwiseIndexedPAFAdapter';
11
11
  export default class ComparativeAdaptersPlugin extends Plugin {
12
12
  constructor() {
13
13
  super(...arguments);
package/esm/util.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
2
- import { GenericFilehandle } from 'generic-filehandle';
1
+ import type { PAFRecord } from './PAFAdapter/util';
2
+ import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
3
3
  import type { Buffer } from 'buffer';
4
- import { PAFRecord } from './PAFAdapter/util';
4
+ import type { GenericFilehandle } from 'generic-filehandle';
5
5
  export declare function parseBed(text: string): Map<string | undefined, {
6
6
  refName: string | undefined;
7
7
  start: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-comparative-adapters",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "JBrowse 2 comparative adapters",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "eed30b5e671f8f7823652d7cecc51aa89226de46"
61
+ "gitHead": "c344ea60099cb7e460b77f15808946b24a7eee74"
62
62
  }