@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,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;
|
|
@@ -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 DeltaAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'MUMmer delta 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('./DeltaAdapter'))).then(r => r.default),
|
|
41
51
|
}));
|
|
@@ -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 = '';
|
|
@@ -47,7 +20,7 @@ function paf_delta2paf(buffer) {
|
|
|
47
20
|
let i = 0;
|
|
48
21
|
const decoder = new TextDecoder('utf8');
|
|
49
22
|
while (blockStart < buffer.length) {
|
|
50
|
-
const n = buffer.indexOf(
|
|
23
|
+
const n = buffer.indexOf(10, blockStart);
|
|
51
24
|
if (n === -1) {
|
|
52
25
|
break;
|
|
53
26
|
}
|
|
@@ -125,7 +98,7 @@ function paf_delta2paf(buffer) {
|
|
|
125
98
|
}
|
|
126
99
|
else {
|
|
127
100
|
cigar.push((1 << 4) | 2);
|
|
128
|
-
}
|
|
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
|
-
}
|
|
115
|
+
}
|
|
143
116
|
}
|
|
144
117
|
}
|
|
145
118
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = GuessAdapterF;
|
|
4
|
+
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
6
|
+
const syntenyTypes_1 = require("../syntenyTypes");
|
|
7
|
+
function GuessAdapterF(pluginManager) {
|
|
8
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', (adapterGuesser) => {
|
|
9
|
+
return (file, index, adapterHint) => {
|
|
10
|
+
const fileName = (0, tracks_1.getFileName)(file);
|
|
11
|
+
const indexName = index && (0, tracks_1.getFileName)(index);
|
|
12
|
+
if ((0, util_1.testAdapter)(fileName, /\.paf(.gz)?/i, adapterHint, 'PAFAdapter')) {
|
|
13
|
+
return {
|
|
14
|
+
type: 'PAFAdapter',
|
|
15
|
+
pafLocation: file,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
else if (adapterHint === 'BlastTabularAdapter') {
|
|
19
|
+
return {
|
|
20
|
+
type: 'BlastTabularAdapter',
|
|
21
|
+
blastTableLocation: file,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
else if ((0, util_1.testAdapter)(fileName, /\.anchors.simple(.gz)?/i, adapterHint, 'MCScanSimpleAnchorsAdapter')) {
|
|
25
|
+
return {
|
|
26
|
+
type: 'MCScanSimpleAnchorsAdapter',
|
|
27
|
+
mcscanSimpleAnchorsLocation: file,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
else if ((0, util_1.testAdapter)(fileName, /\.anchors(.gz)?/i, adapterHint, 'MCScanAnchorsAdapter')) {
|
|
31
|
+
return {
|
|
32
|
+
type: 'MCScanAnchorsAdapter',
|
|
33
|
+
mcscanAnchorsLocation: file,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
else if ((0, util_1.testAdapter)(fileName, /\.delta(.gz)?/i, adapterHint, 'DeltaAdapter')) {
|
|
37
|
+
return {
|
|
38
|
+
type: 'DeltaAdapter',
|
|
39
|
+
deltaLocation: file,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
else if ((0, util_1.testAdapter)(fileName, /\.chain(.gz)?/i, adapterHint, 'ChainAdapter')) {
|
|
43
|
+
return {
|
|
44
|
+
type: 'ChainAdapter',
|
|
45
|
+
chainLocation: file,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
else if ((0, util_1.testAdapter)(fileName, /\.out(.gz)?/i, adapterHint, 'MashMapAdapter')) {
|
|
49
|
+
return {
|
|
50
|
+
type: 'MashMapAdapter',
|
|
51
|
+
outLocation: file,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
else if ((0, util_1.testAdapter)(fileName, /\.pif\.gz/i, adapterHint, 'PairwiseIndexedPAFAdapter')) {
|
|
55
|
+
return {
|
|
56
|
+
type: 'PairwiseIndexedPAFAdapter',
|
|
57
|
+
pifGzLocation: file,
|
|
58
|
+
index: {
|
|
59
|
+
location: index || (0, tracks_1.makeIndex)(file, '.tbi'),
|
|
60
|
+
indexType: (0, tracks_1.makeIndexType)(indexName, 'CSI', 'TBI'),
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
return adapterGuesser(file, index, adapterHint);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', (trackTypeGuesser) => {
|
|
70
|
+
return (adapterName) => syntenyTypes_1.syntenyTypes.includes(adapterName)
|
|
71
|
+
? 'SyntenyTrack'
|
|
72
|
+
: trackTypeGuesser(adapterName);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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 material_1 = require("@mui/material");
|
|
8
|
+
const mobx_react_1 = require("mobx-react");
|
|
9
|
+
const MCScanAddTrackComponent = (0, mobx_react_1.observer)(function ({ model }) {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const session = (0, util_1.getSession)(model);
|
|
12
|
+
const [r0, setR0] = (0, react_1.useState)((_a = session.assemblies[0]) === null || _a === void 0 ? void 0 : _a.name);
|
|
13
|
+
const [r1, setR1] = (0, react_1.useState)((_b = session.assemblies[0]) === null || _b === void 0 ? void 0 : _b.name);
|
|
14
|
+
const [bed1Location, setBed1Location] = (0, react_1.useState)();
|
|
15
|
+
const [bed2Location, setBed2Location] = (0, react_1.useState)();
|
|
16
|
+
(0, react_1.useEffect)(() => {
|
|
17
|
+
model.setMixinData({
|
|
18
|
+
adapter: {
|
|
19
|
+
assemblyNamees: [r0, r1],
|
|
20
|
+
bed1Location,
|
|
21
|
+
bed2Location,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}, [model, bed1Location, bed2Location, r0, r1]);
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: { marginTop: 20 }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: "JBrowse requires the two BED files that specify the genomic locations of the genes in the .anchors files" }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { session: session, label: "BED1 assembly", helperText: "", selected: r0, onChange: asm => {
|
|
26
|
+
setR0(asm);
|
|
27
|
+
}, TextFieldProps: {
|
|
28
|
+
fullWidth: true,
|
|
29
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.AssemblySelector, { session: session, label: "BED2 assembly", helperText: "", selected: r1, onChange: asm => {
|
|
30
|
+
setR1(asm);
|
|
31
|
+
}, TextFieldProps: {
|
|
32
|
+
fullWidth: true,
|
|
33
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: "BED1", inline: true, description: "", location: bed1Location, setLocation: loc => {
|
|
34
|
+
setBed1Location(loc);
|
|
35
|
+
} }), (0, jsx_runtime_1.jsx)(ui_1.FileSelector, { name: "BED2", inline: true, description: "", location: bed2Location, setLocation: loc => {
|
|
36
|
+
setBed2Location(loc);
|
|
37
|
+
} })] }));
|
|
38
|
+
});
|
|
39
|
+
exports.default = MCScanAddTrackComponent;
|
|
@@ -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 = MCScanAddTrackComponentF;
|
|
37
|
+
const react_1 = require("react");
|
|
38
|
+
const syntenyTypes_1 = require("../syntenyTypes");
|
|
39
|
+
const MCScanAddTrackComponent = (0, react_1.lazy)(() => Promise.resolve().then(() => __importStar(require('./MCScanAddTrackComponent'))));
|
|
40
|
+
function MCScanAddTrackComponentF(pluginManager) {
|
|
41
|
+
pluginManager.addToExtensionPoint('Core-addTrackComponent', (comp, { model }) => {
|
|
42
|
+
return syntenyTypes_1.mcscanTypes.includes(model.trackAdapterType)
|
|
43
|
+
? MCScanAddTrackComponent
|
|
44
|
+
: comp;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
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 {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
4
|
-
const io_1 = require("@jbrowse/core/util/io");
|
|
5
4
|
const util_1 = require("@jbrowse/core/util");
|
|
5
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
6
6
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
7
7
|
const util_2 = require("../util");
|
|
8
8
|
class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
@@ -42,9 +42,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
async hasDataForRefName() {
|
|
45
|
-
// determining this properly is basically a call to getFeatures so is not
|
|
46
|
-
// really that important, and has to be true or else getFeatures is never
|
|
47
|
-
// called (BaseFeatureDataAdapter filters it out)
|
|
48
45
|
return true;
|
|
49
46
|
}
|
|
50
47
|
getAssemblyNames() {
|
|
@@ -53,7 +50,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
53
50
|
}
|
|
54
51
|
async getRefNames(opts = {}) {
|
|
55
52
|
var _a;
|
|
56
|
-
// @ts-expect-error
|
|
57
53
|
const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
|
|
58
54
|
const { feats } = await this.setup(opts);
|
|
59
55
|
const idx = this.getAssemblyNames().indexOf(r1);
|
|
@@ -70,8 +66,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
70
66
|
getFeatures(region, opts = {}) {
|
|
71
67
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
72
68
|
const { assemblyNames, feats } = await this.setup(opts);
|
|
73
|
-
// The index of the assembly name in the region list corresponds to
|
|
74
|
-
// the adapter in the subadapters list
|
|
75
69
|
const index = assemblyNames.indexOf(region.assemblyName);
|
|
76
70
|
if (index !== -1) {
|
|
77
71
|
const flip = index === 0;
|
|
@@ -84,8 +78,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
84
78
|
...f1,
|
|
85
79
|
uniqueId: `${index}-${rowNum}`,
|
|
86
80
|
syntenyId: rowNum,
|
|
87
|
-
// note: strand would be -1 if the two features are on opposite
|
|
88
|
-
// strands, indicating inverted alignment
|
|
89
81
|
strand: f1.strand * f2.strand,
|
|
90
82
|
assemblyName: assemblyNames[+!flip],
|
|
91
83
|
score,
|
|
@@ -100,12 +92,7 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
100
92
|
observer.complete();
|
|
101
93
|
});
|
|
102
94
|
}
|
|
103
|
-
|
|
104
|
-
* called to provide a hint that data tied to a certain region
|
|
105
|
-
* will not be needed for the foreseeable future and can be purged
|
|
106
|
-
* from caches, etc
|
|
107
|
-
*/
|
|
108
|
-
freeResources( /* { region } */) { }
|
|
95
|
+
freeResources() { }
|
|
109
96
|
}
|
|
110
97
|
MCScanAnchorsAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
111
98
|
exports.default = MCScanAnchorsAdapter;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
declare const MCScanAnchorsAdapter: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
2
|
mcscanAnchorsLocation: {
|
|
6
3
|
type: string;
|
|
7
4
|
defaultValue: {
|
|
@@ -9,9 +6,6 @@ declare const MCScanAnchorsAdapter: import("@jbrowse/core/configuration/configur
|
|
|
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 MCScanAnchorsAdapter: import("@jbrowse/core/configuration/configur
|
|
|
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 MCScanAnchorsAdapter: import("@jbrowse/core/configuration/configur
|
|
|
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 MCScanAnchorsAdapter
|
|
6
|
-
*/
|
|
7
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
function x() { }
|
|
8
5
|
const MCScanAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCScanAnchorsAdapter', {
|
|
9
|
-
/**
|
|
10
|
-
* #slot
|
|
11
|
-
*/
|
|
12
6
|
mcscanAnchorsLocation: {
|
|
13
7
|
type: 'fileLocation',
|
|
14
8
|
defaultValue: {
|
|
@@ -16,9 +10,6 @@ const MCScanAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCScanAnc
|
|
|
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 MCScanAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCScanAnc
|
|
|
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 MCScanAnchorsAdapter = (0, configuration_1.ConfigurationSchema)('MCScanAnc
|
|
|
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 MCScanAnchorsAdapterF(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 MCScanAnchorsAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'MCScan anchors 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('./MCScanAnchorsAdapter'))).then(r => r.default),
|
|
41
51
|
}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter
|
|
2
|
-
import {
|
|
3
|
-
import { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
1
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { Feature } from '@jbrowse/core/util/simpleFeature';
|
|
4
|
+
import type { Region } from '@jbrowse/core/util/types';
|
|
4
5
|
interface BareFeature {
|
|
5
6
|
refName: string;
|
|
6
7
|
start: number;
|
|
@@ -32,11 +33,6 @@ export default class MCScanAnchorsAdapter extends BaseFeatureDataAdapter {
|
|
|
32
33
|
getAssemblyNames(): string[];
|
|
33
34
|
getRefNames(opts?: BaseOptions): Promise<string[]>;
|
|
34
35
|
getFeatures(region: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
35
|
-
/**
|
|
36
|
-
* called to provide a hint that data tied to a certain region
|
|
37
|
-
* will not be needed for the foreseeable future and can be purged
|
|
38
|
-
* from caches, etc
|
|
39
|
-
*/
|
|
40
36
|
freeResources(): void;
|
|
41
37
|
}
|
|
42
38
|
export {};
|
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const BaseAdapter_1 = require("@jbrowse/core/data_adapters/BaseAdapter");
|
|
7
|
-
const io_1 = require("@jbrowse/core/util/io");
|
|
8
7
|
const util_1 = require("@jbrowse/core/util");
|
|
8
|
+
const io_1 = require("@jbrowse/core/util/io");
|
|
9
9
|
const rxjs_1 = require("@jbrowse/core/util/rxjs");
|
|
10
10
|
const simpleFeature_1 = __importDefault(require("@jbrowse/core/util/simpleFeature"));
|
|
11
11
|
const util_2 = require("../util");
|
|
@@ -56,9 +56,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
async hasDataForRefName() {
|
|
59
|
-
// determining this properly is basically a call to getFeatures
|
|
60
|
-
// so is not really that important, and has to be true or else
|
|
61
|
-
// getFeatures is never called (BaseFeatureDataAdapter filters it out)
|
|
62
59
|
return true;
|
|
63
60
|
}
|
|
64
61
|
getAssemblyNames() {
|
|
@@ -67,7 +64,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
67
64
|
}
|
|
68
65
|
async getRefNames(opts = {}) {
|
|
69
66
|
var _a;
|
|
70
|
-
// @ts-expect-error
|
|
71
67
|
const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
|
|
72
68
|
const { feats } = await this.setup(opts);
|
|
73
69
|
const idx = this.getAssemblyNames().indexOf(r1);
|
|
@@ -91,8 +87,6 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
91
87
|
getFeatures(region, opts = {}) {
|
|
92
88
|
return (0, rxjs_1.ObservableCreate)(async (observer) => {
|
|
93
89
|
const { assemblyNames, feats } = await this.setup(opts);
|
|
94
|
-
// The index of the assembly name in the region list corresponds to
|
|
95
|
-
// the adapter in the subadapters list
|
|
96
90
|
const index = assemblyNames.indexOf(region.assemblyName);
|
|
97
91
|
if (index !== -1) {
|
|
98
92
|
const flip = index === 0;
|
|
@@ -132,12 +126,7 @@ class MCScanAnchorsAdapter extends BaseAdapter_1.BaseFeatureDataAdapter {
|
|
|
132
126
|
observer.complete();
|
|
133
127
|
});
|
|
134
128
|
}
|
|
135
|
-
|
|
136
|
-
* called to provide a hint that data tied to a certain region
|
|
137
|
-
* will not be needed for the foreseeable future and can be purged
|
|
138
|
-
* from caches, etc
|
|
139
|
-
*/
|
|
140
|
-
freeResources( /* { region } */) { }
|
|
129
|
+
freeResources() { }
|
|
141
130
|
}
|
|
142
131
|
MCScanAnchorsAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
143
132
|
exports.default = MCScanAnchorsAdapter;
|