@jbrowse/plugin-comparative-adapters 2.17.0 → 2.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/util.js +1 -48
- 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/util.js +2 -29
- 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/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/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/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/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/SyntenyFeature/index.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/util.d.ts +3 -3
- 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/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/util.js +1 -48
- 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/util.js +2 -29
- 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/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/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/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/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/SyntenyFeature/index.js +0 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +6 -6
- package/esm/util.d.ts +3 -3
- package/package.json +2 -2
|
@@ -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: {
|
|
@@ -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;
|
|
@@ -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,15 @@ 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 tracks_1 = require("@jbrowse/core/util/tracks");
|
|
8
|
+
const BlastTabularAdapter_1 = __importDefault(require("./BlastTabularAdapter"));
|
|
9
|
+
const ChainAdapter_1 = __importDefault(require("./ChainAdapter"));
|
|
10
|
+
const DeltaAdapter_1 = __importDefault(require("./DeltaAdapter"));
|
|
9
11
|
const MCScanAnchorsAdapter_1 = __importDefault(require("./MCScanAnchorsAdapter"));
|
|
10
12
|
const MCScanSimpleAnchorsAdapter_1 = __importDefault(require("./MCScanSimpleAnchorsAdapter"));
|
|
11
13
|
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");
|
|
14
|
+
const PAFAdapter_1 = __importDefault(require("./PAFAdapter"));
|
|
15
|
+
const PairwiseIndexedPAFAdapter_1 = __importDefault(require("./PairwiseIndexedPAFAdapter"));
|
|
16
16
|
class ComparativeAdaptersPlugin extends Plugin_1.default {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
package/dist/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { PAFRecord } from './PAFAdapter/util';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
3
|
import type { Buffer } from 'buffer';
|
|
4
|
-
import {
|
|
4
|
+
import type { GenericFilehandle } from 'generic-filehandle';
|
|
5
5
|
export declare function parseBed(text: string): Map<string | undefined, {
|
|
6
6
|
refName: string | undefined;
|
|
7
7
|
start: number;
|
|
@@ -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;
|
|
@@ -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;
|
package/esm/ChainAdapter/util.js
CHANGED
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/* adapted from chain2paf by Andrea Guarracino, license reproduced below
|
|
2
|
-
*
|
|
3
|
-
* MIT License
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2021 Andrea Guarracino
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
1
|
function generate_record(qname, qstart, qend, qstrand, tname, tstart, tend, cigar, numMatches) {
|
|
26
2
|
return {
|
|
27
3
|
qname,
|
|
@@ -61,26 +37,12 @@ export function paf_chain2paf(buffer) {
|
|
|
61
37
|
const b = buffer.subarray(blockStart, n);
|
|
62
38
|
const l = decoder.decode(b).trim();
|
|
63
39
|
blockStart = n + 1;
|
|
64
|
-
const l_tab = l.replaceAll(' ', '\t');
|
|
40
|
+
const l_tab = l.replaceAll(' ', '\t');
|
|
65
41
|
const l_vec = l_tab.split('\t');
|
|
66
42
|
if (l_vec[0] === 'chain') {
|
|
67
|
-
// Emit previous PAF row, if available
|
|
68
43
|
if (cigar) {
|
|
69
44
|
records.push(generate_record(q_name, q_start, q_end, q_strand, t_name, t_start, t_end, cigar, num_matches));
|
|
70
45
|
}
|
|
71
|
-
// Save query/target information
|
|
72
|
-
// score -- chain score
|
|
73
|
-
// tName -- chromosome (reference sequence)
|
|
74
|
-
// tSize -- chromosome size (reference sequence)
|
|
75
|
-
// tStrand -- strand (reference sequence)
|
|
76
|
-
// tStart -- alignment start position (reference sequence)
|
|
77
|
-
// tEnd -- alignment end position (reference sequence)
|
|
78
|
-
// qName -- chromosome (query sequence)
|
|
79
|
-
// qSize -- chromosome size (query sequence)
|
|
80
|
-
// qStrand -- strand (query sequence)
|
|
81
|
-
// qStart -- alignment start position (query sequence)
|
|
82
|
-
// qEnd -- alignment end position (query sequence)
|
|
83
|
-
// id -- chain ID
|
|
84
46
|
t_name = l_vec[2];
|
|
85
47
|
t_start = +l_vec[5];
|
|
86
48
|
t_end = +l_vec[6];
|
|
@@ -94,18 +56,10 @@ export function paf_chain2paf(buffer) {
|
|
|
94
56
|
q_start = +q_size - q_end;
|
|
95
57
|
q_end = +q_size - tmp;
|
|
96
58
|
}
|
|
97
|
-
// Initialize PAF fields
|
|
98
59
|
num_matches = 0;
|
|
99
60
|
cigar = '';
|
|
100
61
|
}
|
|
101
62
|
else {
|
|
102
|
-
// size -- the size of the ungapped alignment
|
|
103
|
-
//
|
|
104
|
-
// dt -- the difference between the end of this block and the beginning
|
|
105
|
-
// of the next block (reference sequence)
|
|
106
|
-
//
|
|
107
|
-
// dq -- the difference between the end of this block and the beginning
|
|
108
|
-
// of the next block (query sequence)
|
|
109
63
|
const size_ungapped_alignment = +l_vec[0] || 0;
|
|
110
64
|
const diff_in_target = l_vec.length > 1 ? +l_vec[1] : 0;
|
|
111
65
|
const diff_in_query = l_vec.length > 2 ? +l_vec[2] : 0;
|
|
@@ -121,7 +75,6 @@ export function paf_chain2paf(buffer) {
|
|
|
121
75
|
}
|
|
122
76
|
}
|
|
123
77
|
}
|
|
124
|
-
// Emit last PAF row, if available
|
|
125
78
|
if (cigar) {
|
|
126
79
|
generate_record(q_name, q_start, q_end, q_strand, t_name, t_start, t_end, cigar, num_matches);
|
|
127
80
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
1
|
import PAFAdapter from '../PAFAdapter/PAFAdapter';
|
|
2
|
+
import type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
3
|
export default class DeltaAdapter extends PAFAdapter {
|
|
4
4
|
setupPre(opts?: BaseOptions): Promise<{
|
|
5
5
|
qname: string;
|