jbrowse-plugin-tview 2.0.4

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.
Files changed (81) hide show
  1. package/README.md +59 -0
  2. package/dist/AddHighlightModel/GenomeMouseoverHighlight.d.ts +6 -0
  3. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js +23 -0
  4. package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -0
  5. package/dist/AddHighlightModel/Highlight.d.ts +10 -0
  6. package/dist/AddHighlightModel/Highlight.js +15 -0
  7. package/dist/AddHighlightModel/Highlight.js.map +1 -0
  8. package/dist/AddHighlightModel/HighlightComponents.d.ts +7 -0
  9. package/dist/AddHighlightModel/HighlightComponents.js +11 -0
  10. package/dist/AddHighlightModel/HighlightComponents.js.map +1 -0
  11. package/dist/AddHighlightModel/MsaToGenomeHighlight.d.ts +6 -0
  12. package/dist/AddHighlightModel/MsaToGenomeHighlight.js +15 -0
  13. package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +1 -0
  14. package/dist/AddHighlightModel/index.d.ts +2 -0
  15. package/dist/AddHighlightModel/index.js +19 -0
  16. package/dist/AddHighlightModel/index.js.map +1 -0
  17. package/dist/AddHighlightModel/util.d.ts +9 -0
  18. package/dist/AddHighlightModel/util.js +14 -0
  19. package/dist/AddHighlightModel/util.js.map +1 -0
  20. package/dist/LaunchTView/align.d.ts +20 -0
  21. package/dist/LaunchTView/align.js +121 -0
  22. package/dist/LaunchTView/align.js.map +1 -0
  23. package/dist/LaunchTView/components/LaunchTViewDialog.d.ts +6 -0
  24. package/dist/LaunchTView/components/LaunchTViewDialog.js +87 -0
  25. package/dist/LaunchTView/components/LaunchTViewDialog.js.map +1 -0
  26. package/dist/LaunchTView/fetchTviewPlan.d.ts +51 -0
  27. package/dist/LaunchTView/fetchTviewPlan.js +43 -0
  28. package/dist/LaunchTView/fetchTviewPlan.js.map +1 -0
  29. package/dist/LaunchTView/index.d.ts +2 -0
  30. package/dist/LaunchTView/index.js +41 -0
  31. package/dist/LaunchTView/index.js.map +1 -0
  32. package/dist/LaunchTView/limits.d.ts +2 -0
  33. package/dist/LaunchTView/limits.js +8 -0
  34. package/dist/LaunchTView/limits.js.map +1 -0
  35. package/dist/LaunchTView/tview.d.ts +95 -0
  36. package/dist/LaunchTView/tview.js +191 -0
  37. package/dist/LaunchTView/tview.js.map +1 -0
  38. package/dist/LaunchTView/useTviewMsa.d.ts +14 -0
  39. package/dist/LaunchTView/useTviewMsa.js +20 -0
  40. package/dist/LaunchTView/useTviewMsa.js.map +1 -0
  41. package/dist/TViewPanel/components/TViewPanel.d.ts +6 -0
  42. package/dist/TViewPanel/components/TViewPanel.js +11 -0
  43. package/dist/TViewPanel/components/TViewPanel.js.map +1 -0
  44. package/dist/TViewPanel/coords.d.ts +17 -0
  45. package/dist/TViewPanel/coords.js +36 -0
  46. package/dist/TViewPanel/coords.js.map +1 -0
  47. package/dist/TViewPanel/index.d.ts +2 -0
  48. package/dist/TViewPanel/index.js +15 -0
  49. package/dist/TViewPanel/index.js.map +1 -0
  50. package/dist/TViewPanel/model.d.ts +1028 -0
  51. package/dist/TViewPanel/model.js +246 -0
  52. package/dist/TViewPanel/model.js.map +1 -0
  53. package/dist/config.json +8 -0
  54. package/dist/index.d.ts +8 -0
  55. package/dist/index.js +19 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/jbrowse-plugin-tview.umd.production.min.js +104 -0
  58. package/dist/jbrowse-plugin-tview.umd.production.min.js.map +7 -0
  59. package/dist/version.d.ts +1 -0
  60. package/dist/version.js +2 -0
  61. package/dist/version.js.map +1 -0
  62. package/package.json +76 -0
  63. package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +46 -0
  64. package/src/AddHighlightModel/Highlight.tsx +35 -0
  65. package/src/AddHighlightModel/HighlightComponents.tsx +25 -0
  66. package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +31 -0
  67. package/src/AddHighlightModel/index.tsx +28 -0
  68. package/src/AddHighlightModel/util.ts +14 -0
  69. package/src/LaunchTView/align.ts +154 -0
  70. package/src/LaunchTView/components/LaunchTViewDialog.tsx +129 -0
  71. package/src/LaunchTView/fetchTviewPlan.ts +95 -0
  72. package/src/LaunchTView/index.ts +53 -0
  73. package/src/LaunchTView/limits.ts +8 -0
  74. package/src/LaunchTView/tview.ts +272 -0
  75. package/src/LaunchTView/useTviewMsa.ts +36 -0
  76. package/src/TViewPanel/components/TViewPanel.tsx +20 -0
  77. package/src/TViewPanel/coords.ts +43 -0
  78. package/src/TViewPanel/index.ts +20 -0
  79. package/src/TViewPanel/model.ts +289 -0
  80. package/src/index.ts +21 -0
  81. package/src/version.ts +1 -0
