@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
|
@@ -2,38 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const configuration_1 = require("@jbrowse/core/configuration");
|
|
4
4
|
const mobx_state_tree_1 = require("mobx-state-tree");
|
|
5
|
-
|
|
6
|
-
* #config PairwiseIndexedPAFAdapter
|
|
7
|
-
*/
|
|
8
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
function x() { }
|
|
9
6
|
const PairwiseIndexedPAFAdapter = (0, configuration_1.ConfigurationSchema)('PairwiseIndexedPAFAdapter', {
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
7
|
assemblyNames: {
|
|
14
8
|
type: 'stringArray',
|
|
15
9
|
defaultValue: [],
|
|
16
10
|
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
11
|
},
|
|
18
|
-
/**
|
|
19
|
-
* #slot
|
|
20
|
-
*/
|
|
21
12
|
targetAssembly: {
|
|
22
13
|
type: 'string',
|
|
23
14
|
defaultValue: '',
|
|
24
15
|
description: 'Alternative to assemblyNames: the target assembly name',
|
|
25
16
|
},
|
|
26
|
-
/**
|
|
27
|
-
* #slot
|
|
28
|
-
*/
|
|
29
17
|
queryAssembly: {
|
|
30
18
|
type: 'string',
|
|
31
19
|
defaultValue: '',
|
|
32
20
|
description: 'Alternative to assemblyNames: the query assembly name',
|
|
33
21
|
},
|
|
34
|
-
/**
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
22
|
pifGzLocation: {
|
|
38
23
|
type: 'fileLocation',
|
|
39
24
|
description: 'location of pairwise tabix indexed PAF (pif)',
|
|
@@ -42,21 +27,12 @@ const PairwiseIndexedPAFAdapter = (0, configuration_1.ConfigurationSchema)('Pair
|
|
|
42
27
|
locationType: 'UriLocation',
|
|
43
28
|
},
|
|
44
29
|
},
|
|
45
|
-
/**
|
|
46
|
-
* #slot
|
|
47
|
-
*/
|
|
48
30
|
index: (0, configuration_1.ConfigurationSchema)('TabixIndex', {
|
|
49
|
-
/**
|
|
50
|
-
* #slot index.indexType
|
|
51
|
-
*/
|
|
52
31
|
indexType: {
|
|
53
32
|
model: mobx_state_tree_1.types.enumeration('IndexType', ['TBI', 'CSI']),
|
|
54
33
|
type: 'stringEnum',
|
|
55
34
|
defaultValue: 'TBI',
|
|
56
35
|
},
|
|
57
|
-
/**
|
|
58
|
-
* #slot index.location
|
|
59
|
-
*/
|
|
60
36
|
location: {
|
|
61
37
|
type: 'fileLocation',
|
|
62
38
|
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;
|
|
@@ -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 PairwiseIndexedPAFAdapterF(pluginManager) {
|
|
|
35
45
|
displayName: 'Pairwise indexed 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('./PairwiseIndexedPAFAdapter'))).then(r => r.default),
|
|
41
51
|
}));
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const util_1 = require("@jbrowse/core/util");
|
|
4
4
|
const plugin_alignments_1 = require("@jbrowse/plugin-alignments");
|
|
5
|
-
// locals
|
|
6
5
|
const { getMismatches } = plugin_alignments_1.MismatchParser;
|
|
7
6
|
class SyntenyFeature extends util_1.SimpleFeature {
|
|
8
7
|
get(arg) {
|
package/dist/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/dist/index.js
CHANGED
|
@@ -4,15 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const Plugin_1 = __importDefault(require("@jbrowse/core/Plugin"));
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const BlastTabularAdapter_1 = __importDefault(require("./BlastTabularAdapter"));
|
|
8
|
+
const ChainAdapter_1 = __importDefault(require("./ChainAdapter"));
|
|
9
|
+
const ComparativeAddTrackComponent_1 = __importDefault(require("./ComparativeAddTrackComponent"));
|
|
10
|
+
const DeltaAdapter_1 = __importDefault(require("./DeltaAdapter"));
|
|
11
|
+
const GuessAdapter_1 = __importDefault(require("./GuessAdapter"));
|
|
12
|
+
const MCScanAddTrackComponent_1 = __importDefault(require("./MCScanAddTrackComponent"));
|
|
9
13
|
const MCScanAnchorsAdapter_1 = __importDefault(require("./MCScanAnchorsAdapter"));
|
|
10
14
|
const MCScanSimpleAnchorsAdapter_1 = __importDefault(require("./MCScanSimpleAnchorsAdapter"));
|
|
11
15
|
const MashMapAdapter_1 = __importDefault(require("./MashMapAdapter"));
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const BlastTabularAdapter_1 = __importDefault(require("./BlastTabularAdapter"));
|
|
15
|
-
const tracks_1 = require("@jbrowse/core/util/tracks");
|
|
16
|
+
const PAFAdapter_1 = __importDefault(require("./PAFAdapter"));
|
|
17
|
+
const PairwiseIndexedPAFAdapter_1 = __importDefault(require("./PairwiseIndexedPAFAdapter"));
|
|
16
18
|
class ComparativeAdaptersPlugin extends Plugin_1.default {
|
|
17
19
|
constructor() {
|
|
18
20
|
super(...arguments);
|
|
@@ -27,25 +29,9 @@ class ComparativeAdaptersPlugin extends Plugin_1.default {
|
|
|
27
29
|
(0, MCScanSimpleAnchorsAdapter_1.default)(pluginManager);
|
|
28
30
|
(0, MashMapAdapter_1.default)(pluginManager);
|
|
29
31
|
(0, BlastTabularAdapter_1.default)(pluginManager);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const adapterName = 'PAFAdapter';
|
|
34
|
-
const fileName = (0, tracks_1.getFileName)(file);
|
|
35
|
-
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
36
|
-
return {
|
|
37
|
-
type: adapterName,
|
|
38
|
-
pafLocation: file,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return adapterGuesser(file, index, adapterHint);
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
pluginManager.addToExtensionPoint('Core-guessTrackTypeForLocation', (trackTypeGuesser) => {
|
|
45
|
-
return (adapterName) => adapterName === 'PAFAdapter'
|
|
46
|
-
? 'SyntenyTrack'
|
|
47
|
-
: trackTypeGuesser(adapterName);
|
|
48
|
-
});
|
|
32
|
+
(0, ComparativeAddTrackComponent_1.default)(pluginManager);
|
|
33
|
+
(0, MCScanAddTrackComponent_1.default)(pluginManager);
|
|
34
|
+
(0, GuessAdapter_1.default)(pluginManager);
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
37
|
exports.default = ComparativeAdaptersPlugin;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mcscanTypes = exports.pairwiseTypes = exports.syntenyTypes = void 0;
|
|
4
|
+
exports.syntenyTypes = [
|
|
5
|
+
'PAFAdapter',
|
|
6
|
+
'ChainAdapter',
|
|
7
|
+
'DeltaAdapter',
|
|
8
|
+
'BlastTabularAdapter',
|
|
9
|
+
'MashMapAdapter',
|
|
10
|
+
'MCScanAnchorsAdapter',
|
|
11
|
+
'MCScanSimpleAnchorsAdapter',
|
|
12
|
+
'PairwiseIndexedPAFAdapter',
|
|
13
|
+
];
|
|
14
|
+
exports.pairwiseTypes = [
|
|
15
|
+
'PAFAdapter',
|
|
16
|
+
'ChainAdapter',
|
|
17
|
+
'DeltaAdapter',
|
|
18
|
+
'MashMapAdapter',
|
|
19
|
+
'BlastTabularAdapter',
|
|
20
|
+
'PairwiseIndexedPAFAdapter',
|
|
21
|
+
];
|
|
22
|
+
exports.mcscanTypes = [
|
|
23
|
+
'MCScanAnchorsAdapter',
|
|
24
|
+
'MCScanSimpleAnchorsAdapter',
|
|
25
|
+
];
|
package/dist/util.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import { PAFRecord } from './PAFAdapter/util';
|
|
1
|
+
import type { PAFRecord } from './PAFAdapter/util';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import type { GenericFilehandle } from 'generic-filehandle2';
|
|
5
4
|
export declare function parseBed(text: string): Map<string | undefined, {
|
|
6
5
|
refName: string | undefined;
|
|
7
6
|
start: number;
|
|
@@ -12,7 +11,7 @@ export declare function parseBed(text: string): Map<string | undefined, {
|
|
|
12
11
|
}>;
|
|
13
12
|
export declare function readFile(file: GenericFilehandle, opts?: BaseOptions): Promise<string>;
|
|
14
13
|
export declare function zip(a: number[], b: number[]): [number, number][];
|
|
15
|
-
export declare function parseLineByLine<T>(buffer:
|
|
14
|
+
export declare function parseLineByLine<T>(buffer: Uint8Array, cb: (line: string) => T | undefined): T[];
|
|
16
15
|
export declare function parsePAFLine(line: string): PAFRecord;
|
|
17
16
|
export declare function flipCigar(cigar: string[]): (string | undefined)[];
|
|
18
17
|
export declare function swapIndelCigar(cigar: string): string;
|
package/dist/util.js
CHANGED
|
@@ -28,9 +28,7 @@ function parseBed(text) {
|
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
async function readFile(file, opts) {
|
|
31
|
-
|
|
32
|
-
const decoder = new TextDecoder('utf8');
|
|
33
|
-
return decoder.decode(buf);
|
|
31
|
+
return (0, util_1.fetchAndMaybeUnzipText)(file, opts);
|
|
34
32
|
}
|
|
35
33
|
function zip(a, b) {
|
|
36
34
|
return a.map((e, i) => [e, b[i]]);
|
|
@@ -40,7 +38,7 @@ function parseLineByLine(buffer, cb) {
|
|
|
40
38
|
const entries = [];
|
|
41
39
|
const decoder = new TextDecoder('utf8');
|
|
42
40
|
while (blockStart < buffer.length) {
|
|
43
|
-
const n = buffer.indexOf(
|
|
41
|
+
const n = buffer.indexOf(10, blockStart);
|
|
44
42
|
if (n === -1) {
|
|
45
43
|
break;
|
|
46
44
|
}
|
|
@@ -1,109 +1,55 @@
|
|
|
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 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 {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { readConfObject } from '@jbrowse/core/configuration';
|
|
2
|
-
import { BaseFeatureDataAdapter
|
|
3
|
-
import {
|
|
4
|
-
import { doesIntersect2, fetchAndMaybeUnzip, } from '@jbrowse/core/util';
|
|
2
|
+
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
+
import { doesIntersect2, fetchAndMaybeUnzip } from '@jbrowse/core/util';
|
|
5
4
|
import { openLocation } from '@jbrowse/core/util/io';
|
|
6
|
-
import {
|
|
5
|
+
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
7
6
|
import SyntenyFeature from '../SyntenyFeature';
|
|
7
|
+
import { parseLineByLine } from '../util';
|
|
8
8
|
function createBlastLineParser(columns) {
|
|
9
9
|
const columnNames = columns.trim().split(' ');
|
|
10
10
|
const qseqidIndex = columnNames.indexOf('qseqid');
|
|
@@ -63,7 +63,6 @@ function createBlastLineParser(columns) {
|
|
|
63
63
|
if (!value) {
|
|
64
64
|
continue;
|
|
65
65
|
}
|
|
66
|
-
// @ts-expect-error
|
|
67
66
|
record[columnName] = value;
|
|
68
67
|
}
|
|
69
68
|
return record;
|
|
@@ -86,9 +85,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
|
|
|
86
85
|
return parseLineByLine(buf, createBlastLineParser(columns));
|
|
87
86
|
}
|
|
88
87
|
async hasDataForRefName() {
|
|
89
|
-
// determining this properly is basically a call to getFeatures
|
|
90
|
-
// so is not really that important, and has to be true or else
|
|
91
|
-
// getFeatures is never called (BaseAdapter filters it out)
|
|
92
88
|
return true;
|
|
93
89
|
}
|
|
94
90
|
getAssemblyNames() {
|
|
@@ -102,7 +98,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
|
|
|
102
98
|
}
|
|
103
99
|
async getRefNames(opts = {}) {
|
|
104
100
|
var _a;
|
|
105
|
-
// @ts-expect-error
|
|
106
101
|
const r1 = (_a = opts.regions) === null || _a === void 0 ? void 0 : _a[0].assemblyName;
|
|
107
102
|
const feats = await this.getData(opts);
|
|
108
103
|
const idx = this.getAssemblyNames().indexOf(r1);
|
|
@@ -120,8 +115,6 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
|
|
|
120
115
|
return ObservableCreate(async (observer) => {
|
|
121
116
|
const blastRecords = await this.getData(opts);
|
|
122
117
|
const [queryAssembly, targetAssembly] = this.getAssemblyNames();
|
|
123
|
-
// The index of the assembly name in the query list corresponds to the
|
|
124
|
-
// adapter in the subadapters list
|
|
125
118
|
const { refName: queryRefName, assemblyName: queryAssemblyName, start: queryStart, end: queryEnd, } = query;
|
|
126
119
|
if (queryAssemblyName !== targetAssembly &&
|
|
127
120
|
queryAssemblyName !== queryAssembly) {
|
|
@@ -196,7 +189,7 @@ class BlastTabularAdapter extends BaseFeatureDataAdapter {
|
|
|
196
189
|
observer.complete();
|
|
197
190
|
});
|
|
198
191
|
}
|
|
199
|
-
freeResources(
|
|
192
|
+
freeResources() { }
|
|
200
193
|
}
|
|
201
194
|
BlastTabularAdapter.capabilities = ['getFeatures', 'getRefNames'];
|
|
202
195
|
export 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,36 +1,21 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config BlastTabularAdapter
|
|
4
|
-
*/
|
|
5
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
6
3
|
const BlastTabularAdapter = ConfigurationSchema('BlastTabularAdapter', {
|
|
7
|
-
/**
|
|
8
|
-
* #slot
|
|
9
|
-
*/
|
|
10
4
|
assemblyNames: {
|
|
11
5
|
type: 'stringArray',
|
|
12
6
|
defaultValue: [],
|
|
13
7
|
description: 'Query assembly is the first value in the array, target assembly 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 array: the target assembly',
|
|
22
13
|
},
|
|
23
|
-
/**
|
|
24
|
-
* #slot
|
|
25
|
-
*/
|
|
26
14
|
queryAssembly: {
|
|
27
15
|
type: 'string',
|
|
28
16
|
defaultValue: '',
|
|
29
17
|
description: 'Alternative to assemblyNames array: the query assembly',
|
|
30
18
|
},
|
|
31
|
-
/**
|
|
32
|
-
* #slot
|
|
33
|
-
*/
|
|
34
19
|
blastTableLocation: {
|
|
35
20
|
type: 'fileLocation',
|
|
36
21
|
defaultValue: {
|
|
@@ -38,9 +23,6 @@ const BlastTabularAdapter = ConfigurationSchema('BlastTabularAdapter', {
|
|
|
38
23
|
locationType: 'UriLocation',
|
|
39
24
|
},
|
|
40
25
|
},
|
|
41
|
-
/**
|
|
42
|
-
* #slot
|
|
43
|
-
*/
|
|
44
26
|
columns: {
|
|
45
27
|
type: 'string',
|
|
46
28
|
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;
|
|
@@ -6,7 +6,7 @@ export default function BlastTabularAdapterF(pluginManager) {
|
|
|
6
6
|
displayName: 'Tabular BLAST output adapter',
|
|
7
7
|
configSchema,
|
|
8
8
|
adapterMetadata: {
|
|
9
|
-
|
|
9
|
+
category: 'Synteny adapters',
|
|
10
10
|
},
|
|
11
11
|
getAdapterClass: () => import('./BlastTabularAdapter').then(r => r.default),
|
|
12
12
|
}));
|
|
@@ -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;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { openLocation } from '@jbrowse/core/util/io';
|
|
2
1
|
import { fetchAndMaybeUnzip } from '@jbrowse/core/util';
|
|
3
|
-
|
|
4
|
-
import PAFAdapter from '../PAFAdapter/PAFAdapter';
|
|
2
|
+
import { openLocation } from '@jbrowse/core/util/io';
|
|
5
3
|
import { paf_chain2paf } from './util';
|
|
4
|
+
import PAFAdapter from '../PAFAdapter/PAFAdapter';
|
|
6
5
|
export default class ChainAdapter extends PAFAdapter {
|
|
7
6
|
async setupPre(opts) {
|
|
8
7
|
const loc = 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,39 +1,21 @@
|
|
|
1
1
|
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
|
|
3
|
-
* #config ChainAdapter
|
|
4
|
-
* #category adapter
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
2
|
+
function x() { }
|
|
7
3
|
const ChainAdapter = ConfigurationSchema('ChainAdapter', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
4
|
assemblyNames: {
|
|
12
5
|
type: 'stringArray',
|
|
13
6
|
defaultValue: [],
|
|
14
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',
|
|
15
8
|
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
* can be specified as alternative to assemblyNames
|
|
19
|
-
*/
|
|
20
9
|
targetAssembly: {
|
|
21
10
|
type: 'string',
|
|
22
11
|
defaultValue: '',
|
|
23
12
|
description: 'Alternative to assemblyNames array: the target assembly',
|
|
24
13
|
},
|
|
25
|
-
/**
|
|
26
|
-
* #slot
|
|
27
|
-
* can be specified as alternative to assemblyNames
|
|
28
|
-
*/
|
|
29
14
|
queryAssembly: {
|
|
30
15
|
type: 'string',
|
|
31
16
|
defaultValue: '',
|
|
32
17
|
description: 'Alternative to assemblyNames array: the query assembly',
|
|
33
18
|
},
|
|
34
|
-
/**
|
|
35
|
-
* #slot
|
|
36
|
-
*/
|
|
37
19
|
chainLocation: {
|
|
38
20
|
type: 'fileLocation',
|
|
39
21
|
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;
|
|
@@ -6,7 +6,7 @@ export default function ChainAdapterF(pluginManager) {
|
|
|
6
6
|
displayName: 'Liftover chain adapter',
|
|
7
7
|
configSchema,
|
|
8
8
|
adapterMetadata: {
|
|
9
|
-
|
|
9
|
+
category: 'Synteny adapters',
|
|
10
10
|
},
|
|
11
11
|
getAdapterClass: () => import('./ChainAdapter').then(r => r.default),
|
|
12
12
|
}));
|