@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.
- package/dist/BlastTabularAdapter/BlastTabularAdapter.d.ts +3 -57
- package/dist/BlastTabularAdapter/BlastTabularAdapter.js +3 -10
- package/dist/BlastTabularAdapter/configSchema.d.ts +0 -15
- package/dist/BlastTabularAdapter/configSchema.js +1 -19
- package/dist/BlastTabularAdapter/index.d.ts +1 -1
- package/dist/BlastTabularAdapter/index.js +18 -8
- package/dist/ChainAdapter/ChainAdapter.d.ts +1 -1
- package/dist/ChainAdapter/ChainAdapter.js +2 -3
- package/dist/ChainAdapter/configSchema.d.ts +0 -14
- package/dist/ChainAdapter/configSchema.js +1 -19
- package/dist/ChainAdapter/index.d.ts +1 -1
- package/dist/ChainAdapter/index.js +18 -8
- package/dist/ChainAdapter/util.d.ts +1 -2
- package/dist/ChainAdapter/util.js +2 -49
- package/dist/ComparativeAddTrackComponent/ComparativeAddTrackComponent.d.ts +2 -0
- package/dist/ComparativeAddTrackComponent/ComparativeAddTrackComponent.js +31 -0
- package/dist/ComparativeAddTrackComponent/index.d.ts +2 -0
- package/dist/ComparativeAddTrackComponent/index.js +46 -0
- package/dist/DeltaAdapter/DeltaAdapter.d.ts +1 -1
- package/dist/DeltaAdapter/DeltaAdapter.js +2 -3
- package/dist/DeltaAdapter/configSchema.d.ts +0 -14
- package/dist/DeltaAdapter/configSchema.js +1 -19
- package/dist/DeltaAdapter/index.d.ts +1 -1
- package/dist/DeltaAdapter/index.js +18 -8
- package/dist/DeltaAdapter/util.d.ts +1 -2
- package/dist/DeltaAdapter/util.js +3 -30
- package/dist/GuessAdapter/index.d.ts +2 -0
- package/dist/GuessAdapter/index.js +74 -0
- package/dist/MCScanAddTrackComponent/MCScanAddTrackComponent.d.ts +2 -0
- package/dist/MCScanAddTrackComponent/MCScanAddTrackComponent.js +39 -0
- package/dist/MCScanAddTrackComponent/index.d.ts +2 -0
- package/dist/MCScanAddTrackComponent/index.js +46 -0
- package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
- package/dist/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +2 -15
- package/dist/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
- package/dist/MCScanAnchorsAdapter/configSchema.js +1 -16
- package/dist/MCScanAnchorsAdapter/index.d.ts +1 -1
- package/dist/MCScanAnchorsAdapter/index.js +18 -8
- package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
- package/dist/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +2 -13
- package/dist/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
- package/dist/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
- package/dist/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
- package/dist/MCScanSimpleAnchorsAdapter/index.js +18 -8
- package/dist/MashMapAdapter/MashMapAdapter.d.ts +1 -1
- package/dist/MashMapAdapter/MashMapAdapter.js +1 -2
- package/dist/MashMapAdapter/configSchema.d.ts +0 -12
- package/dist/MashMapAdapter/configSchema.js +1 -16
- package/dist/MashMapAdapter/index.d.ts +1 -1
- package/dist/MashMapAdapter/index.js +18 -8
- package/dist/PAFAdapter/PAFAdapter.d.ts +6 -5
- package/dist/PAFAdapter/PAFAdapter.js +4 -15
- package/dist/PAFAdapter/configSchema.d.ts +0 -12
- package/dist/PAFAdapter/configSchema.js +1 -16
- package/dist/PAFAdapter/index.d.ts +1 -1
- package/dist/PAFAdapter/index.js +18 -8
- package/dist/PAFAdapter/util.js +0 -35
- package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
- package/dist/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +5 -6
- package/dist/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
- package/dist/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
- package/dist/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
- package/dist/PairwiseIndexedPAFAdapter/index.js +18 -8
- package/dist/SyntenyFeature/index.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -25
- package/dist/syntenyTypes.d.ts +3 -0
- package/dist/syntenyTypes.js +25 -0
- package/dist/util.d.ts +4 -5
- package/dist/util.js +2 -4
- package/esm/BlastTabularAdapter/BlastTabularAdapter.d.ts +3 -57
- package/esm/BlastTabularAdapter/BlastTabularAdapter.js +5 -12
- package/esm/BlastTabularAdapter/configSchema.d.ts +0 -15
- package/esm/BlastTabularAdapter/configSchema.js +1 -19
- package/esm/BlastTabularAdapter/index.d.ts +1 -1
- package/esm/BlastTabularAdapter/index.js +1 -1
- package/esm/ChainAdapter/ChainAdapter.d.ts +1 -1
- package/esm/ChainAdapter/ChainAdapter.js +2 -3
- package/esm/ChainAdapter/configSchema.d.ts +0 -14
- package/esm/ChainAdapter/configSchema.js +1 -19
- package/esm/ChainAdapter/index.d.ts +1 -1
- package/esm/ChainAdapter/index.js +1 -1
- package/esm/ChainAdapter/util.d.ts +1 -2
- package/esm/ChainAdapter/util.js +2 -49
- package/esm/ComparativeAddTrackComponent/ComparativeAddTrackComponent.d.ts +2 -0
- package/esm/ComparativeAddTrackComponent/ComparativeAddTrackComponent.js +29 -0
- package/esm/ComparativeAddTrackComponent/index.d.ts +2 -0
- package/esm/ComparativeAddTrackComponent/index.js +10 -0
- package/esm/DeltaAdapter/DeltaAdapter.d.ts +1 -1
- package/esm/DeltaAdapter/DeltaAdapter.js +2 -3
- package/esm/DeltaAdapter/configSchema.d.ts +0 -14
- package/esm/DeltaAdapter/configSchema.js +1 -19
- package/esm/DeltaAdapter/index.d.ts +1 -1
- package/esm/DeltaAdapter/index.js +1 -1
- package/esm/DeltaAdapter/util.d.ts +1 -2
- package/esm/DeltaAdapter/util.js +3 -30
- package/esm/GuessAdapter/index.d.ts +2 -0
- package/esm/GuessAdapter/index.js +71 -0
- package/esm/MCScanAddTrackComponent/MCScanAddTrackComponent.d.ts +2 -0
- package/esm/MCScanAddTrackComponent/MCScanAddTrackComponent.js +37 -0
- package/esm/MCScanAddTrackComponent/index.d.ts +2 -0
- package/esm/MCScanAddTrackComponent/index.js +10 -0
- package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.d.ts +3 -7
- package/esm/MCScanAnchorsAdapter/MCScanAnchorsAdapter.js +4 -17
- package/esm/MCScanAnchorsAdapter/configSchema.d.ts +0 -12
- package/esm/MCScanAnchorsAdapter/configSchema.js +1 -16
- package/esm/MCScanAnchorsAdapter/index.d.ts +1 -1
- package/esm/MCScanAnchorsAdapter/index.js +1 -1
- package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.d.ts +4 -8
- package/esm/MCScanSimpleAnchorsAdapter/MCScanSimpleAnchorsAdapter.js +4 -15
- package/esm/MCScanSimpleAnchorsAdapter/configSchema.d.ts +0 -12
- package/esm/MCScanSimpleAnchorsAdapter/configSchema.js +1 -16
- package/esm/MCScanSimpleAnchorsAdapter/index.d.ts +1 -1
- package/esm/MCScanSimpleAnchorsAdapter/index.js +1 -1
- package/esm/MashMapAdapter/MashMapAdapter.d.ts +1 -1
- package/esm/MashMapAdapter/MashMapAdapter.js +1 -2
- package/esm/MashMapAdapter/configSchema.d.ts +0 -12
- package/esm/MashMapAdapter/configSchema.js +1 -16
- package/esm/MashMapAdapter/index.d.ts +1 -1
- package/esm/MashMapAdapter/index.js +1 -1
- package/esm/PAFAdapter/PAFAdapter.d.ts +6 -5
- package/esm/PAFAdapter/PAFAdapter.js +6 -17
- package/esm/PAFAdapter/configSchema.d.ts +0 -12
- package/esm/PAFAdapter/configSchema.js +1 -16
- package/esm/PAFAdapter/index.d.ts +1 -1
- package/esm/PAFAdapter/index.js +1 -1
- package/esm/PAFAdapter/util.js +0 -35
- package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.d.ts +7 -6
- package/esm/PairwiseIndexedPAFAdapter/PairwiseIndexedPAFAdapter.js +6 -7
- package/esm/PairwiseIndexedPAFAdapter/configSchema.d.ts +0 -21
- package/esm/PairwiseIndexedPAFAdapter/configSchema.js +1 -25
- package/esm/PairwiseIndexedPAFAdapter/index.d.ts +1 -1
- package/esm/PairwiseIndexedPAFAdapter/index.js +1 -1
- package/esm/SyntenyFeature/index.js +0 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +11 -25
- package/esm/syntenyTypes.d.ts +3 -0
- package/esm/syntenyTypes.js +22 -0
- package/esm/util.d.ts +4 -5
- package/esm/util.js +3 -5
- package/package.json +5 -5
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const MCScanSimpleAnchorsAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
mcscanSimpleAnchorsLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -9,9 +6,6 @@ declare const MCScanSimpleAnchorsAdapter: import("@jbrowse/core/configuration/co
|
|
|
9
6
|
locationType: string;
|
|
10
7
|
};
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* #slot
|
|
14
|
-
*/
|
|
15
9
|
bed1Location: {
|
|
16
10
|
type: string;
|
|
17
11
|
defaultValue: {
|
|
@@ -19,9 +13,6 @@ declare const MCScanSimpleAnchorsAdapter: import("@jbrowse/core/configuration/co
|
|
|
19
13
|
locationType: string;
|
|
20
14
|
};
|
|
21
15
|
};
|
|
22
|
-
/**
|
|
23
|
-
* #slot
|
|
24
|
-
*/
|
|
25
16
|
bed2Location: {
|
|
26
17
|
type: string;
|
|
27
18
|
defaultValue: {
|
|
@@ -29,9 +20,6 @@ declare const MCScanSimpleAnchorsAdapter: import("@jbrowse/core/configuration/co
|
|
|
29
20
|
locationType: string;
|
|
30
21
|
};
|
|
31
22
|
};
|
|
32
|
-
/**
|
|
33
|
-
* #slot
|
|
34
|
-
*/
|
|
35
23
|
assemblyNames: {
|
|
36
24
|
type: string;
|
|
37
25
|
defaultValue: never[];
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
|
-
|
|
5
|
-
* #config MCScanSimpleAnchorsAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const MCScanSimpleAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCScanSimpleAnchorsAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
mcscanSimpleAnchorsLocation: {
|
|
13
7
|
type: 'fileLocation',
|
|
14
8
|
defaultValue: {
|
|
@@ -16,9 +10,6 @@ const MCScanSimpleAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCS
|
|
|
16
10
|
locationType: 'UriLocation',
|
|
17
11
|
},
|
|
18
12
|
},
|
|
19
|
-
/**
|
|
20
|
-
* #slot
|
|
21
|
-
*/
|
|
22
13
|
bed1Location: {
|
|
23
14
|
type: 'fileLocation',
|
|
24
15
|
defaultValue: {
|
|
@@ -26,9 +17,6 @@ const MCScanSimpleAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCS
|
|
|
26
17
|
locationType: 'UriLocation',
|
|
27
18
|
},
|
|
28
19
|
},
|
|
29
|
-
/**
|
|
30
|
-
* #slot
|
|
31
|
-
*/
|
|
32
20
|
bed2Location: {
|
|
33
21
|
type: 'fileLocation',
|
|
34
22
|
defaultValue: {
|
|
@@ -36,9 +24,6 @@ const MCScanSimpleAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCS
|
|
|
36
24
|
locationType: 'UriLocation',
|
|
37
25
|
},
|
|
38
26
|
},
|
|
39
|
-
/**
|
|
40
|
-
* #slot
|
|
41
|
-
*/
|
|
42
27
|
assemblyNames: {
|
|
43
28
|
type: 'stringArray',
|
|
44
29
|
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 MCScanSimpleAnchorsAdapterF(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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 MCScanSimpleAnchorsAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'MCScan anchors.simple adapter',
|
|
36
46
|
configSchema: configSchema_1.default,
|
|
37
47
|
adapterMetadata: {
|
|
38
|
-
|
|
48
|
+
category: 'Synteny adapters',
|
|
39
49
|
},
|
|
40
50
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./MCScanSimpleAnchorsAdapter'))).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 MashMapAdapter extends PAFAdapter {
|
|
4
4
|
setupPre(opts?: BaseOptions): Promise<{
|
|
5
5
|
tname: string;
|
|
@@ -3,8 +3,8 @@ 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");
|
|
7
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
8
8
|
const PAFAdapter_1 = __importDefault(require("../PAFAdapter/PAFAdapter"));
|
|
9
9
|
const util_2 = require("../util");
|
|
10
10
|
class MashMapAdapter extends PAFAdapter_1.default {
|
|
@@ -18,7 +18,6 @@ exports.default = MashMapAdapter;
|
|
|
18
18
|
function parseMashMapLine(line) {
|
|
19
19
|
const fields = line.split(' ');
|
|
20
20
|
if (fields.length < 9) {
|
|
21
|
-
// xref https://github.com/marbl/MashMap/issues/38
|
|
22
21
|
throw new Error(`improperly formatted line: ${line}`);
|
|
23
22
|
}
|
|
24
23
|
const [qname, , qstart, qend, strand, tname, , tstart, tend, mq] = fields;
|
|
@@ -1,31 +1,19 @@
|
|
|
1
1
|
declare const MashMapAdapter: 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
|
outLocation: {
|
|
30
18
|
type: string;
|
|
31
19
|
defaultValue: {
|
|
@@ -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 MashMapAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const MashMapAdapter = (0, configuration_1.ConfigurationSchema)('MashMapAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
assemblyNames: {
|
|
13
7
|
type: 'stringArray',
|
|
14
8
|
defaultValue: [],
|
|
15
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',
|
|
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
|
outLocation: {
|
|
37
22
|
type: 'fileLocation',
|
|
38
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 MashMapAdapterF(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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 MashMapAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'MashMap adapter',
|
|
36
46
|
configSchema: configSchema_1.default,
|
|
37
47
|
adapterMetadata: {
|
|
38
|
-
|
|
48
|
+
category: 'Synteny adapters',
|
|
39
49
|
},
|
|
40
50
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./MashMapAdapter'))).then(r => r.default),
|
|
41
51
|
}));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { PAFRecord } from './util';
|
|
3
|
+
import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
4
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
5
|
+
import type { Feature } from '@jbrowse/core/util';
|
|
6
|
+
import type { Region } from '@jbrowse/core/util/types';
|
|
6
7
|
interface PAFOptions extends BaseOptions {
|
|
7
8
|
config?: AnyConfigurationModel;
|
|
8
9
|
}
|
|
@@ -3,14 +3,13 @@ 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 configuration_1 = require("@jbrowse/core/configuration");
|
|
6
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
|
-
const
|
|
8
|
+
const util_1 = require("@jbrowse/core/util");
|
|
8
9
|
const io_1 = require("@jbrowse/core/util/io");
|
|
10
|
+
const range_1 = require("@jbrowse/core/util/range");
|
|
9
11
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
10
|
-
const util_1 = require("@jbrowse/core/util");
|
|
11
|
-
const configuration_1 = require("@jbrowse/core/configuration");
|
|
12
12
|
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
13
|
-
// locals
|
|
14
13
|
const SyntenyFeature_1 = __importDefault(require("../SyntenyFeature"));
|
|
15
14
|
const util_2 = require("../util");
|
|
16
15
|
const util_3 = require("./util");
|
|
@@ -32,9 +31,6 @@ class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
32
31
|
return (0, util_2.parseLineByLine)(buf, util_2.parsePAFLine);
|
|
33
32
|
}
|
|
34
33
|
async hasDataForRefName() {
|
|
35
|
-
// determining this properly is basically a call to getFeatures so is not
|
|
36
|
-
// really that important, and has to be true or else getFeatures is never
|
|
37
|
-
// called (BaseAdapter filters it out)
|
|
38
34
|
return true;
|
|
39
35
|
}
|
|
40
36
|
getAssemblyNames() {
|
|
@@ -48,7 +44,6 @@ class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
48
44
|
}
|
|
49
45
|
async getRefNames(opts = {}) {
|
|
50
46
|
var _a;
|
|
51
|
-
// @ts-expect-error
|
|
52
47
|
const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
|
|
53
48
|
const feats = await this.setup(opts);
|
|
54
49
|
const idx = this.getAssemblyNames().indexOf(r1);
|
|
@@ -66,18 +61,12 @@ class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
66
61
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
67
62
|
let pafRecords = await this.setup(opts);
|
|
68
63
|
const { config } = opts;
|
|
69
|
-
// note: this is not the adapter config, it is responding to a display
|
|
70
|
-
// setting passed in via the opts parameter
|
|
71
64
|
if (config && (0, configuration_1.readConfObject)(config, 'colorBy') === 'meanQueryIdentity') {
|
|
72
65
|
pafRecords = (0, util_3.getWeightedMeans)(pafRecords);
|
|
73
66
|
}
|
|
74
67
|
const assemblyNames = this.getAssemblyNames();
|
|
75
|
-
// The index of the assembly name in the query list corresponds to the
|
|
76
|
-
// adapter in the subadapters list
|
|
77
68
|
const { start: qstart, end: qend, refName: qref, assemblyName } = query;
|
|
78
69
|
const index = assemblyNames.indexOf(assemblyName);
|
|
79
|
-
// if the getFeatures::query is on the query assembly, flip orientation
|
|
80
|
-
// of data
|
|
81
70
|
const flip = index === 0;
|
|
82
71
|
if (index === -1) {
|
|
83
72
|
console.warn(`${assemblyName} not found in this adapter`);
|
|
@@ -145,7 +134,7 @@ class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
145
134
|
observer.complete();
|
|
146
135
|
});
|
|
147
136
|
}
|
|
148
|
-
freeResources(
|
|
137
|
+
freeResources() { }
|
|
149
138
|
}
|
|
150
139
|
PAFAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
151
140
|
exports.default = PAFAdapter;
|
|
@@ -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,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 PAFAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const PAFAdapter = (0, configuration_1.ConfigurationSchema)('PAFAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
assemblyNames: {
|
|
13
7
|
type: 'stringArray',
|
|
14
8
|
defaultValue: [],
|
|
15
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',
|
|
16
10
|
},
|
|
17
|
-
/**
|
|
18
|
-
* #slot
|
|
19
|
-
*/
|
|
20
11
|
targetAssembly: {
|
|
21
12
|
type: 'string',
|
|
22
13
|
defaultValue: '',
|
|
23
14
|
description: 'Alternative to assemblyNames: the target assembly name',
|
|
24
15
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
*/
|
|
28
16
|
queryAssembly: {
|
|
29
17
|
type: 'string',
|
|
30
18
|
defaultValue: '',
|
|
31
19
|
description: 'Alternative to assemblyNames: the query assembly name',
|
|
32
20
|
},
|
|
33
|
-
/**
|
|
34
|
-
* #slot
|
|
35
|
-
*/
|
|
36
21
|
pafLocation: {
|
|
37
22
|
type: 'fileLocation',
|
|
38
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 PAFAdapterF(pluginManager: PluginManager): void;
|
package/dist/PAFAdapter/index.js
CHANGED
|
@@ -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 (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 PAFAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'PAF adapter',
|
|
36
46
|
configSchema: configSchema_1.default,
|
|
37
47
|
adapterMetadata: {
|
|
38
|
-
|
|
48
|
+
category: 'Synteny adapters',
|
|
39
49
|
},
|
|
40
50
|
getAdapterClass: () => Promise.resolve().then(() => __importStar(require('./PAFAdapter'))).then(r => r.default),
|
|
41
51
|
}));
|
package/dist/PAFAdapter/util.js
CHANGED
|
@@ -2,40 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getWeightedMeans = getWeightedMeans;
|
|
4
4
|
const util_1 = require("../util");
|
|
5
|
-
// based on "weighted mean" method from https://github.com/tpoorten/dotPlotly
|
|
6
|
-
// License reproduced here
|
|
7
|
-
//
|
|
8
|
-
// MIT License
|
|
9
|
-
// Copyright (c) 2017 Tom Poorten
|
|
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
|
-
// The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
// copies or substantial portions of the Software.
|
|
18
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
-
// SOFTWARE.
|
|
25
|
-
//
|
|
26
|
-
// Notes: in the weighted mean longer alignments factor in more heavily of all
|
|
27
|
-
// the fragments of a query vs the reference that it mapped to
|
|
28
|
-
//
|
|
29
|
-
// this uses a combined key query+'-'+ref to iteratively map all the alignments
|
|
30
|
-
// that match a particular ref from a particular query (so 1d array of what
|
|
31
|
-
// could be a 2d map)
|
|
32
|
-
//
|
|
33
|
-
// the result is a single number that says e.g. chr5 from human mapped to chr5
|
|
34
|
-
// on mouse with 0.8 quality, and that0.8 is then attached to all the pieces of
|
|
35
|
-
// chr5 on human that mapped to chr5 on mouse. if chr5 on human also more
|
|
36
|
-
// weakly mapped to chr6 on mouse, then it would have another value e.g. 0.6.
|
|
37
|
-
// this can show strong and weak levels of synteny, especially in polyploidy
|
|
38
|
-
// situations
|
|
39
5
|
function getWeightedMeans(ret) {
|
|
40
6
|
const scoreMap = {};
|
|
41
7
|
for (const entry of ret) {
|
|
@@ -70,7 +36,6 @@ function getWeightedMeans(ret) {
|
|
|
70
36
|
}
|
|
71
37
|
return ret;
|
|
72
38
|
}
|
|
73
|
-
// https://gist.github.com/stekhn/a12ed417e91f90ecec14bcfa4c2ae16a
|
|
74
39
|
function weightedMean(tuples) {
|
|
75
40
|
const [valueSum, weightSum] = tuples.reduce(([valueSum, weightSum], [value, weight]) => [
|
|
76
41
|
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
|
}
|
|
@@ -3,13 +3,12 @@ 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 tabix_1 = require("@gmod/tabix");
|
|
6
7
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
|
-
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
8
8
|
const io_1 = require("@jbrowse/core/util/io");
|
|
9
|
-
const
|
|
10
|
-
// locals
|
|
11
|
-
const util_1 = require("../util");
|
|
9
|
+
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
12
10
|
const SyntenyFeature_1 = __importDefault(require("../SyntenyFeature"));
|
|
11
|
+
const util_1 = require("../util");
|
|
13
12
|
class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
14
13
|
constructor(config, getSubAdapter, pluginManager) {
|
|
15
14
|
super(config, getSubAdapter, pluginManager);
|
|
@@ -98,12 +97,12 @@ class PAFAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
98
97
|
},
|
|
99
98
|
}));
|
|
100
99
|
},
|
|
101
|
-
|
|
100
|
+
stopToken: opts.stopToken,
|
|
102
101
|
});
|
|
103
102
|
observer.complete();
|
|
104
103
|
});
|
|
105
104
|
}
|
|
106
|
-
freeResources(
|
|
105
|
+
freeResources() { }
|
|
107
106
|
}
|
|
108
107
|
PAFAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
109
108
|
exports.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: {
|