jbrowse-plugin-mafviewer 1.4.1 → 1.4.3
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/LinearMafRenderer/components/LinearMafRendering.d.ts +1 -1
- package/dist/LinearMafRenderer/components/LinearMafRendering.js +0 -1
- package/dist/LinearMafRenderer/components/LinearMafRendering.js.map +1 -1
- package/dist/LinearMafRenderer/makeImageData.js +8 -3
- package/dist/LinearMafRenderer/makeImageData.js.map +1 -1
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +2 -2
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +3 -3
- package/package.json +3 -3
- package/src/LinearMafRenderer/components/LinearMafRendering.tsx +2 -2
- package/src/LinearMafRenderer/makeImageData.ts +16 -13
- package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.d.ts +0 -30
- package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.js +0 -253
- package/dist/BgzipTaffyAdapter/BgzipTaffyAdapter.js.map +0 -1
- package/dist/BgzipTaffyAdapter/configSchema.d.ts +0 -44
- package/dist/BgzipTaffyAdapter/configSchema.js +0 -53
- package/dist/BgzipTaffyAdapter/configSchema.js.map +0 -1
- package/dist/BgzipTaffyAdapter/index.d.ts +0 -2
- package/dist/BgzipTaffyAdapter/index.js +0 -11
- package/dist/BgzipTaffyAdapter/index.js.map +0 -1
- package/dist/BgzipTaffyAdapter/rowInstructions.d.ts +0 -35
- package/dist/BgzipTaffyAdapter/rowInstructions.js +0 -55
- package/dist/BgzipTaffyAdapter/rowInstructions.js.map +0 -1
- package/dist/BgzipTaffyAdapter/types.d.ts +0 -13
- package/dist/BgzipTaffyAdapter/types.js +0 -2
- package/dist/BgzipTaffyAdapter/types.js.map +0 -1
- package/dist/BgzipTaffyAdapter/util.d.ts +0 -1
- package/dist/BgzipTaffyAdapter/util.js +0 -22
- package/dist/BgzipTaffyAdapter/util.js.map +0 -1
- package/dist/BgzipTaffyAdapter/virtualOffset.d.ts +0 -8
- package/dist/BgzipTaffyAdapter/virtualOffset.js +0 -23
- package/dist/BgzipTaffyAdapter/virtualOffset.js.map +0 -1
- package/dist/LinearMafRenderer/components/ReactComponent.d.ts +0 -9
- package/dist/LinearMafRenderer/components/ReactComponent.js +0 -47
- package/dist/LinearMafRenderer/components/ReactComponent.js.map +0 -1
- package/dist/out.js +0 -32304
- package/dist/out.js.map +0 -7
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.4.
|
|
2
|
+
"version": "1.4.3",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "jbrowse-plugin-mafviewer",
|
|
5
5
|
"keywords": [
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"start": "node esbuild.mjs",
|
|
19
19
|
"test": "vitest",
|
|
20
20
|
"format": "prettier --write .",
|
|
21
|
-
"prebuild": "
|
|
21
|
+
"prebuild": "yarn clean",
|
|
22
22
|
"build": "tsc && NODE_ENV=production node esbuild.mjs",
|
|
23
23
|
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
|
|
24
|
-
"
|
|
24
|
+
"preversion": "yarn lint && yarn build",
|
|
25
25
|
"postversion": "git push --follow-tags"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -3,8 +3,9 @@ import React, { useMemo, useRef } from 'react'
|
|
|
3
3
|
import { PrerenderedCanvas } from '@jbrowse/core/ui'
|
|
4
4
|
import Flatbush from 'flatbush'
|
|
5
5
|
import { observer } from 'mobx-react'
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
import { Sample } from '../../LinearMafDisplay/types'
|
|
8
|
+
import { RenderedBase } from '../rendering'
|
|
8
9
|
|
|
9
10
|
type SerializedRBush = any
|
|
10
11
|
|
|
@@ -33,7 +34,6 @@ const LinearMafRendering = observer(function (props: {
|
|
|
33
34
|
if (x.length) {
|
|
34
35
|
const elt = x.find(idx => items[idx]?.isInsertion)
|
|
35
36
|
const r = elt !== undefined ? items[elt]! : items[x[0]!]!
|
|
36
|
-
console.log({ x, r })
|
|
37
37
|
const s = samples[r.sampleId]
|
|
38
38
|
return {
|
|
39
39
|
...r,
|
|
@@ -95,19 +95,22 @@ export function makeImageData({
|
|
|
95
95
|
renderingContext,
|
|
96
96
|
)
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
const flatbush = new Flatbush(renderingContext.spatialIndex.length || 1)
|
|
99
|
+
if (renderingContext.spatialIndex.length === 0) {
|
|
100
|
+
flatbush.add(0, 0, 1, 1)
|
|
101
|
+
} else {
|
|
102
|
+
for (
|
|
103
|
+
let i = 0, l = renderingContext.spatialIndexCoords.length;
|
|
104
|
+
i < l;
|
|
105
|
+
i += 4
|
|
106
|
+
) {
|
|
107
|
+
flatbush.add(
|
|
108
|
+
renderingContext.spatialIndexCoords[i]!,
|
|
109
|
+
renderingContext.spatialIndexCoords[i + 1]!,
|
|
110
|
+
renderingContext.spatialIndexCoords[i + 2],
|
|
111
|
+
renderingContext.spatialIndexCoords[i + 3],
|
|
112
|
+
)
|
|
113
|
+
}
|
|
111
114
|
}
|
|
112
115
|
flatbush.finish()
|
|
113
116
|
return {
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { BaseFeatureDataAdapter, BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
2
|
-
import { Feature, Region } from '@jbrowse/core/util';
|
|
3
|
-
import type { IndexData, OrganismRecord } from './types';
|
|
4
|
-
export default class BgzipTaffyAdapter extends BaseFeatureDataAdapter {
|
|
5
|
-
setupP?: Promise<IndexData>;
|
|
6
|
-
private cache;
|
|
7
|
-
getRefNames(): Promise<string[]>;
|
|
8
|
-
getChunk(buffer: Uint8Array, opts?: BaseOptions): Promise<{
|
|
9
|
-
uniqueId: string;
|
|
10
|
-
start: number;
|
|
11
|
-
end: number;
|
|
12
|
-
strand: number;
|
|
13
|
-
alignments: Record<string, OrganismRecord>;
|
|
14
|
-
seq: string;
|
|
15
|
-
} | undefined>;
|
|
16
|
-
setupPre(): Promise<IndexData>;
|
|
17
|
-
setup(opts?: BaseOptions): Promise<IndexData>;
|
|
18
|
-
readTaiFile(): Promise<IndexData>;
|
|
19
|
-
getFeatures(query: Region, opts?: BaseOptions): import("rxjs").Observable<Feature>;
|
|
20
|
-
getSamples(_query: Region): Promise<{
|
|
21
|
-
samples: {
|
|
22
|
-
id: string;
|
|
23
|
-
label?: string;
|
|
24
|
-
color?: string;
|
|
25
|
-
}[];
|
|
26
|
-
tree: Record<string, any> | undefined;
|
|
27
|
-
}>;
|
|
28
|
-
getLines(query: Region, byteRanges: IndexData): Promise<unknown>;
|
|
29
|
-
freeResources(): void;
|
|
30
|
-
}
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
import { unzip } from '@gmod/bgzf-filehandle';
|
|
2
|
-
import { BaseFeatureDataAdapter, } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
3
|
-
import { SimpleFeature, updateStatus, } from '@jbrowse/core/util';
|
|
4
|
-
import QuickLRU from '@jbrowse/core/util/QuickLRU';
|
|
5
|
-
import { openLocation } from '@jbrowse/core/util/io';
|
|
6
|
-
import { ObservableCreate } from '@jbrowse/core/util/rxjs';
|
|
7
|
-
import AbortablePromiseCache from 'abortable-promise-cache';
|
|
8
|
-
import Long from 'long';
|
|
9
|
-
import VirtualOffset from './virtualOffset';
|
|
10
|
-
import parseNewick from '../parseNewick';
|
|
11
|
-
import { normalize } from '../util';
|
|
12
|
-
import { parseRowInstructions } from './rowInstructions';
|
|
13
|
-
import { parseLineByLine } from './util';
|
|
14
|
-
const toP = (s = 0) => +(+s).toFixed(1);
|
|
15
|
-
export default class BgzipTaffyAdapter extends BaseFeatureDataAdapter {
|
|
16
|
-
setupP;
|
|
17
|
-
cache = new AbortablePromiseCache({
|
|
18
|
-
cache: new QuickLRU({ maxSize: 50 }),
|
|
19
|
-
// @ts-expect-error
|
|
20
|
-
fill: async ({ nextEntry, firstEntry }, signal, statusCallback) => {
|
|
21
|
-
const file = openLocation(this.getConf('tafGzLocation'));
|
|
22
|
-
const response = await file.read(nextEntry.virtualOffset.blockPosition -
|
|
23
|
-
firstEntry.virtualOffset.blockPosition, firstEntry.virtualOffset.blockPosition);
|
|
24
|
-
const buffer = await unzip(response);
|
|
25
|
-
const slice = buffer.slice(firstEntry.virtualOffset.dataPosition);
|
|
26
|
-
return this.getChunk(slice, {
|
|
27
|
-
statusCallback: statusCallback,
|
|
28
|
-
signal,
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
async getRefNames() {
|
|
33
|
-
const data = await this.setup();
|
|
34
|
-
return Object.keys(data);
|
|
35
|
-
}
|
|
36
|
-
async getChunk(buffer, opts) {
|
|
37
|
-
const { statusCallback = () => { } } = opts || {};
|
|
38
|
-
const alignments = {};
|
|
39
|
-
const data = [];
|
|
40
|
-
let a0;
|
|
41
|
-
let j = 0;
|
|
42
|
-
let b = 0;
|
|
43
|
-
parseLineByLine(buffer, line => {
|
|
44
|
-
if (j++ % 100 === 0) {
|
|
45
|
-
statusCallback(`Processing ${toP(b / 1_000_000)}/${toP(buffer.length / 1_000_000)}Mb`);
|
|
46
|
-
}
|
|
47
|
-
b += line.length;
|
|
48
|
-
if (line) {
|
|
49
|
-
const [lineData, rowInstructions] = line.split(' ; ');
|
|
50
|
-
if (rowInstructions) {
|
|
51
|
-
for (const ins of parseRowInstructions(rowInstructions)) {
|
|
52
|
-
if (ins.type === 'i') {
|
|
53
|
-
data.splice(ins.row, 0, ins);
|
|
54
|
-
if (!alignments[ins.asm]) {
|
|
55
|
-
alignments[ins.asm] = {
|
|
56
|
-
start: ins.start,
|
|
57
|
-
strand: ins.strand,
|
|
58
|
-
srcSize: ins.length,
|
|
59
|
-
chr: ins.ref,
|
|
60
|
-
data: '',
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const e = alignments[ins.asm];
|
|
64
|
-
e.data += ' '.repeat(Math.max(0, j - e.data.length - 1)); // catch it up
|
|
65
|
-
}
|
|
66
|
-
else if (ins.type === 's') {
|
|
67
|
-
if (!alignments[ins.asm]) {
|
|
68
|
-
alignments[ins.asm] = {
|
|
69
|
-
start: ins.start,
|
|
70
|
-
strand: ins.strand,
|
|
71
|
-
srcSize: ins.length,
|
|
72
|
-
chr: ins.ref,
|
|
73
|
-
data: '',
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
const e = alignments[ins.asm];
|
|
77
|
-
e.data += ' '.repeat(Math.max(0, j - e.data.length - 1)); // catch it up
|
|
78
|
-
data[ins.row] = ins;
|
|
79
|
-
}
|
|
80
|
-
else if (ins.type === 'd') {
|
|
81
|
-
data.splice(ins.row, 1);
|
|
82
|
-
}
|
|
83
|
-
// no gaps for now(?)
|
|
84
|
-
// else if (ins.type === 'g') {
|
|
85
|
-
// console.log('g??')
|
|
86
|
-
// } else if (ins.type === 'G') {
|
|
87
|
-
// console.log('G??')
|
|
88
|
-
// }
|
|
89
|
-
}
|
|
90
|
-
if (!a0) {
|
|
91
|
-
a0 = data[0];
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const lineLen = lineData.length;
|
|
95
|
-
for (let i = 0; i < lineLen; i++) {
|
|
96
|
-
const letter = lineData[i];
|
|
97
|
-
const r = data[i];
|
|
98
|
-
if (r) {
|
|
99
|
-
alignments[r.asm].data += letter;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
// not sure why but chr22_KI270731v1_random.taf.gz ends up here
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
if (a0) {
|
|
108
|
-
const row0 = alignments[a0.asm];
|
|
109
|
-
// see
|
|
110
|
-
// https://github.com/ComparativeGenomicsToolkit/taffy/blob/f5a5354/docs/taffy_utilities.md#referenced-based-maftaf-and-indexing
|
|
111
|
-
// for the significance of row[0]:
|
|
112
|
-
//
|
|
113
|
-
// "An anchor line in TAF is a column from which all sequence
|
|
114
|
-
// coordinates can be deduced without scanning backwards to previous
|
|
115
|
-
// lines "
|
|
116
|
-
return {
|
|
117
|
-
uniqueId: `${row0.start}-${row0.data.length}`,
|
|
118
|
-
start: row0.start,
|
|
119
|
-
end: row0.start + row0.data.length,
|
|
120
|
-
strand: row0.strand,
|
|
121
|
-
alignments,
|
|
122
|
-
seq: row0.data,
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
setupPre() {
|
|
128
|
-
if (!this.setupP) {
|
|
129
|
-
this.setupP = this.readTaiFile().catch((e) => {
|
|
130
|
-
this.setupP = undefined;
|
|
131
|
-
throw e;
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
return this.setupP;
|
|
135
|
-
}
|
|
136
|
-
setup(opts) {
|
|
137
|
-
const { statusCallback = () => { } } = opts || {};
|
|
138
|
-
return updateStatus('Downloading index', statusCallback, () => this.setupPre());
|
|
139
|
-
}
|
|
140
|
-
async readTaiFile() {
|
|
141
|
-
const text = await openLocation(this.getConf('taiLocation')).readFile('utf8');
|
|
142
|
-
const lines = text
|
|
143
|
-
.split('\n')
|
|
144
|
-
.map(f => f.trim())
|
|
145
|
-
.filter(line => !!line);
|
|
146
|
-
const entries = {};
|
|
147
|
-
let lastChr = '';
|
|
148
|
-
let lastChrStart = 0;
|
|
149
|
-
let lastRawVirtualOffset = 0;
|
|
150
|
-
for (const line of lines) {
|
|
151
|
-
const [chr, chrStart, virtualOffset] = line.split('\t');
|
|
152
|
-
const relativizedVirtualOffset = lastRawVirtualOffset + +virtualOffset;
|
|
153
|
-
const currChr = chr === '*' ? lastChr : chr.split('.').at(-1);
|
|
154
|
-
// bgzip TAF files store virtual offsets in plaintext in the TAI file
|
|
155
|
-
// these virtualoffsets are 64bit values, so the long library is needed
|
|
156
|
-
// to accurately do the bit manipulations needed
|
|
157
|
-
const x = Long.fromNumber(relativizedVirtualOffset);
|
|
158
|
-
const y = x.shiftRightUnsigned(16);
|
|
159
|
-
const z = x.and(0xffff);
|
|
160
|
-
const voff = new VirtualOffset(y.toNumber(), z.toNumber());
|
|
161
|
-
if (!entries[currChr]) {
|
|
162
|
-
entries[currChr] = [];
|
|
163
|
-
lastChr = '';
|
|
164
|
-
lastChrStart = 0;
|
|
165
|
-
lastRawVirtualOffset = 0;
|
|
166
|
-
}
|
|
167
|
-
const currStart = +chrStart + lastChrStart;
|
|
168
|
-
entries[currChr].push({
|
|
169
|
-
chrStart: currStart,
|
|
170
|
-
virtualOffset: voff,
|
|
171
|
-
});
|
|
172
|
-
lastChr = currChr;
|
|
173
|
-
lastChrStart = currStart;
|
|
174
|
-
lastRawVirtualOffset = relativizedVirtualOffset;
|
|
175
|
-
}
|
|
176
|
-
return entries;
|
|
177
|
-
}
|
|
178
|
-
getFeatures(query, opts) {
|
|
179
|
-
const { statusCallback = () => { } } = opts || {};
|
|
180
|
-
return ObservableCreate(async (observer) => {
|
|
181
|
-
try {
|
|
182
|
-
const byteRanges = await this.setup();
|
|
183
|
-
const feat = await updateStatus('Downloading alignments', statusCallback, () => this.getLines(query, byteRanges));
|
|
184
|
-
if (feat) {
|
|
185
|
-
observer.next(
|
|
186
|
-
// @ts-expect-error
|
|
187
|
-
new SimpleFeature({
|
|
188
|
-
...feat,
|
|
189
|
-
refName: query.refName,
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
console.error('no feature found');
|
|
194
|
-
}
|
|
195
|
-
statusCallback('');
|
|
196
|
-
observer.complete();
|
|
197
|
-
}
|
|
198
|
-
catch (e) {
|
|
199
|
-
observer.error(e);
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
async getSamples(_query) {
|
|
204
|
-
const nhLoc = this.getConf('nhLocation');
|
|
205
|
-
const nh = nhLoc.uri === '/path/to/my.nh'
|
|
206
|
-
? undefined
|
|
207
|
-
: await openLocation(nhLoc).readFile('utf8');
|
|
208
|
-
// TODO: we may need to resolve the exact set of rows in the visible region
|
|
209
|
-
// here
|
|
210
|
-
return {
|
|
211
|
-
samples: normalize(this.getConf('samples')),
|
|
212
|
-
tree: nh ? parseNewick(nh) : undefined,
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
// TODO: cache processed large chunks
|
|
216
|
-
async getLines(query, byteRanges) {
|
|
217
|
-
const records = byteRanges[query.refName];
|
|
218
|
-
if (records) {
|
|
219
|
-
let firstEntry;
|
|
220
|
-
let nextEntry;
|
|
221
|
-
// two pass:
|
|
222
|
-
// first pass: find first block greater than query start, then -1 from
|
|
223
|
-
// that
|
|
224
|
-
for (let i = 0; i < records.length; i++) {
|
|
225
|
-
if (records[i].chrStart >= query.start) {
|
|
226
|
-
firstEntry = records[Math.max(i - 1, 0)];
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
// second pass: find first block where query end less than record start,
|
|
231
|
-
// and +1 from that
|
|
232
|
-
for (let i = 0; i < records.length; i++) {
|
|
233
|
-
if (query.end <= records[i].chrStart) {
|
|
234
|
-
nextEntry = records[i + 1];
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
nextEntry = nextEntry ?? records.at(-1);
|
|
239
|
-
// we NEED at least a firstEntry (validate behavior?) because othrwise it fetches whole
|
|
240
|
-
// file whn you request e.g. out of range region (e.g. taf in chr22:1-100
|
|
241
|
-
// and you are at chr22:200-300)
|
|
242
|
-
if (firstEntry && nextEntry) {
|
|
243
|
-
return this.cache.get(`${JSON.stringify(nextEntry)}_${JSON.stringify(firstEntry)}`, {
|
|
244
|
-
nextEntry,
|
|
245
|
-
firstEntry,
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return undefined;
|
|
250
|
-
}
|
|
251
|
-
freeResources() { }
|
|
252
|
-
}
|
|
253
|
-
//# sourceMappingURL=BgzipTaffyAdapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BgzipTaffyAdapter.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/BgzipTaffyAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EACL,sBAAsB,GAEvB,MAAM,yCAAyC,CAAA;AAChD,OAAO,EAGL,aAAa,EACb,YAAY,GACb,MAAM,oBAAoB,CAAA;AAC3B,OAAO,QAAQ,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAC3D,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAcxC,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAEvC,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,sBAAsB;IAC5D,MAAM,CAAqB;IAE1B,KAAK,GAAG,IAAI,qBAAqB,CAAC;QACxC,KAAK,EAAE,IAAI,QAAQ,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QACpC,mBAAmB;QACnB,IAAI,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE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GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACxC,IAAI,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,CAAC,CAAE,CAAC,QAAQ,EAAE,CAAC;oBACtC,SAAS,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;oBAC1B,MAAK;gBACP,CAAC;YACH,CAAC;YAED,SAAS,GAAG,SAAS,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;YACvC,uFAAuF;YACvF,yEAAyE;YACzE,gCAAgC;YAChC,IAAI,UAAU,IAAI,SAAS,EAAE,CAAC;gBAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CACnB,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,EAC5D;oBACE,SAAS;oBACT,UAAU;iBACX,CACF,CAAA;YACH,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED,aAAa,KAAU,CAAC;CACzB"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
declare const configSchema: import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaType<{
|
|
2
|
-
/**
|
|
3
|
-
* #slot
|
|
4
|
-
*/
|
|
5
|
-
samples: {
|
|
6
|
-
type: string;
|
|
7
|
-
description: string;
|
|
8
|
-
defaultValue: never[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* #slot
|
|
12
|
-
*/
|
|
13
|
-
tafGzLocation: {
|
|
14
|
-
type: string;
|
|
15
|
-
description: string;
|
|
16
|
-
defaultValue: {
|
|
17
|
-
uri: string;
|
|
18
|
-
locationType: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* #slot
|
|
23
|
-
*/
|
|
24
|
-
taiLocation: {
|
|
25
|
-
type: string;
|
|
26
|
-
description: string;
|
|
27
|
-
defaultValue: {
|
|
28
|
-
uri: string;
|
|
29
|
-
locationType: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* #slot
|
|
34
|
-
*/
|
|
35
|
-
nhLocation: {
|
|
36
|
-
type: string;
|
|
37
|
-
description: string;
|
|
38
|
-
defaultValue: {
|
|
39
|
-
uri: string;
|
|
40
|
-
locationType: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}, import("@jbrowse/core/configuration/configurationSchema").ConfigurationSchemaOptions<undefined, undefined>>;
|
|
44
|
-
export default configSchema;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ConfigurationSchema } from '@jbrowse/core/configuration';
|
|
2
|
-
/**
|
|
3
|
-
* #config BgzipTaffyAdapter
|
|
4
|
-
* used to configure BgzipTaffy adapter
|
|
5
|
-
*/
|
|
6
|
-
function x() { } // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
7
|
-
const configSchema = ConfigurationSchema('BgzipTaffyAdapter', {
|
|
8
|
-
/**
|
|
9
|
-
* #slot
|
|
10
|
-
*/
|
|
11
|
-
samples: {
|
|
12
|
-
type: 'frozen',
|
|
13
|
-
description: 'string[] or {id:string,label:string,color?:string}[]',
|
|
14
|
-
defaultValue: [],
|
|
15
|
-
},
|
|
16
|
-
/**
|
|
17
|
-
* #slot
|
|
18
|
-
*/
|
|
19
|
-
tafGzLocation: {
|
|
20
|
-
type: 'fileLocation',
|
|
21
|
-
description: 'bgzip taffy file',
|
|
22
|
-
defaultValue: {
|
|
23
|
-
uri: '/path/to/my.taf',
|
|
24
|
-
locationType: 'UriLocation',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* #slot
|
|
29
|
-
*/
|
|
30
|
-
taiLocation: {
|
|
31
|
-
type: 'fileLocation',
|
|
32
|
-
description: 'taffy index',
|
|
33
|
-
defaultValue: {
|
|
34
|
-
uri: '/path/to/my.taf.gz.tai',
|
|
35
|
-
locationType: 'UriLocation',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
/**
|
|
39
|
-
* #slot
|
|
40
|
-
*/
|
|
41
|
-
nhLocation: {
|
|
42
|
-
type: 'fileLocation',
|
|
43
|
-
description: 'newick tree',
|
|
44
|
-
defaultValue: {
|
|
45
|
-
uri: '/path/to/my.nh',
|
|
46
|
-
locationType: 'UriLocation',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}, {
|
|
50
|
-
explicitlyTyped: true,
|
|
51
|
-
});
|
|
52
|
-
export default configSchema;
|
|
53
|
-
//# sourceMappingURL=configSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configSchema.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/configSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE;;;GAGG;AACH,SAAS,CAAC,KAAI,CAAC,CAAC,wDAAwD;AAExE,MAAM,YAAY,GAAG,mBAAmB,CACtC,mBAAmB,EACnB;IACE;;OAEG;IACH,OAAO,EAAE;QACP,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sDAAsD;QACnE,YAAY,EAAE,EAAE;KACjB;IACD;;OAEG;IACH,aAAa,EAAE;QACb,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,kBAAkB;QAC/B,YAAY,EAAE;YACZ,GAAG,EAAE,iBAAiB;YACtB,YAAY,EAAE,aAAa;SAC5B;KACF;IACD;;OAEG;IACH,WAAW,EAAE;QACX,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE;YACZ,GAAG,EAAE,wBAAwB;YAC7B,YAAY,EAAE,aAAa;SAC5B;KACF;IACD;;OAEG;IACH,UAAU,EAAE;QACV,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,aAAa;QAC1B,YAAY,EAAE;YACZ,GAAG,EAAE,gBAAgB;YACrB,YAAY,EAAE,aAAa;SAC5B;KACF;CACF,EACD;IACE,eAAe,EAAE,IAAI;CACtB,CACF,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AdapterType } from '@jbrowse/core/pluggableElementTypes';
|
|
2
|
-
import BgzipTaffyAdapter from './BgzipTaffyAdapter';
|
|
3
|
-
import configSchema from './configSchema';
|
|
4
|
-
export default function BgzipTaffyAdapterF(pluginManager) {
|
|
5
|
-
return pluginManager.addAdapterType(() => new AdapterType({
|
|
6
|
-
name: 'BgzipTaffyAdapter',
|
|
7
|
-
AdapterClass: BgzipTaffyAdapter,
|
|
8
|
-
configSchema,
|
|
9
|
-
}));
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAA;AAEjE,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AACnD,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,aAA4B;IACrE,OAAO,aAAa,CAAC,cAAc,CACjC,GAAG,EAAE,CACH,IAAI,WAAW,CAAC;QACd,IAAI,EAAE,mBAAmB;QACzB,YAAY,EAAE,iBAAiB;QAC/B,YAAY;KACb,CAAC,CACL,CAAA;AACH,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
interface RowInsert {
|
|
2
|
-
type: 'i';
|
|
3
|
-
row: number;
|
|
4
|
-
asm: string;
|
|
5
|
-
ref: string;
|
|
6
|
-
start: number;
|
|
7
|
-
strand: number;
|
|
8
|
-
length: number;
|
|
9
|
-
}
|
|
10
|
-
interface RowSubstitute {
|
|
11
|
-
type: 's';
|
|
12
|
-
row: number;
|
|
13
|
-
asm: string;
|
|
14
|
-
ref: string;
|
|
15
|
-
start: number;
|
|
16
|
-
strand: number;
|
|
17
|
-
length: number;
|
|
18
|
-
}
|
|
19
|
-
interface RowDelete {
|
|
20
|
-
type: 'd';
|
|
21
|
-
row: number;
|
|
22
|
-
}
|
|
23
|
-
interface RowGap {
|
|
24
|
-
type: 'g';
|
|
25
|
-
row: number;
|
|
26
|
-
gapLen: number;
|
|
27
|
-
}
|
|
28
|
-
interface RowGapSubstring {
|
|
29
|
-
type: 'G';
|
|
30
|
-
row: number;
|
|
31
|
-
gapSubstring: string;
|
|
32
|
-
}
|
|
33
|
-
type RowInstruction = RowInsert | RowDelete | RowGap | RowGapSubstring | RowSubstitute;
|
|
34
|
-
export declare function parseRowInstructions(meta: string): RowInstruction[];
|
|
35
|
-
export {};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export function parseRowInstructions(meta) {
|
|
2
|
-
const ret = meta.split(' ');
|
|
3
|
-
const rows = [];
|
|
4
|
-
for (let i = 0; i < ret.length;) {
|
|
5
|
-
const type = ret[i++];
|
|
6
|
-
if (type === 'i') {
|
|
7
|
-
const row = +ret[i++];
|
|
8
|
-
const [asm, ref] = ret[i++].split('.');
|
|
9
|
-
rows.push({
|
|
10
|
-
type,
|
|
11
|
-
row,
|
|
12
|
-
asm: asm,
|
|
13
|
-
ref: ref,
|
|
14
|
-
start: +ret[i++],
|
|
15
|
-
strand: ret[i++] === '-' ? -1 : 1,
|
|
16
|
-
length: +ret[i++],
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
if (type === 's') {
|
|
20
|
-
const row = +ret[i++];
|
|
21
|
-
const [asm, ref] = ret[i++].split('.');
|
|
22
|
-
rows.push({
|
|
23
|
-
type,
|
|
24
|
-
row,
|
|
25
|
-
asm: asm,
|
|
26
|
-
ref: ref,
|
|
27
|
-
start: +ret[i++],
|
|
28
|
-
strand: ret[i++] === '-' ? -1 : 1,
|
|
29
|
-
length: +ret[i++],
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
else if (type === 'd') {
|
|
33
|
-
rows.push({
|
|
34
|
-
type,
|
|
35
|
-
row: +ret[i++],
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
else if (type === 'g') {
|
|
39
|
-
rows.push({
|
|
40
|
-
type,
|
|
41
|
-
row: +ret[i++],
|
|
42
|
-
gapLen: +ret[i++],
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
else if (type === 'G') {
|
|
46
|
-
rows.push({
|
|
47
|
-
type,
|
|
48
|
-
row: +ret[i++],
|
|
49
|
-
gapSubstring: ret[i++],
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return rows;
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=rowInstructions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rowInstructions.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/rowInstructions.ts"],"names":[],"mappings":"AAuCA,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC3B,MAAM,IAAI,GAAG,EAAsB,CAAA;IAEnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,GAAI,CAAC;QACjC,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAA;QACrB,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAE,CAAA;YACtB,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YACvC,IAAI,CAAC,IAAI,CAAC;gBACR,IAAI;gBACJ,GAAG;gBACH,GAAG,EAAE,GAAI;gBACT,GAAG,EAAE,GAAI;gBACT,KAAK,EA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KAAK,GAAG,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC;gBACR,IAAI;gBACJ,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAE;gBACf,YAAY,EAAE,GAAG,CAAC,CAAC,EAAE,CAAE;aACxB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import VirtualOffset from './virtualOffset';
|
|
2
|
-
export interface OrganismRecord {
|
|
3
|
-
chr: string;
|
|
4
|
-
start: number;
|
|
5
|
-
srcSize: number;
|
|
6
|
-
strand: number;
|
|
7
|
-
data: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ByteRange {
|
|
10
|
-
chrStart: number;
|
|
11
|
-
virtualOffset: VirtualOffset;
|
|
12
|
-
}
|
|
13
|
-
export type IndexData = Record<string, ByteRange[]>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function parseLineByLine<T>(buffer: Uint8Array, cb: (line: string) => T | undefined): T[];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export function parseLineByLine(buffer, cb) {
|
|
2
|
-
let blockStart = 0;
|
|
3
|
-
const entries = [];
|
|
4
|
-
const decoder = new TextDecoder('utf8');
|
|
5
|
-
while (blockStart < buffer.length) {
|
|
6
|
-
const n = buffer.indexOf(10, blockStart);
|
|
7
|
-
if (n === -1) {
|
|
8
|
-
break;
|
|
9
|
-
}
|
|
10
|
-
const b = buffer.subarray(blockStart, n);
|
|
11
|
-
const line = decoder.decode(b).trim();
|
|
12
|
-
if (line) {
|
|
13
|
-
const entry = cb(line);
|
|
14
|
-
if (entry) {
|
|
15
|
-
entries.push(entry);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
blockStart = n + 1;
|
|
19
|
-
}
|
|
20
|
-
return entries;
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/BgzipTaffyAdapter/util.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAC7B,MAAkB,EAClB,EAAmC;IAEnC,IAAI,UAAU,GAAG,CAAC,CAAA;IAClB,MAAM,OAAO,GAAQ,EAAE,CAAA;IACvB,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;IACvC,OAAO,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QACxC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACb,MAAK;QACP,CAAC;QACD,MAAM,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;QACxC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;QACrC,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;YACtB,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACrB,CAAC;QACH,CAAC;QAED,UAAU,GAAG,CAAC,GAAG,CAAC,CAAA;IACpB,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export default class VirtualOffset {
|
|
2
|
-
blockPosition: number;
|
|
3
|
-
dataPosition: number;
|
|
4
|
-
constructor(blockPosition: number, dataPosition: number);
|
|
5
|
-
toString(): string;
|
|
6
|
-
compareTo(b: VirtualOffset): number;
|
|
7
|
-
}
|
|
8
|
-
export declare function fromBytes(bytes: Uint8Array, offset?: number): VirtualOffset;
|