@@ -0,0 +1,41 @@
1
+ import { getContainingTrack, getSession } from '@jbrowse/core/util';
2
+ import AddIcon from '@mui/icons-material/Add';
3
+ import LaunchTViewDialog from './components/LaunchTViewDialog';
4
+ function isDisplay(elt) {
5
+ return elt.name === 'LinearAlignmentsDisplay';
6
+ }
7
+ function extendStateModel(stateModel) {
8
+ return stateModel.views((self) => {
9
+ const superTrackMenuItems = self.trackMenuItems;
10
+ return {
11
+ trackMenuItems() {
12
+ return [
13
+ ...superTrackMenuItems(),
14
+ {
15
+ label: 'Launch tview for visible region',
16
+ icon: AddIcon,
17
+ onClick: () => {
18
+ const track = getContainingTrack(self);
19
+ getSession(track).queueDialog(handleClose => [
20
+ LaunchTViewDialog,
21
+ {
22
+ model: track,
23
+ handleClose,
24
+ },
25
+ ]);
26
+ },
27
+ },
28
+ ];
29
+ },
30
+ };
31
+ });
32
+ }
33
+ export default function LaunchTViewF(pluginManager) {
34
+ pluginManager.addToExtensionPoint('Core-extendPluggableElement', (elt) => {
35
+ if (isDisplay(elt)) {
36
+ elt.stateModel = extendStateModel(elt.stateModel);
37
+ }
38
+ return elt;
39
+ });
40
+ }
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/LaunchTView/index.ts"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MAX_CELLS = 25000000;
@@ -0,0 +1,8 @@
1
+ // a tview row is one column per base, so a wide region produces an alignment
2
+ // too large to be useful (and slow to lay out)
3
+ export const MAX_BP = 20_000;
4
+ // every read gets its own full-width row, so depth multiplies width. The
5
+ // alignment is held as one string for the life of the view, and MAX_BP alone
6
+ // does not bound it: 8k reads over 20kb is ~160M cells.
7
+ export const MAX_CELLS = 25_000_000;
8
+ //# sourceMappingURL=limits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/LaunchTView/limits.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,+CAA+C;AAC/C,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAA;AAE5B,yEAAyE;AACzE,6EAA6E;AAC7E,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAA"}
@@ -0,0 +1,95 @@
1
+ /** the subset of an @jbrowse/core Feature that the layout reads */
2
+ export interface AlignmentFeature {
3
+ get: (key: string) => any;
4
+ }
5
+ export interface ReadLayout {
6
+ name: string;
7
+ start: number;
8
+ /** one char per reference position consumed: the aligned base, or a gap */
9
+ refChars: string;
10
+ /** reference position -> bases inserted immediately before that position */
11
+ insertions: Map<number, string>;
12
+ }
13
+ export declare function parseCigar(cigar: string): string[];
14
+ export declare function parseRead(feature: AlignmentFeature, name: string): ReadLayout;
15
+ /**
16
+ * Reads are fetched by overlap, so they carry insertions on either side of the
17
+ * region. Those get no columns and are never rendered, so dropping them keeps
18
+ * the pairwise alignment below off the wasted sites entirely.
19
+ */
20
+ export declare function clipInsertions(reads: ReadLayout[], start: number, end: number): {
21
+ insertions: Map<number, string>;
22
+ name: string;
23
+ start: number;
24
+ /** one char per reference position consumed: the aligned base, or a gap */
25
+ refChars: string;
26
+ }[];
27
+ /**
28
+ * Mutually aligns the sequences inserted at each reference position, so reads
29
+ * sharing an insertion event line up inside it. Sites the aligner declines are
30
+ * returned unchanged and stay left-justified.
31
+ */
32
+ export declare function alignInsertionColumns(reads: ReadLayout[]): ReadLayout[];
33
+ /** widest insertion any read has at each reference position (sparse) */
34
+ export declare function maxInsertionWidths(reads: ReadLayout[]): Map<number, number>;
35
+ export interface ColumnLayout {
36
+ start: number;
37
+ end: number;
38
+ insWidths: Map<number, number>;
39
+ /**
40
+ * column index at which each reference position's columns begin, for
41
+ * start..end inclusive
42
+ */
43
+ offsets: number[];
44
+ totalColumns: number;
45
+ }
46
+ /**
47
+ * Each reference position contributes its insertion columns (widest across all
48
+ * reads) followed by one reference column, so every row comes out the same
49
+ * length and stays aligned.
50
+ */
51
+ export declare function buildColumnLayout(start: number, end: number, insWidths: Map<number, number>): ColumnLayout;
52
+ /**
53
+ * Lays a single read out across the whole region. Reads are typically a tiny
54
+ * fraction of the region, so the columns on either side of the read are filled
55
+ * in one shot rather than walked position by position.
56
+ */
57
+ export declare function renderRow(read: ReadLayout, layout: ColumnLayout): string;
58
+ export interface TviewPlan {
59
+ reads: ReadLayout[];
60
+ layout: ColumnLayout;
61
+ insertionWidths: [number, number][];
62
+ region: {
63
+ refName: string;
64
+ start: number;
65
+ end: number;
66
+ };
67
+ /** rows x columns, i.e. how big the alignment renderTviewMsa builds will be */
68
+ cellCount: number;
69
+ }
70
+ /**
71
+ * Works out the shape of the alignment without materializing it. Everything
72
+ * here is proportional to the sequence data, unlike the render, which is
73
+ * proportional to rows x columns and can be far larger.
74
+ */
75
+ export declare function planTviewMsa({ features, refName, start, end, }: {
76
+ features: AlignmentFeature[];
77
+ refName: string;
78
+ start: number;
79
+ end: number;
80
+ }): TviewPlan;
81
+ export declare function renderTviewMsa({ reads, layout }: TviewPlan): string;
82
+ export declare function buildTviewMsa(args: {
83
+ features: AlignmentFeature[];
84
+ refName: string;
85
+ start: number;
86
+ end: number;
87
+ }): {
88
+ msa: string;
89
+ insertionWidths: [number, number][];
90
+ region: {
91
+ refName: string;
92
+ start: number;
93
+ end: number;
94
+ };
95
+ };
@@ -0,0 +1,191 @@
1
+ import { alignInsertions } from './align';
2
+ /**
3
+ * Only '-' and '.' are treated as gaps by react-msaview (anything else counts
4
+ * as a base in the conservation track and column stats), so the two of them
5
+ * carry the whole vocabulary for "no base here". They are split by meaning:
6
+ *
7
+ * - SPANNED_GAP: the read covers this reference position but aligns no base to
8
+ * it, i.e. a deletion, or padding in an insertion column
9
+ * - ABSENT: the read is not here at all, i.e. outside its bounds, or skipping
10
+ * over the position through an N (an intron, not a deleted allele)
11
+ */
12
+ const SPANNED_GAP = '-';
13
+ const ABSENT = '.';
14
+ const cigarRegex = /([MIDNSHPX=])/;
15
+ const byStart = (a, b) => a.start - b.start;
16
+ export function parseCigar(cigar) {
17
+ return cigar.split(cigarRegex).slice(0, -1);
18
+ }
19
+ export function parseRead(feature, name) {
20
+ const seq = feature.get('seq');
21
+ const ops = parseCigar(feature.get('CIGAR'));
22
+ const start = feature.get('start');
23
+ const insertions = new Map();
24
+ let refChars = '';
25
+ let seqOffset = 0;
26
+ for (let i = 0; i < ops.length; i += 2) {
27
+ const len = +ops[i];
28
+ const op = ops[i + 1];
29
+ if (op === 'S') {
30
+ seqOffset += len;
31
+ }
32
+ else if (op === 'I') {
33
+ // consecutive I ops (e.g. 3M2I3I3M) land on the same reference position
34
+ const pos = start + refChars.length;
35
+ const prev = insertions.get(pos) ?? '';
36
+ insertions.set(pos, prev + seq.slice(seqOffset, seqOffset + len));
37
+ seqOffset += len;
38
+ }
39
+ else if (op === 'D') {
40
+ refChars += SPANNED_GAP.repeat(len);
41
+ }
42
+ else if (op === 'N') {
43
+ refChars += ABSENT.repeat(len);
44
+ }
45
+ else if (op === 'M' || op === 'X' || op === '=') {
46
+ refChars += seq.slice(seqOffset, seqOffset + len);
47
+ seqOffset += len;
48
+ }
49
+ // H and P consume neither the read sequence nor the reference
50
+ }
51
+ return { name, start, refChars, insertions };
52
+ }
53
+ /**
54
+ * Reads are fetched by overlap, so they carry insertions on either side of the
55
+ * region. Those get no columns and are never rendered, so dropping them keeps
56
+ * the pairwise alignment below off the wasted sites entirely.
57
+ */
58
+ export function clipInsertions(reads, start, end) {
59
+ return reads.map(read => ({
60
+ ...read,
61
+ insertions: new Map([...read.insertions].filter(([pos]) => pos >= start && pos < end)),
62
+ }));
63
+ }
64
+ /**
65
+ * Mutually aligns the sequences inserted at each reference position, so reads
66
+ * sharing an insertion event line up inside it. Sites the aligner declines are
67
+ * returned unchanged and stay left-justified.
68
+ */
69
+ export function alignInsertionColumns(reads) {
70
+ const byPos = new Map();
71
+ for (const read of reads) {
72
+ for (const [pos, ins] of read.insertions) {
73
+ const seqs = byPos.get(pos);
74
+ if (seqs) {
75
+ seqs.push(ins);
76
+ }
77
+ else {
78
+ byPos.set(pos, [ins]);
79
+ }
80
+ }
81
+ }
82
+ const gapped = new Map([...byPos].map(([pos, seqs]) => [pos, alignInsertions(seqs)]));
83
+ return reads.map(read => ({
84
+ ...read,
85
+ insertions: new Map([...read.insertions].map(([pos, ins]) => [
86
+ pos,
87
+ gapped.get(pos)?.get(ins) ?? ins,
88
+ ])),
89
+ }));
90
+ }
91
+ /** widest insertion any read has at each reference position (sparse) */
92
+ export function maxInsertionWidths(reads) {
93
+ const ret = new Map();
94
+ for (const read of reads) {
95
+ for (const [pos, ins] of read.insertions) {
96
+ ret.set(pos, Math.max(ret.get(pos) ?? 0, ins.length));
97
+ }
98
+ }
99
+ return ret;
100
+ }
101
+ /**
102
+ * Each reference position contributes its insertion columns (widest across all
103
+ * reads) followed by one reference column, so every row comes out the same
104
+ * length and stays aligned.
105
+ */
106
+ export function buildColumnLayout(start, end, insWidths) {
107
+ const offsets = [0];
108
+ let col = 0;
109
+ for (let pos = start; pos < end; pos++) {
110
+ col += (insWidths.get(pos) ?? 0) + 1;
111
+ offsets.push(col);
112
+ }
113
+ return { start, end, insWidths, offsets, totalColumns: col };
114
+ }
115
+ /**
116
+ * Lays a single read out across the whole region. Reads are typically a tiny
117
+ * fraction of the region, so the columns on either side of the read are filled
118
+ * in one shot rather than walked position by position.
119
+ */
120
+ export function renderRow(read, layout) {
121
+ const { start, end, insWidths, offsets, totalColumns } = layout;
122
+ // a trailing insertion is keyed one past the last position the read spans
123
+ const from = Math.max(start, read.start);
124
+ const to = Math.min(end, read.start + read.refChars.length + 1);
125
+ let ret;
126
+ if (to > from) {
127
+ ret = ABSENT.repeat(offsets[from - start]);
128
+ for (let pos = from; pos < to; pos++) {
129
+ const idx = pos - read.start;
130
+ const spanned = idx >= 0 && idx < read.refChars.length;
131
+ const refChar = spanned ? read.refChars[idx] : ABSENT;
132
+ const width = insWidths.get(pos) ?? 0;
133
+ if (width) {
134
+ // a read that is not really here pads the insertion the same way it
135
+ // pads the reference column, so an intron reads as one absence
136
+ const pad = refChar === ABSENT ? ABSENT : SPANNED_GAP;
137
+ const ins = read.insertions.get(pos) ?? '';
138
+ ret += ins + pad.repeat(width - ins.length);
139
+ }
140
+ ret += refChar;
141
+ }
142
+ ret += ABSENT.repeat(totalColumns - offsets[to - start]);
143
+ }
144
+ else {
145
+ ret = ABSENT.repeat(totalColumns);
146
+ }
147
+ return ret;
148
+ }
149
+ function mateSuffix(flags) {
150
+ return flags === undefined || !(flags & 1) ? '' : flags & 64 ? '/1' : '/2';
151
+ }
152
+ /** MSA rows are keyed by name, so mates and duplicate names need disambiguating */
153
+ function getReadNames(features) {
154
+ const counts = new Map();
155
+ return features.map(f => {
156
+ const base = `${f.get('name')}${mateSuffix(f.get('flags'))}`;
157
+ const n = (counts.get(base) ?? 0) + 1;
158
+ counts.set(base, n);
159
+ return n === 1 ? base : `${base}_${n}`;
160
+ });
161
+ }
162
+ /**
163
+ * Works out the shape of the alignment without materializing it. Everything
164
+ * here is proportional to the sequence data, unlike the render, which is
165
+ * proportional to rows x columns and can be far larger.
166
+ */
167
+ export function planTviewMsa({ features, refName, start, end, }) {
168
+ const names = getReadNames(features);
169
+ const reads = alignInsertionColumns(clipInsertions(features.map((f, i) => parseRead(f, names[i])).sort(byStart), start, end));
170
+ const insWidths = maxInsertionWidths(reads);
171
+ const layout = buildColumnLayout(start, end, insWidths);
172
+ return {
173
+ reads,
174
+ layout,
175
+ insertionWidths: [...insWidths.entries()].sort((a, b) => a[0] - b[0]),
176
+ region: { refName, start, end },
177
+ cellCount: reads.length * layout.totalColumns,
178
+ };
179
+ }
180
+ export function renderTviewMsa({ reads, layout }) {
181
+ return reads.map(r => `>${r.name}\n${renderRow(r, layout)}\n`).join('');
182
+ }
183
+ export function buildTviewMsa(args) {
184
+ const plan = planTviewMsa(args);
185
+ return {
186
+ msa: renderTviewMsa(plan),
187
+ insertionWidths: plan.insertionWidths,
188
+ region: plan.region,
189
+ };
190
+ }
191
+ //# sourceMappingURL=tview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tview.js","sourceRoot":"","sources":["../../src/LaunchTView/tview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAOzC;;;;;;;;;GASG;AACH,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,MAAM,GAAG,GAAG,CAAA;AAWlB,MAAM,UAAU,GAAG,eAAe,CAAA;AAElC,MAAM,OAAO,GAAG,CAAC,CAAa,EAAE,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAA;AAEnE,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC7C,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,OAAyB,EAAE,IAAY;IAC/D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAW,CAAA;IACxC,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAW,CAAC,CAAA;IACtD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,UAAU,GAAG,IA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,UAAU,aAAa,CAAC,IAK7B;IACC,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;IAC/B,OAAO;QACL,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC;QACzB,eAAe,EAAE,IAAI,CAAC,eAAe;QACrC,MAAM,EAAE,IAAI,CAAC,MAAM;KACpB,CAAA;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { FetchRegion } from './fetchTviewPlan';
2
+ import type { AbstractTrackModel } from '@jbrowse/core/util';
3
+ export declare function useTviewMsa({ model, region, }: {
4
+ model: AbstractTrackModel;
5
+ region?: FetchRegion;
6
+ }): import("swr").SWRResponse<{
7
+ plan: import("./tview").TviewPlan;
8
+ rowCount: number;
9
+ }, any, {
10
+ revalidateOnFocus: boolean;
11
+ revalidateOnReconnect: boolean;
12
+ revalidateIfStale: boolean;
13
+ shouldRetryOnError: boolean;
14
+ }>;
@@ -0,0 +1,20 @@
1
+ import { assembleLocString, getSession } from '@jbrowse/core/util';
2
+ import useSWR from 'swr';
3
+ import { fetchTviewPlan, sourceFromTrack } from './fetchTviewPlan';
4
+ const staticSwrConfig = {
5
+ revalidateOnFocus: false,
6
+ revalidateOnReconnect: false,
7
+ revalidateIfStale: false,
8
+ shouldRetryOnError: false,
9
+ };
10
+ export function useTviewMsa({ model, region, }) {
11
+ // the key carries the region so the fetcher receives it already narrowed
12
+ return useSWR(region
13
+ ? { tag: 'tview', loc: assembleLocString(region), id: model.id, region }
14
+ : null, ({ region }) => fetchTviewPlan({
15
+ session: getSession(model),
16
+ source: sourceFromTrack(model),
17
+ region,
18
+ }), staticSwrConfig);
19
+ }
20
+ //# sourceMappingURL=useTviewMsa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTviewMsa.js","sourceRoot":"","sources":["../../src/LaunchTView/useTviewMsa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAClE,OAAO,MAAM,MAAM,KAAK,CAAA;AAExB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAKlE,MAAM,eAAe,GAAG;IACtB,iBAAiB,EAAE,KAAK;IACxB,qBAAqB,EAAE,KAAK;IAC5B,iBAAiB,EAAE,KAAK;IACxB,kBAAkB,EAAE,KAAK;CAC1B,CAAA;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,MAAM,GAIP;IACC,yEAAyE;IACzE,OAAO,MAAM,CACX,MAAM;QACJ,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE;QACxE,CAAC,CAAC,IAAI,EACR,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CACb,cAAc,CAAC;QACb,OAAO,EAAE,UAAU,CAAC,KAAK,CAAC;QAC1B,MAAM,EAAE,eAAe,CAAC,KAAK,CAAC;QAC9B,MAAM;KACP,CAAC,EACJ,eAAe,CAChB,CAAA;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { JBrowsePluginTViewModel } from '../model';
3
+ declare const TViewPanel: ({ model, }: {
4
+ model: JBrowsePluginTViewModel;
5
+ }) => React.JSX.Element;
6
+ export default TViewPanel;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { observer } from 'mobx-react';
3
+ import { MSAView } from 'react-msaview';
4
+ const TViewPanel = observer(function TViewPanel2({ model, }) {
5
+ // react-msaview types its model prop with type: 'MsaView' baked in, but a
6
+ // JBrowse view model's `type` must equal its registered view type name. That
7
+ // literal is the only difference, and the MSA renderer never reads it.
8
+ return React.createElement(MSAView, { model: model });
9
+ });
10
+ export default TViewPanel;
11
+ //# sourceMappingURL=TViewPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TViewPanel.js","sourceRoot":"","sources":["../../../src/TViewPanel/components/TViewPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAKvC,MAAM,UAAU,GAAG,QAAQ,CAAC,SAAS,WAAW,CAAC,EAC/C,KAAK,GAGN;IACC,0EAA0E;IAC1E,6EAA6E;IAC7E,uEAAuE;IACvE,OAAO,oBAAC,OAAO,IAAC,KAAK,EAAE,KAAgC,GAAI,CAAA;AAC7D,CAAC,CAAC,CAAA;AAEF,eAAe,UAAU,CAAA"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Inverse of the column layout built by buildTviewMsa: the alignment emits each
3
+ * reference position's insertion columns followed by its reference column, so a
4
+ * flat column -> reference position array recovers the mapping.
5
+ */
6
+ export declare function buildColumnToRefPos({ start, end, insertionWidths, }: {
7
+ start: number;
8
+ end: number;
9
+ insertionWidths: [number, number][];
10
+ }): number[];
11
+ /**
12
+ * react-msaview drops all-gap columns from the rendering when hideGaps is
13
+ * effective (a row is collapsed, or allowedGappyness < 100), so the column
14
+ * index its mouse handlers report counts only visible columns. Expand it back
15
+ * to an index into the full alignment. `blanks` is ascending.
16
+ */
17
+ export declare function renderedColToMsaCol(blanks: number[], col: number): number;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Inverse of the column layout built by buildTviewMsa: the alignment emits each
3
+ * reference position's insertion columns followed by its reference column, so a
4
+ * flat column -> reference position array recovers the mapping.
5
+ */
6
+ export function buildColumnToRefPos({ start, end, insertionWidths, }) {
7
+ const widths = new Map(insertionWidths);
8
+ const ret = [];
9
+ for (let pos = start; pos < end; pos++) {
10
+ const width = widths.get(pos) ?? 0;
11
+ for (let i = 0; i < width; i++) {
12
+ ret.push(pos);
13
+ }
14
+ ret.push(pos);
15
+ }
16
+ return ret;
17
+ }
18
+ /**
19
+ * react-msaview drops all-gap columns from the rendering when hideGaps is
20
+ * effective (a row is collapsed, or allowedGappyness < 100), so the column
21
+ * index its mouse handlers report counts only visible columns. Expand it back
22
+ * to an index into the full alignment. `blanks` is ascending.
23
+ */
24
+ export function renderedColToMsaCol(blanks, col) {
25
+ let ret = col;
26
+ for (const blank of blanks) {
27
+ if (blank <= ret) {
28
+ ret++;
29
+ }
30
+ else {
31
+ break;
32
+ }
33
+ }
34
+ return ret;
35
+ }
36
+ //# sourceMappingURL=coords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coords.js","sourceRoot":"","sources":["../../src/TViewPanel/coords.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAClC,KAAK,EACL,GAAG,EACH,eAAe,GAKhB;IACC,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,eAAe,CAAC,CAAA;IACvC,MAAM,GAAG,GAAa,EAAE,CAAA;IACxB,KAAK,IAAI,GAAG,GAAG,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACf,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACf,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAgB,EAAE,GAAW;IAC/D,IAAI,GAAG,GAAG,GAAG,CAAA;IACb,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,IAAI,GAAG,EAAE,CAAC;YACjB,GAAG,EAAE,CAAA;QACP,CAAC;aAAM,CAAC;YACN,MAAK;QACP,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type PluginManager from '@jbrowse/core/PluginManager';
2
+ export default function TViewF(pluginManager: PluginManager): void;
@@ -0,0 +1,15 @@
1
+ import { lazy } from 'react';
2
+ import ViewType from '@jbrowse/core/pluggableElementTypes/ViewType';
3
+ import stateModelFactory from './model';
4
+ // lazies
5
+ const TViewPanel = lazy(() => import('./components/TViewPanel'));
6
+ export default function TViewF(pluginManager) {
7
+ pluginManager.addViewType(() => {
8
+ return new ViewType({
9
+ name: 'TView',
10
+ stateModel: stateModelFactory(),
11
+ ReactComponent: TViewPanel,
12
+ });
13
+ });
14
+ }
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/TViewPanel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAE5B,OAAO,QAAQ,MAAM,8CAA8C,CAAA;AAEnE,OAAO,iBAAiB,MAAM,SAAS,CAAA;AAIvC,SAAS;AACT,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAA;AAEhE,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,aAA4B;IACzD,aAAa,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7B,OAAO,IAAI,QAAQ,CAAC;YAClB,IAAI,EAAE,OAAO;YACb,UAAU,EAAE,iBAAiB,EAAE;YAC/B,cAAc,EAAE,UAAU;SAC3B,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC"}