jbrowse-plugin-msaview 5.11.0 → 5.13.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/MsaViewPanel/model.js +2 -0
- package/dist/MsaViewPanel/sessionHighlights.d.ts +57 -0
- package/dist/MsaViewPanel/sessionHighlights.js +102 -0
- package/dist/MsaViewPanel/sessionHighlights.test.d.ts +1 -0
- package/dist/MsaViewPanel/sessionHighlights.test.js +60 -0
- package/dist/chunks/{AboutDialog-QWBMKHTT.js → AboutDialog-HJKHE6X5.js} +2 -2
- package/dist/chunks/{AboutDialog-QWBMKHTT.js.map → AboutDialog-HJKHE6X5.js.map} +1 -1
- package/dist/chunks/{AnnotationFileDialog-M3VBMOKS.js → AnnotationFileDialog-MGUAGUEN.js} +2 -2
- package/dist/chunks/{AnnotationFileDialog-M3VBMOKS.js.map → AnnotationFileDialog-MGUAGUEN.js.map} +1 -1
- package/dist/chunks/{ExportSVGDialog-GBJXLLOT.js → ExportSVGDialog-JNEIAPDD.js} +2 -2
- package/dist/chunks/{ExportSVGDialog-GBJXLLOT.js.map → ExportSVGDialog-JNEIAPDD.js.map} +1 -1
- package/dist/chunks/{FeatureDialog-VYCJWC4A.js → FeatureDialog-36U3KHHS.js} +1 -1
- package/dist/chunks/{FeatureDialog-VYCJWC4A.js.map → FeatureDialog-36U3KHHS.js.map} +1 -1
- package/dist/chunks/{GapThresholdDialog-AXIDV62R.js → GapThresholdDialog-MMQTM2ZY.js} +1 -1
- package/dist/chunks/{GapThresholdDialog-AXIDV62R.js.map → GapThresholdDialog-MMQTM2ZY.js.map} +1 -1
- package/dist/chunks/{GoToDialog-7RZHEZXR.js → GoToDialog-HYG2ADFF.js} +2 -2
- package/dist/chunks/{GoToDialog-7RZHEZXR.js.map → GoToDialog-HYG2ADFF.js.map} +1 -1
- package/dist/chunks/{HelpDialog-ELECZLPQ.js → HelpDialog-5WXA5QYK.js} +2 -2
- package/dist/chunks/{HelpDialog-ELECZLPQ.js.map → HelpDialog-5WXA5QYK.js.map} +1 -1
- package/dist/chunks/{MetadataDialog-Z6Z5PJJI.js → MetadataDialog-QQNNQELM.js} +2 -2
- package/dist/chunks/{MetadataDialog-Z6Z5PJJI.js.map → MetadataDialog-QQNNQELM.js.map} +1 -1
- package/dist/chunks/{MsaViewPanel-TWWHZCKE.js → MsaViewPanel-4PHVMXIL.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-KBMR6BIS.js → TrackInfoDialog-WJAJNV5S.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-KBMR6BIS.js.map → TrackInfoDialog-WJAJNV5S.js.map} +1 -1
- package/dist/chunks/{TreeNodeInfoDialog-PY22OL3S.js → TreeNodeInfoDialog-JATVC2AB.js} +2 -2
- package/dist/chunks/{TreeNodeInfoDialog-PY22OL3S.js.map → TreeNodeInfoDialog-JATVC2AB.js.map} +1 -1
- package/dist/chunks/{chunk-GS7LNBOS.js → chunk-4IRL4OLU.js} +1 -1
- package/dist/chunks/{chunk-GS7LNBOS.js.map → chunk-4IRL4OLU.js.map} +1 -1
- package/dist/chunks/{chunk-J47OLCJU.js → chunk-5YOLE75H.js} +2 -2
- package/dist/chunks/{chunk-J47OLCJU.js.map → chunk-5YOLE75H.js.map} +1 -1
- package/dist/chunks/{chunk-4HAJC5MK.js → chunk-GFANDTQR.js} +2 -2
- package/dist/chunks/{chunk-4HAJC5MK.js.map → chunk-GFANDTQR.js.map} +1 -1
- package/dist/chunks/{chunk-UM4CICOY.js → chunk-IBVOKJV3.js} +1 -1
- package/dist/chunks/{chunk-UM4CICOY.js.map → chunk-IBVOKJV3.js.map} +1 -1
- package/dist/chunks/chunk-JYQQZRPF.js +2 -0
- package/dist/chunks/{chunk-LNWEADY6.js.map → chunk-JYQQZRPF.js.map} +2 -2
- package/dist/chunks/{chunk-MUSD22PZ.js → chunk-MDZDMDUF.js} +1 -1
- package/dist/chunks/{chunk-MUSD22PZ.js.map → chunk-MDZDMDUF.js.map} +1 -1
- package/dist/chunks/{chunk-LTSMXRUM.js → chunk-NRAUA3EX.js} +1 -1
- package/dist/chunks/{chunk-LTSMXRUM.js.map → chunk-NRAUA3EX.js.map} +1 -1
- package/dist/chunks/{chunk-4OQ4GYVP.js → chunk-RTIGCYCA.js} +6 -6
- package/dist/chunks/{chunk-4OQ4GYVP.js.map → chunk-RTIGCYCA.js.map} +1 -1
- package/dist/chunks/chunk-W5VCM3IV.js +2 -0
- package/dist/chunks/chunk-W5VCM3IV.js.map +7 -0
- package/dist/chunks/{chunk-YW5C4OPH.js → chunk-Y7M36762.js} +1 -1
- package/dist/chunks/{chunk-YW5C4OPH.js.map → chunk-Y7M36762.js.map} +1 -1
- package/dist/chunks/{chunk-QIGWGLIM.js → chunk-YTIKINP5.js} +1 -1
- package/dist/chunks/{chunk-QIGWGLIM.js.map → chunk-YTIKINP5.js.map} +1 -1
- package/dist/chunks/{chunk-JXNLFOHN.js → chunk-YXL36I7H.js} +1 -1
- package/dist/chunks/{chunk-JXNLFOHN.js.map → chunk-YXL36I7H.js.map} +1 -1
- package/dist/chunks/{dist-ENWWFQRW.js → dist-J332RCWL.js} +1 -1
- package/dist/chunks/{dist-ENWWFQRW.js.map → dist-J332RCWL.js.map} +1 -1
- package/dist/chunks/{dist-3BAA53CZ.js → dist-KSNV45ZL.js} +2 -2
- package/dist/chunks/{model-FB6WLJGL.js → model-T6Q2NL4X.js} +6 -6
- package/dist/chunks/model-T6Q2NL4X.js.map +7 -0
- package/dist/chunks/{renderToSvg-BXHHPMDS.js → renderToSvg-EBTD7XU6.js} +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js +1 -1
- package/dist/jbrowse-plugin-msaview.esm.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/MsaViewPanel/model.ts +2 -0
- package/src/MsaViewPanel/sessionHighlights.test.ts +81 -0
- package/src/MsaViewPanel/sessionHighlights.ts +172 -0
- package/src/version.ts +1 -1
- package/dist/chunks/chunk-F3DI5E5G.js +0 -2
- package/dist/chunks/chunk-F3DI5E5G.js.map +0 -7
- package/dist/chunks/chunk-LNWEADY6.js +0 -2
- package/dist/chunks/model-FB6WLJGL.js.map +0 -7
- /package/dist/chunks/{MsaViewPanel-TWWHZCKE.js.map → MsaViewPanel-4PHVMXIL.js.map} +0 -0
- /package/dist/chunks/{dist-3BAA53CZ.js.map → dist-KSNV45ZL.js.map} +0 -0
- /package/dist/chunks/{renderToSvg-BXHHPMDS.js.map → renderToSvg-EBTD7XU6.js.map} +0 -0
|
@@ -8,6 +8,7 @@ import { connectedDomains } from './connectedDomains';
|
|
|
8
8
|
import { domainTrackConf } from './domainTrack';
|
|
9
9
|
import { msaCoordToGenomeCoord, msaCoordToGenomeRegions, } from './msaCoordToGenomeCoord';
|
|
10
10
|
import { resolveConnectedTranscriptIfNeeded } from './resolveConnectedTranscript';
|
|
11
|
+
import { syncSessionHighlights } from './sessionHighlights';
|
|
11
12
|
import { transcriptMap } from './transcriptMap';
|
|
12
13
|
/**
|
|
13
14
|
* Where the homolog set comes from. NCBI's ortholog sets cover vertebrates and
|
|
@@ -576,6 +577,7 @@ export default function stateModelFactory() {
|
|
|
576
577
|
// so they're factories returning the autorun body rather than plain fns
|
|
577
578
|
addDisposer(self, autorun(syncGenomeHoverToMsaColumn(self)));
|
|
578
579
|
addDisposer(self, autorun(observeProteinHighlights(self)));
|
|
580
|
+
addDisposer(self, autorun(syncSessionHighlights(self)));
|
|
579
581
|
},
|
|
580
582
|
}));
|
|
581
583
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { JBrowsePluginMsaViewModel } from './model';
|
|
2
|
+
import type { TranscriptMap } from './transcriptMap';
|
|
3
|
+
/** The `transientHighlights` owner the session's highlights draw under */
|
|
4
|
+
export declare const SESSION_HIGHLIGHT_OWNER = "session-highlights";
|
|
5
|
+
/** A session highlight: a genome region, 0-based half-open */
|
|
6
|
+
export interface GenomeHighlight {
|
|
7
|
+
assemblyName: string;
|
|
8
|
+
refName: string;
|
|
9
|
+
start: number;
|
|
10
|
+
end: number;
|
|
11
|
+
label?: string;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
/** react-msaview's residue-span highlight: residues of `row`, 1-based */
|
|
15
|
+
export interface RowHighlight {
|
|
16
|
+
row: string;
|
|
17
|
+
start: number;
|
|
18
|
+
end: number;
|
|
19
|
+
label?: string;
|
|
20
|
+
color?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Where the query row sits on the genome: through a transcript, each coding
|
|
24
|
+
* base mapping to its residue, or as the bases of a MAF block
|
|
25
|
+
*/
|
|
26
|
+
export type QueryOnGenome = {
|
|
27
|
+
kind: 'transcript';
|
|
28
|
+
map: Pick<TranscriptMap, 'g2p' | 'refName'>;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'maf';
|
|
31
|
+
refName: string;
|
|
32
|
+
start: number;
|
|
33
|
+
end: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* The session's highlights on the query row, one residue span per run of
|
|
37
|
+
* consecutive residues a highlight covers, each keeping the highlight's label
|
|
38
|
+
* and color. A highlight on another assembly or chromosome, or off the
|
|
39
|
+
* transcript, draws nothing here.
|
|
40
|
+
*/
|
|
41
|
+
export declare function sessionHighlightsOnQueryRow({ highlights, onGenome, querySeqName, querySeqOffset, sameAssembly, sameRefName, labels, }: {
|
|
42
|
+
highlights: readonly GenomeHighlight[];
|
|
43
|
+
onGenome: QueryOnGenome;
|
|
44
|
+
querySeqName: string;
|
|
45
|
+
querySeqOffset: number;
|
|
46
|
+
sameAssembly: (assemblyName: string) => boolean;
|
|
47
|
+
sameRefName: (refName: string) => boolean;
|
|
48
|
+
/** whether the session writes labels on its highlights */
|
|
49
|
+
labels: boolean;
|
|
50
|
+
}): RowHighlight[];
|
|
51
|
+
/**
|
|
52
|
+
* Draw the session's highlights on the query row as react-msaview transient
|
|
53
|
+
* highlights, so a codon highlighted on the genome lights and labels its
|
|
54
|
+
* alignment column. They are derived, so the alignment's own snapshot never
|
|
55
|
+
* holds them.
|
|
56
|
+
*/
|
|
57
|
+
export declare function syncSessionHighlights(self: JBrowsePluginMsaViewModel): () => void;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { getSession } from '@jbrowse/core/util';
|
|
2
|
+
import { hasQueryRow } from './util';
|
|
3
|
+
/** The `transientHighlights` owner the session's highlights draw under */
|
|
4
|
+
export const SESSION_HIGHLIGHT_OWNER = 'session-highlights';
|
|
5
|
+
/**
|
|
6
|
+
* The 0-based query-row positions a genome region covers. A transcript's
|
|
7
|
+
* residues count from its start codon, so `querySeqOffset` moves them onto a
|
|
8
|
+
* query row that holds only part of the protein.
|
|
9
|
+
*/
|
|
10
|
+
function rowPositions({ start, end }, onGenome, querySeqOffset) {
|
|
11
|
+
const positions = new Set();
|
|
12
|
+
if (onGenome.kind === 'maf') {
|
|
13
|
+
for (let base = Math.max(start, onGenome.start); base < Math.min(end, onGenome.end); base++) {
|
|
14
|
+
positions.add(base - onGenome.start);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
for (let base = start; base < end; base++) {
|
|
19
|
+
const residue = onGenome.map.g2p[base];
|
|
20
|
+
if (residue !== undefined) {
|
|
21
|
+
positions.add(residue - querySeqOffset);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return [...positions].filter(p => p >= 0).sort((a, b) => a - b);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The session's highlights on the query row, one residue span per run of
|
|
29
|
+
* consecutive residues a highlight covers, each keeping the highlight's label
|
|
30
|
+
* and color. A highlight on another assembly or chromosome, or off the
|
|
31
|
+
* transcript, draws nothing here.
|
|
32
|
+
*/
|
|
33
|
+
export function sessionHighlightsOnQueryRow({ highlights, onGenome, querySeqName, querySeqOffset, sameAssembly, sameRefName, labels, }) {
|
|
34
|
+
return highlights.flatMap(h => {
|
|
35
|
+
if (!sameAssembly(h.assemblyName) || !sameRefName(h.refName)) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const runs = [];
|
|
39
|
+
for (const pos of rowPositions(h, onGenome, querySeqOffset)) {
|
|
40
|
+
const last = runs.at(-1);
|
|
41
|
+
if (last?.end === pos) {
|
|
42
|
+
last.end = pos + 1;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
runs.push({
|
|
46
|
+
row: querySeqName,
|
|
47
|
+
start: pos + 1,
|
|
48
|
+
end: pos + 1,
|
|
49
|
+
...(labels && h.label ? { label: h.label } : {}),
|
|
50
|
+
...(h.color ? { color: h.color } : {}),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return runs;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
// `highlightLabelsVisible` arrived in core after the oldest host this plugin
|
|
58
|
+
// supports, which writes every label
|
|
59
|
+
function labelsVisible(session) {
|
|
60
|
+
return !('highlightLabelsVisible' in session &&
|
|
61
|
+
session.highlightLabelsVisible === false);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Draw the session's highlights on the query row as react-msaview transient
|
|
65
|
+
* highlights, so a codon highlighted on the genome lights and labels its
|
|
66
|
+
* alignment column. They are derived, so the alignment's own snapshot never
|
|
67
|
+
* holds them.
|
|
68
|
+
*/
|
|
69
|
+
export function syncSessionHighlights(self) {
|
|
70
|
+
return () => {
|
|
71
|
+
const session = getSession(self);
|
|
72
|
+
const { connectedView, transcriptToMsaMap, mafRegion } = self;
|
|
73
|
+
const assemblyName = mafRegion?.assemblyName ?? connectedView?.assemblyNames[0];
|
|
74
|
+
const { assemblyManager } = session;
|
|
75
|
+
const assembly = assemblyName
|
|
76
|
+
? assemblyManager.get(assemblyName)
|
|
77
|
+
: undefined;
|
|
78
|
+
const onGenome = mafRegion
|
|
79
|
+
? { kind: 'maf', ...mafRegion }
|
|
80
|
+
: transcriptToMsaMap
|
|
81
|
+
? { kind: 'transcript', map: transcriptToMsaMap }
|
|
82
|
+
: undefined;
|
|
83
|
+
if (!session.highlightsVisible ||
|
|
84
|
+
!session.highlights.length ||
|
|
85
|
+
!onGenome ||
|
|
86
|
+
!assembly?.initialized ||
|
|
87
|
+
!hasQueryRow(self)) {
|
|
88
|
+
self.clearHighlight(SESSION_HIGHLIGHT_OWNER);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const ownRefName = assembly.getCanonicalRefName(onGenome.kind === 'maf' ? onGenome.refName : onGenome.map.refName);
|
|
92
|
+
self.applyHighlight(SESSION_HIGHLIGHT_OWNER, sessionHighlightsOnQueryRow({
|
|
93
|
+
highlights: session.highlights,
|
|
94
|
+
onGenome,
|
|
95
|
+
querySeqName: self.querySeqName,
|
|
96
|
+
querySeqOffset: self.querySeqOffset,
|
|
97
|
+
sameAssembly: name => assemblyManager.get(name) === assembly,
|
|
98
|
+
sameRefName: refName => assembly.getCanonicalRefName(refName) === ownRefName,
|
|
99
|
+
labels: labelsVisible(session),
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { expect, test } from 'vitest';
|
|
2
|
+
import { sessionHighlightsOnQueryRow } from './sessionHighlights';
|
|
3
|
+
// minus strand: residue 0 on bases 109..107, residue 1 on 106..104, residue 2
|
|
4
|
+
// on 103..101
|
|
5
|
+
const g2p = {};
|
|
6
|
+
for (let base = 101; base < 110; base++) {
|
|
7
|
+
g2p[base] = Math.floor((109 - base) / 3);
|
|
8
|
+
}
|
|
9
|
+
const transcript = {
|
|
10
|
+
kind: 'transcript',
|
|
11
|
+
map: { g2p, refName: 'chr12' },
|
|
12
|
+
};
|
|
13
|
+
function onRow(highlights, { onGenome = transcript, querySeqOffset = 0, labels = true } = {}) {
|
|
14
|
+
return sessionHighlightsOnQueryRow({
|
|
15
|
+
highlights,
|
|
16
|
+
onGenome,
|
|
17
|
+
querySeqName: 'human_query',
|
|
18
|
+
querySeqOffset,
|
|
19
|
+
sameAssembly: name => name === 'hg38',
|
|
20
|
+
sameRefName: refName => refName.replace(/^chr/, '') === '12',
|
|
21
|
+
labels,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const codon = (start, label) => ({
|
|
25
|
+
assemblyName: 'hg38',
|
|
26
|
+
refName: 'chr12',
|
|
27
|
+
start,
|
|
28
|
+
end: start + 3,
|
|
29
|
+
label,
|
|
30
|
+
});
|
|
31
|
+
test('a codon labels the residue it codes, 1-based on the query row', () => {
|
|
32
|
+
expect(onRow([codon(104, 'G12')])).toEqual([
|
|
33
|
+
{ row: 'human_query', start: 2, end: 2, label: 'G12' },
|
|
34
|
+
]);
|
|
35
|
+
});
|
|
36
|
+
test('a query row holding part of the protein shifts by its offset', () => {
|
|
37
|
+
expect(onRow([codon(101)], { querySeqOffset: 1 })).toEqual([
|
|
38
|
+
{ row: 'human_query', start: 2, end: 2 },
|
|
39
|
+
]);
|
|
40
|
+
});
|
|
41
|
+
test('a region over several residues is one span per consecutive run', () => {
|
|
42
|
+
expect(onRow([{ assemblyName: 'hg38', refName: '12', start: 101, end: 110 }])).toEqual([{ row: 'human_query', start: 1, end: 3 }]);
|
|
43
|
+
});
|
|
44
|
+
test('a highlight on another chromosome, assembly or off the CDS draws nothing', () => {
|
|
45
|
+
expect(onRow([
|
|
46
|
+
{ ...codon(104), refName: 'chr7' },
|
|
47
|
+
{ ...codon(104), assemblyName: 'mm39' },
|
|
48
|
+
codon(200),
|
|
49
|
+
])).toEqual([]);
|
|
50
|
+
});
|
|
51
|
+
test('a MAF query row counts bases from the block start', () => {
|
|
52
|
+
expect(onRow([codon(1005, 'site')], {
|
|
53
|
+
onGenome: { kind: 'maf', refName: 'chr12', start: 1000, end: 1010 },
|
|
54
|
+
})).toEqual([{ row: 'human_query', start: 6, end: 8, label: 'site' }]);
|
|
55
|
+
});
|
|
56
|
+
test('labels turned off in the session keep the span and drop its text', () => {
|
|
57
|
+
expect(onRow([codon(104, 'G12')], { labels: false })).toEqual([
|
|
58
|
+
{ row: 'human_query', start: 2, end: 2 },
|
|
59
|
+
]);
|
|
60
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=AboutDialog-
|
|
1
|
+
import{a as l}from"./chunk-JYQQZRPF.js";import{a as i}from"./chunk-DNFD5II2.js";import{a as m}from"./chunk-BX4Z274Q.js";import{a}from"./chunk-J6KYLXRD.js";import{b as r}from"./chunk-FY3BTKY4.js";var e=r(a(),1),o=r(i(),1),t=r(m(),1);function c({onClose:n}){return e.default.createElement(o.Dialog,{open:!0,title:"About",onClose:()=>{n()}},e.default.createElement(t.DialogContent,null,e.default.createElement(t.Typography,null,"MSAView ",l," (",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"https://github.com/gmod/react-msaview"},"Github"),")"),e.default.createElement("ul",null,e.default.createElement("li",null,e.default.createElement(t.Typography,null,"We use some color schemes from the"," ",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"https://github.com/biotite-dev/biotite"},"biotite")," ","project, and their license is reproduced"," ",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"https://github.com/biotite-dev/biotite/blob/master/LICENSE.rst"},"here"))),e.default.createElement("li",null,e.default.createElement(t.Typography,null,"See this page for some information on jalview colorings"," ",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"https://www.jalview.org/help/html/colourSchemes/"},"here"))),e.default.createElement("li",null,e.default.createElement(t.Typography,null,"See this page for some info on the clustal, cinema, maeditor, and lesk color schemes"," ",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"http://www.bioinformatics.nl/~berndb/aacolour.html"},"here"))),e.default.createElement("li",null,e.default.createElement(t.Typography,null,"See this paper about the flower color scheme"," ",e.default.createElement(t.Link,{target:"_blank",rel:"noopener",href:"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/"},"here"))))))}export{c as default};
|
|
2
|
+
//# sourceMappingURL=AboutDialog-HJKHE6X5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/AboutDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport { DialogContent, Link, Typography } from '@mui/material'\n\nimport { version } from '../../version.ts'\n\nexport default function AboutDialog({ onClose }: { onClose: () => void }) {\n return (\n <Dialog\n open\n title=\"About\"\n onClose={() => {\n onClose()\n }}\n >\n <DialogContent>\n <Typography>\n MSAView {version} (\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"https://github.com/gmod/react-msaview\"\n >\n Github\n </Link>\n )\n </Typography>\n\n <ul>\n <li>\n <Typography>\n We use some color schemes from the{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"https://github.com/biotite-dev/biotite\"\n >\n biotite\n </Link>{' '}\n project, and their license is reproduced{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"https://github.com/biotite-dev/biotite/blob/master/LICENSE.rst\"\n >\n here\n </Link>\n </Typography>\n </li>\n <li>\n <Typography>\n See this page for some information on jalview colorings{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"https://www.jalview.org/help/html/colourSchemes/\"\n >\n here\n </Link>\n </Typography>\n </li>\n <li>\n <Typography>\n See this page for some info on the clustal, cinema, maeditor, and\n lesk color schemes{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"http://www.bioinformatics.nl/~berndb/aacolour.html\"\n >\n here\n </Link>\n </Typography>\n </li>\n <li>\n <Typography>\n See this paper about the flower color scheme{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener\"\n href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/\"\n >\n here\n </Link>\n </Typography>\n </li>\n </ul>\n </DialogContent>\n </Dialog>\n )\n}\n"],
|
|
5
5
|
"mappings": "mMAAA,IAAAA,EAAkB,SAElBC,EAAuB,SACvBC,EAAgD,SAIlC,SAAPC,EAA6B,CAAE,QAAAC,CAAO,EAA2B,CACtE,OACE,EAAAC,QAAA,cAAC,SAAM,CACL,KAAI,GACJ,MAAM,QACN,QAAS,IAAK,CACZD,EAAO,CACT,CAAC,EAED,EAAAC,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,aAAU,gBACAC,OACT,EAAAD,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,uCAAuC,EAAA,QAAA,OAOhD,EAAAA,QAAA,cAAA,KAAA,KACE,EAAAA,QAAA,cAAA,KAAA,KACE,EAAAA,QAAA,cAAC,aAAU,0CAC0B,IACnC,EAAAA,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,wCAAwC,EAAA,SAAA,EAGvC,+CACiC,IACzC,EAAAA,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,gEAAgE,EAAA,MAAA,CAGhE,CACI,EAEf,EAAAA,QAAA,cAAA,KAAA,KACE,EAAAA,QAAA,cAAC,aAAU,+DAC+C,IACxD,EAAAA,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,kDAAkD,EAAA,MAAA,CAGlD,CACI,EAEf,EAAAA,QAAA,cAAA,KAAA,KACE,EAAAA,QAAA,cAAC,aAAU,4FAEU,IACnB,EAAAA,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,oDAAoD,EAAA,MAAA,CAGpD,CACI,EAEf,EAAAA,QAAA,cAAA,KAAA,KACE,EAAAA,QAAA,cAAC,aAAU,oDACoC,IAC7C,EAAAA,QAAA,cAAC,OAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,uDAAuD,EAAA,MAAA,CAGvD,CACI,CACV,CACF,CACS,CAGtB",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "AboutDialog", "onClose", "React", "version"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=AnnotationFileDialog-
|
|
1
|
+
import{g as d}from"./chunk-YXL36I7H.js";import"./chunk-K55ZVN73.js";import"./chunk-73KAPCJ2.js";import{a as x}from"./chunk-CVLB4VFP.js";import{a as C}from"./chunk-DNFD5II2.js";import{a as w}from"./chunk-BX4Z274Q.js";import{a as y}from"./chunk-J6KYLXRD.js";import{b as i}from"./chunk-FY3BTKY4.js";var e=i(y(),1),c=i(C(),1),t=i(w(),1),E=i(x(),1);var T="https://gmod.org/JBrowseMSA/tutorials/protein_family";async function b(l){let o=await fetch(l);if(!o.ok)throw new Error(`HTTP ${o.status} fetching ${l} ${await o.text()}`);return o.text()}var k=(0,E.observer)(function({handleClose:l,model:o}){let[r,h]=(0,e.useState)(),[a,g]=(0,e.useState)("file"),[s,F]=(0,e.useState)(""),[m,u]=(0,e.useState)(),[v,f]=(0,e.useState)(!1);return e.default.createElement(c.Dialog,{maxWidth:"xl",title:"Open annotation file",onClose:()=>{l()},open:!0},e.default.createElement(t.DialogContent,null,m?e.default.createElement(c.ErrorMessage,{error:m}):null,e.default.createElement(t.Typography,null,"Open a GFF3 file of annotations, such as the one `react-msaview-cli interpro` writes, or the JSON an InterProScan run returns."," ",e.default.createElement(t.Link,{href:T,target:"_blank",rel:"noopener noreferrer"},"How to make one")),e.default.createElement("div",{style:{display:"flex",margin:30}},e.default.createElement(t.FormControl,{component:"fieldset"},e.default.createElement(t.RadioGroup,{value:a,onChange:n=>{g(n.target.value)}},e.default.createElement(t.FormControlLabel,{value:"url",control:e.default.createElement(t.Radio,null),label:"URL"}),e.default.createElement(t.FormControlLabel,{value:"file",control:e.default.createElement(t.Radio,null),label:"File"}))),a==="url"?e.default.createElement("div",null,e.default.createElement(t.Typography,null,"Open an annotation file from a URL"),e.default.createElement(t.TextField,{label:"URL",value:s,onChange:n=>{F(n.target.value)}})):e.default.createElement("div",{style:{paddingTop:20}},e.default.createElement(t.Typography,null,"Open an annotation file from your local drive"),e.default.createElement(t.Button,{variant:"outlined",component:"label"},"Choose File",e.default.createElement("input",{type:"file",hidden:!0,onChange:({target:n})=>{let p=n.files?.[0];p&&h(p)}})),r?e.default.createElement(t.Typography,null,r.name):null))),e.default.createElement(t.DialogActions,null,e.default.createElement(t.Button,{variant:"contained",color:"primary",disabled:v||(a==="file"?!r:!s.trim()),onClick:()=>{(async()=>{f(!0),u(void 0);try{let n=await(a==="file"&&r?r.text():b(s));o.setGFFFilehandle(void 0),o.setGFF(d(n)),o.setShowDomains(!0),o.setCellFill("domain"),l()}catch(n){console.error(n),u(n)}finally{f(!1)}})()}},"Open annotations"),e.default.createElement(t.Button,{variant:"contained",color:"secondary",onClick:()=>{l()}},"Cancel")))}),O=k;export{O as default};
|
|
2
|
+
//# sourceMappingURL=AnnotationFileDialog-MGUAGUEN.js.map
|
package/dist/chunks/{AnnotationFileDialog-M3VBMOKS.js.map → AnnotationFileDialog-MGUAGUEN.js.map}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/AnnotationFileDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { Dialog, ErrorMessage } from '@jbrowse/core/ui'\nimport {\n Button,\n DialogActions,\n DialogContent,\n FormControl,\n FormControlLabel,\n Link,\n Radio,\n RadioGroup,\n TextField,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { annotationTextToGFF } from 'msa-parsers'\n\nimport type { MsaViewModel } from '../../model.ts'\n\nconst domainsTutorial = 'https://gmod.org/JBrowseMSA/tutorials/protein_family'\n\nasync function fetchText(url: string) {\n const response = await fetch(url)\n if (!response.ok) {\n throw new Error(\n `HTTP ${response.status} fetching ${url} ${await response.text()}`,\n )\n }\n return response.text()\n}\n\nconst AnnotationFileDialog = observer(function ({\n handleClose,\n model,\n}: {\n handleClose: () => void\n model: MsaViewModel\n}) {\n const [file, setFile] = useState<File>()\n const [choice, setChoice] = useState('file')\n const [url, setUrl] = useState('')\n const [error, setError] = useState<unknown>()\n const [loading, setLoading] = useState(false)\n\n // the error is shown here rather than notified: the standalone app and the\n // MSAViewer component have no jbrowse session to notify, and asking one for\n // its notify() threw out of the success path into the catch, which threw\n // again on the same missing session\n return (\n <Dialog\n maxWidth=\"xl\"\n title=\"Open annotation file\"\n onClose={() => {\n handleClose()\n }}\n open\n >\n <DialogContent>\n {error ? <ErrorMessage error={error} /> : null}\n <Typography>\n Open a GFF3 file of annotations, such as the one `react-msaview-cli\n interpro` writes, or the JSON an InterProScan run returns.{' '}\n <Link\n href={domainsTutorial}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n How to make one\n </Link>\n </Typography>\n\n <div style={{ display: 'flex', margin: 30 }}>\n <FormControl component=\"fieldset\">\n <RadioGroup\n value={choice}\n onChange={event => {\n setChoice(event.target.value)\n }}\n >\n <FormControlLabel value=\"url\" control={<Radio />} label=\"URL\" />\n <FormControlLabel value=\"file\" control={<Radio />} label=\"File\" />\n </RadioGroup>\n </FormControl>\n {choice === 'url' ? (\n <div>\n <Typography>Open an annotation file from a URL</Typography>\n <TextField\n label=\"URL\"\n value={url}\n onChange={event => {\n setUrl(event.target.value)\n }}\n />\n </div>\n ) : (\n <div style={{ paddingTop: 20 }}>\n <Typography>\n Open an annotation file from your local drive\n </Typography>\n <Button variant=\"outlined\" component=\"label\">\n Choose File\n <input\n type=\"file\"\n hidden\n onChange={({ target }) => {\n const chosen = target.files?.[0]\n if (chosen) {\n setFile(chosen)\n }\n }}\n />\n </Button>\n {file ? <Typography>{file.name}</Typography> : null}\n </div>\n )}\n </div>\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n disabled={loading || (choice === 'file' ? !file : !url.trim())}\n onClick={() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n setLoading(true)\n setError(undefined)\n try {\n const text = await (choice === 'file' && file\n ? file.text()\n : fetchText(url))\n // through the model's own GFF text, so the annotations travel\n // in the snapshot and the shared URL like every other layer. A\n // filehandle left set would make the snapshot drop that text\n model.setGFFFilehandle(undefined)\n model.setGFF(annotationTextToGFF(text))\n model.setShowDomains(true)\n model.setCellFill('domain')\n handleClose()\n } catch (e) {\n console.error(e)\n setError(e)\n } finally {\n setLoading(false)\n }\n })()\n }}\n >\n Open annotations\n </Button>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => {\n handleClose()\n }}\n >\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default AnnotationFileDialog\n"],
|
|
5
5
|
"mappings": "wSAAA,IAAAA,EAAgC,SAEhCC,EAAqC,SACrCC,EAWO,SACPC,EAAyB,SAKzB,IAAMC,EAAkB,uDAExB,eAAeC,EAAUC,EAAW,CAClC,IAAMC,EAAW,MAAM,MAAMD,CAAG,EAChC,GAAI,CAACC,EAAS,GACZ,MAAM,IAAI,MACR,QAAQA,EAAS,MAAM,aAAaD,CAAG,IAAI,MAAMC,EAAS,KAAI,CAAE,EAAE,EAGtE,OAAOA,EAAS,KAAI,CACtB,CAEA,IAAMC,KAAuB,YAAS,SAAU,CAC9C,YAAAC,EACA,MAAAC,CAAK,EAIN,CACC,GAAM,CAACC,EAAMC,CAAO,KAAI,YAAQ,EAC1B,CAACC,EAAQC,CAAS,KAAI,YAAS,MAAM,EACrC,CAACR,EAAKS,CAAM,KAAI,YAAS,EAAE,EAC3B,CAACC,EAAOC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GX,EAAAA,QAAA,cAAC,SAAM,CAAC,QAAQ,WAAW,UAAU,OAAO,gBAE1C,EAAAA,QAAA,cAAA,QAAA,CACE,KAAK,OACL,OAAM,GACN,SAAU,CAAC,CAAE,OAAAE,CAAM,IAAM,CACvB,IAAMC,EAASD,EAAO,QAAQ,CAAC,EAC3BC,GACFX,EAAQW,CAAM,CAElB,CAAC,CAAA,CACD,EAEHZ,EAAO,EAAAS,QAAA,cAAC,aAAU,KAAET,EAAK,IAAI,EAAiB,IAAI,CAEtD,CACG,EAER,EAAAS,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,SAAM,CACL,QAAQ,YACR,MAAM,UACN,SAAUF,IAAYL,IAAW,OAAS,CAACF,EAAO,CAACL,EAAI,KAAI,GAC3D,QAAS,IAAK,EAEV,SAAW,CACXa,EAAW,EAAI,EACfF,EAAS,MAAS,EAClB,GAAI,CACF,IAAMO,EAAO,MAAOX,IAAW,QAAUF,EACrCA,EAAK,KAAI,EACTN,EAAUC,CAAG,GAIjBI,EAAM,iBAAiB,MAAS,EAChCA,EAAM,OAAOe,EAAoBD,CAAI,CAAC,EACtCd,EAAM,eAAe,EAAI,EACzBA,EAAM,YAAY,QAAQ,EAC1BD,EAAW,CACb,OAASiB,EAAG,CACV,QAAQ,MAAMA,CAAC,EACfT,EAASS,CAAC,CACZ,SACEP,EAAW,EAAK,CAClB,CACF,GAAE,CACJ,CAAC,EAAA,kBAAA,EAIH,EAAAC,QAAA,cAAC,SAAM,CACL,QAAQ,YACR,MAAM,YACN,QAAS,IAAK,CACZX,EAAW,CACb,CAAC,EAAA,QAAA,CAGM,CACK,CAGtB,CAAC,EAEDkB,EAAenB",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "import_mobx_react", "domainsTutorial", "fetchText", "url", "response", "AnnotationFileDialog", "handleClose", "model", "file", "setFile", "choice", "setChoice", "setUrl", "error", "setError", "loading", "setLoading", "React", "event", "target", "chosen", "text", "annotationTextToGFF", "e", "AnnotationFileDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=ExportSVGDialog-
|
|
1
|
+
import{a as p}from"./chunk-NRAUA3EX.js";import{aa as v,ba as y}from"./chunk-4IRL4OLU.js";import{a as L}from"./chunk-CVLB4VFP.js";import{a as D}from"./chunk-DNFD5II2.js";import{a as V}from"./chunk-BX4Z274Q.js";import{a as I}from"./chunk-J6KYLXRD.js";import{b as l}from"./chunk-FY3BTKY4.js";var t=l(I(),1),i=l(D(),1),e=l(V(),1),k=l(L(),1);function z(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}var P=(0,k.observer)(function({model:r,onClose:c}){let[s,C]=(0,t.useState)(!0),[n,T]=(0,t.useState)(!0),[o,b]=(0,t.useState)("viewport"),[E,w]=(0,t.useState)(),[m,h]=(0,t.useState)(!1),d=(0,e.useTheme)(),{turnedOnTracks:M,numColumns:S,leaves:A,showMsaLetters:F}=r,g=M.length>0,x=y(r,v(r,{theme:d,exportType:"entire",includeTracks:n})),f=F&&o==="entire"?S*A.length:0,G=f>1e5;return t.default.createElement(i.Dialog,{onClose:()=>{c()},open:!0,title:"Export SVG"},t.default.createElement(e.DialogContent,null,E?t.default.createElement(i.ErrorMessage,{error:E}):null,t.default.createElement(e.Typography,null,"Settings:"),t.default.createElement(p,{label:"Include minimap?",disabled:o==="entire",checked:s,onChange:()=>{C(!s)}}),g?t.default.createElement(p,{label:"Include tracks?",checked:n,onChange:()=>{T(!n)}}):null,t.default.createElement("div",null,t.default.createElement(e.FormControl,null,t.default.createElement(e.FormLabel,null,"Export type"),t.default.createElement(e.RadioGroup,{value:o,onChange:a=>{let{value:u}=a.target;(u==="entire"||u==="viewport")&&b(u)}},t.default.createElement(e.FormControlLabel,{value:"entire",control:t.default.createElement(e.Radio,null),label:"Entire MSA"}),t.default.createElement(e.FormControlLabel,{value:"viewport",control:t.default.createElement(e.Radio,null),label:"Current viewport only"})))),G?t.default.createElement(e.Alert,{severity:"warning",style:{marginTop:8}},"The entire MSA is ",Math.round(x.width),"x",Math.round(x.height)," pixels and draws"," ",Math.round(f/1e3),"k residue letters, each its own SVG element. Export may be slow or fail \u2014 zooming out far enough to hide the letters exports the same alignment as an image instead."):null),t.default.createElement(e.DialogActions,null,t.default.createElement(e.Button,{variant:"contained",color:"primary",disabled:m,startIcon:m?t.default.createElement(e.CircularProgress,{size:16,color:"inherit"}):null,onClick:()=>{h(!0),z(()=>{r.exportSVG({theme:d,includeMinimap:s,includeTracks:g&&n,exportType:o}).then(()=>{c()}).catch(a=>{console.error(a),w(a)}).finally(()=>{h(!1)})})}},m?"Exporting\u2026":"Export"),t.default.createElement(e.Button,{variant:"contained",color:"secondary",onClick:()=>{c()}},"Cancel")))}),B=P;export{B as default};
|
|
2
|
+
//# sourceMappingURL=ExportSVGDialog-JNEIAPDD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/ExportSVGDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { Dialog, ErrorMessage } from '@jbrowse/core/ui'\nimport {\n Alert,\n Button,\n CircularProgress,\n DialogActions,\n DialogContent,\n FormControl,\n FormControlLabel,\n FormLabel,\n Radio,\n RadioGroup,\n Typography,\n useTheme,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport { exportPageSize, getLayout } from '../../exportLayout.ts'\nimport Checkbox2 from '../Checkbox2.tsx'\n\nimport type { MsaViewModel } from '../../model.ts'\n\n// Run after the browser has painted. A requestAnimationFrame callback still\n// runs *before* the frame it was queued for, so one alone hands the main thread\n// to the render with the spinner not yet on screen; the second fires once that\n// frame is out.\nfunction afterPaint(fn: () => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn)\n })\n}\n\nconst ExportSVGDialog = observer(function ({\n model,\n onClose,\n}: {\n model: MsaViewModel\n onClose: () => void\n}) {\n const [includeMinimap, setIncludeMinimap] = useState(true)\n const [includeTracks, setIncludeTracks] = useState(true)\n const [exportType, setExportType] = useState<'entire' | 'viewport'>(\n 'viewport',\n )\n const [error, setError] = useState<unknown>()\n const [exporting, setExporting] = useState(false)\n const theme = useTheme()\n const { turnedOnTracks, numColumns, leaves, showMsaLetters } = model\n const hasTracks = turnedOnTracks.length > 0\n const entire = exportPageSize(\n model,\n getLayout(model, { theme, exportType: 'entire', includeTracks }),\n )\n // the background is one raster image whatever its size, so what the figure\n // actually costs is its residue letters: each is an svg element of its own.\n // Past roughly this many the export runs to tens of seconds and can exhaust\n // the tab's memory outright\n const glyphs =\n showMsaLetters && exportType === 'entire' ? numColumns * leaves.length : 0\n const isLargeExport = glyphs > 100_000\n return (\n <Dialog\n onClose={() => {\n onClose()\n }}\n open\n title=\"Export SVG\"\n >\n <DialogContent>\n {error ? <ErrorMessage error={error} /> : null}\n <Typography>Settings:</Typography>\n <Checkbox2\n label=\"Include minimap?\"\n disabled={exportType === 'entire'}\n checked={includeMinimap}\n onChange={() => {\n setIncludeMinimap(!includeMinimap)\n }}\n />\n {hasTracks ? (\n <Checkbox2\n label=\"Include tracks?\"\n checked={includeTracks}\n onChange={() => {\n setIncludeTracks(!includeTracks)\n }}\n />\n ) : null}\n <div>\n <FormControl>\n <FormLabel>Export type</FormLabel>\n <RadioGroup\n value={exportType}\n onChange={event => {\n const { value } = event.target\n if (value === 'entire' || value === 'viewport') {\n setExportType(value)\n }\n }}\n >\n <FormControlLabel\n value=\"entire\"\n control={<Radio />}\n label=\"Entire MSA\"\n />\n <FormControlLabel\n value=\"viewport\"\n control={<Radio />}\n label=\"Current viewport only\"\n />\n </RadioGroup>\n </FormControl>\n </div>\n {isLargeExport ? (\n <Alert severity=\"warning\" style={{ marginTop: 8 }}>\n The entire MSA is {Math.round(entire.width)}x\n {Math.round(entire.height)} pixels and draws{' '}\n {Math.round(glyphs / 1000)}k residue letters, each its own SVG\n element. Export may be slow or fail \u2014 zooming out far enough to hide\n the letters exports the same alignment as an image instead.\n </Alert>\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button\n variant=\"contained\"\n color=\"primary\"\n // rendering runs on the main thread and a large figure holds it for\n // seconds; without this the button stays live through the freeze and\n // a second click starts a second export\n disabled={exporting}\n startIcon={\n exporting ? <CircularProgress size={16} color=\"inherit\" /> : null\n }\n onClick={() => {\n setExporting(true)\n afterPaint(() => {\n void model\n .exportSVG({\n theme,\n includeMinimap,\n includeTracks: hasTracks && includeTracks,\n exportType,\n })\n .then(() => {\n onClose()\n })\n .catch((e: unknown) => {\n console.error(e)\n setError(e)\n })\n .finally(() => {\n setExporting(false)\n })\n })\n }}\n >\n {exporting ? 'Exporting\u2026' : 'Export'}\n </Button>\n <Button\n variant=\"contained\"\n color=\"secondary\"\n onClick={() => {\n onClose()\n }}\n >\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default ExportSVGDialog\n"],
|
|
5
5
|
"mappings": "iSAAA,IAAAA,EAAgC,SAEhCC,EAAqC,SACrCC,EAaO,SACPC,EAAyB,SAWzB,SAASC,EAAWC,EAAc,CAChC,sBAAsB,IAAK,CACzB,sBAAsBA,CAAE,CAC1B,CAAC,CACH,CAEA,IAAMC,KAAkB,YAAS,SAAU,CACzC,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,GAAM,CAACC,EAAgBC,CAAiB,KAAI,YAAS,EAAI,EACnD,CAACC,EAAeC,CAAgB,KAAI,YAAS,EAAI,EACjD,CAACC,EAAYC,CAAa,KAAI,YAClC,UAAU,EAEN,CAACC,EAAOC,CAAQ,KAAI,YAAQ,EAC5B,CAACC,EAAWC,CAAY,KAAI,YAAS,EAAK,EAC1CC,KAAQ,YAAQ,EAChB,CAAE,eAAAC,EAAgB,WAAAC,EAAY,OAAAC,E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uB,CAAA,CAC7B,CACS,CACD,EAEfD,EACC,EAAAC,QAAA,cAAC,QAAK,CAAC,SAAS,UAAU,MAAO,CAAE,UAAW,CAAC,CAAE,uBAC5B,KAAK,MAAML,EAAO,KAAK,MACzC,KAAK,MAAMA,EAAO,MAAM,sBAAoB,IAC5C,KAAK,MAAMG,EAAS,GAAI,+KAIzB,IAAI,EAEV,EAAAE,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,SAAM,CACL,QAAQ,YACR,MAAM,UAIN,SAAUb,EACV,UACEA,EAAY,EAAAa,QAAA,cAAC,mBAAgB,CAAC,KAAM,GAAI,MAAM,SAAS,CAAA,EAAM,KAE/D,QAAS,IAAK,CACZZ,EAAa,EAAI,EACjBd,EAAW,IAAK,CACTG,EACF,UAAU,CACT,MAAAY,EACA,eAAAV,EACA,cAAee,GAAab,EAC5B,WAAAE,EACD,EACA,KAAK,IAAK,CACTL,EAAO,CACT,CAAC,EACA,MAAO0B,GAAc,CACpB,QAAQ,MAAMA,CAAC,EACflB,EAASkB,CAAC,CACZ,CAAC,EACA,QAAQ,IAAK,CACZhB,EAAa,EAAK,CACpB,CAAC,CACL,CAAC,CACH,CAAC,EAEAD,EAAY,kBAAe,QAAQ,EAEtC,EAAAa,QAAA,cAAC,SAAM,CACL,QAAQ,YACR,MAAM,YACN,QAAS,IAAK,CACZtB,EAAO,CACT,CAAC,EAAA,QAAA,CAGM,CACK,CAGtB,CAAC,EAED2B,EAAe7B",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "import_mobx_react", "afterPaint", "fn", "ExportSVGDialog", "model", "onClose", "includeMinimap", "setIncludeMinimap", "includeTracks", "setIncludeTracks", "exportType", "setExportType", "error", "setError", "exporting", "setExporting", "theme", "turnedOnTracks", "numColumns", "leaves", "showMsaLetters", "hasTracks", "entire", "exportPageSize", "getLayout", "glyphs", "isLargeExport", "React", "Checkbox2", "event", "value", "e", "ExportSVGDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as C}from"./chunk-CVLB4VFP.js";import{a as k}from"./chunk-DNFD5II2.js";import{a as F}from"./chunk-BX4Z274Q.js";import{a as T}from"./chunk-J6KYLXRD.js";import{b as c}from"./chunk-FY3BTKY4.js";var e=c(T(),1),p=c(k(),1),t=c(F(),1),s=c(C(),1);function w(n,a){return[n.accession,n.name,n.description].some(o=>o?.toLowerCase().includes(a))}var x=(0,s.observer)(function({model:n,accessions:a}){let o=m=>{for(let u of a)n.setFilter(u,m)};return e.default.createElement("div",null,e.default.createElement(t.Button,{onClick:()=>{o(!0)}},"Toggle all on"),e.default.createElement(t.Button,{onClick:()=>{o(!1)}},"Toggle all off"))}),v=(0,s.observer)(function({model:n}){let{annotationTypes:a,annotations:o,featureColors:m,fillPalette:u}=n,[E,h]=(0,e.useState)(""),g=E.trim().toLowerCase(),d=[...a.values()].filter(l=>!g||w(l,g)),i=new Map,f=new Map;for(let l of o){let{accession:r}=l;i.set(r,(i.get(r)??0)+1),f.has(r)||f.set(r,m.get(l)?.fill??u[r])}return e.default.createElement(e.default.Fragment,null,e.default.createElement(t.TextField,{label:"Filter",size:"small",value:E,onChange:l=>{h(l.target.value)}}),e.default.createElement(x,{model:n,accessions:d.map(l=>l.accession)}),e.default.createElement(t.Table,{size:"small"},e.default.createElement(t.TableHead,null,e.default.createElement(t.TableRow,null,e.default.createElement(t.TableCell,{padding:"checkbox"}),e.default.createElement(t.TableCell,null,"color"),e.default.createElement(t.TableCell,null,"accession"),e.default.createElement(t.TableCell,null,"name"),e.default.createElement(t.TableCell,null,"count"),e.default.createElement(t.TableCell,null,"description"))),e.default.createElement(t.TableBody,null,d.map(({accession:l,name:r,description:b})=>e.default.createElement(t.TableRow,{key:l},e.default.createElement(t.TableCell,{padding:"checkbox"},e.default.createElement(t.Checkbox,{checked:!n.featureOff(l),onChange:()=>{n.setFilter(l,n.featureOff(l))}})),e.default.createElement(t.TableCell,null,e.default.createElement("div",{style:{width:20,height:20,background:f.get(l)}})),e.default.createElement(t.TableCell,null,l),e.default.createElement(t.TableCell,null,r),e.default.createElement(t.TableCell,null,i.get(l)),e.default.createElement(t.TableCell,null,b))))))}),y=(0,s.observer)(function({onClose:n,model:a}){return e.default.createElement(p.Dialog,{onClose:()=>{n()},open:!0,title:"Feature filters",maxWidth:"xl"},e.default.createElement(t.DialogContent,null,e.default.createElement(v,{model:a})))}),D=y;export{D as default};
|
|
2
|
-
//# sourceMappingURL=FeatureDialog-
|
|
2
|
+
//# sourceMappingURL=FeatureDialog-36U3KHHS.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/FeatureDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { useState } from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport {\n Button,\n Checkbox,\n DialogContent,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableRow,\n TextField,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport type { MsaViewModel } from '../../model.ts'\nimport type { Annotation } from '../../types.ts'\n\nfunction matches(type: Annotation, query: string) {\n return [type.accession, type.name, type.description].some(field =>\n field?.toLowerCase().includes(query),\n )\n}\n\nconst Toggles = observer(function ({\n model,\n accessions,\n}: {\n model: MsaViewModel\n accessions: string[]\n}) {\n const setAll = (shown: boolean) => {\n for (const accession of accessions) {\n model.setFilter(accession, shown)\n }\n }\n return (\n <div>\n <Button\n onClick={() => {\n setAll(true)\n }}\n >\n Toggle all on\n </Button>\n\n <Button\n onClick={() => {\n setAll(false)\n }}\n >\n Toggle all off\n </Button>\n </div>\n )\n})\n\nconst FeatureTable = observer(function ({ model }: { model: MsaViewModel }) {\n const { annotationTypes, annotations, featureColors, fillPalette } = model\n const [query, setQuery] = useState('')\n const needle = query.trim().toLowerCase()\n const types = [...annotationTypes.values()].filter(\n type => !needle || matches(type, needle),\n )\n const counts = new Map<string, number>()\n const swatches = new Map<string, string>()\n for (const annot of annotations) {\n const { accession } = annot\n counts.set(accession, (counts.get(accession) ?? 0) + 1)\n if (!swatches.has(accession)) {\n swatches.set(\n accession,\n featureColors.get(annot)?.fill ?? fillPalette[accession]!,\n )\n }\n }\n return (\n <>\n <TextField\n label=\"Filter\"\n size=\"small\"\n value={query}\n onChange={event => {\n setQuery(event.target.value)\n }}\n />\n <Toggles model={model} accessions={types.map(t => t.accession)} />\n <Table size=\"small\">\n <TableHead>\n <TableRow>\n <TableCell padding=\"checkbox\" />\n <TableCell>color</TableCell>\n <TableCell>accession</TableCell>\n <TableCell>name</TableCell>\n <TableCell>count</TableCell>\n <TableCell>description</TableCell>\n </TableRow>\n </TableHead>\n <TableBody>\n {types.map(({ accession, name, description }) => (\n <TableRow key={accession}>\n <TableCell padding=\"checkbox\">\n <Checkbox\n checked={!model.featureOff(accession)}\n onChange={() => {\n model.setFilter(accession, model.featureOff(accession))\n }}\n />\n </TableCell>\n <TableCell>\n <div\n style={{\n width: 20,\n height: 20,\n background: swatches.get(accession),\n }}\n />\n </TableCell>\n <TableCell>{accession}</TableCell>\n <TableCell>{name}</TableCell>\n <TableCell>{counts.get(accession)}</TableCell>\n <TableCell>{description}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </>\n )\n})\n\nconst FeatureTypeDialog = observer(function ({\n onClose,\n model,\n}: {\n onClose: () => void\n model: MsaViewModel\n}) {\n return (\n <Dialog\n onClose={() => {\n onClose()\n }}\n open\n title=\"Feature filters\"\n maxWidth=\"xl\"\n >\n <DialogContent>\n <FeatureTable model={model} />\n </DialogContent>\n </Dialog>\n )\n})\n\nexport default FeatureTypeDialog\n"],
|
|
5
5
|
"mappings": "wMAAA,IAAAA,EAAgC,SAEhCC,EAAuB,SACvBC,EAUO,SACPC,EAAyB,SAKzB,SAASC,EAAQC,E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CAAS,CAAC,EACjC,EAAAC,QAAA,cAAC,YAAS,KAAEe,CAAW,CAAa,CAEvC,CAAC,CACQ,CACN,CAGd,CAAC,EAEKC,KAAoB,YAAS,SAAU,CAC3C,QAAAC,EACA,MAAAtB,CAAK,EAIN,CACC,OACE,EAAAK,QAAA,cAAC,SAAM,CACL,QAAS,IAAK,CACZiB,EAAO,CACT,EACA,KAAI,GACJ,MAAM,kBACN,SAAS,IAAI,EAEb,EAAAjB,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAACC,EAAY,CAAC,MAAON,CAAK,CAAA,CAAI,CAChB,CAGtB,CAAC,EAEDuB,EAAeF",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "import_mobx_react", "matches", "type", "query", "field", "Toggles", "model", "accessions", "setAll", "shown", "accession", "React", "FeatureTable", "annotationTypes", "annotations", "featureColors", "fillPalette", "setQuery", "needle", "types", "counts", "swatches", "annot", "event", "t", "name", "description", "FeatureTypeDialog", "onClose", "FeatureDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as c}from"./chunk-CVLB4VFP.js";import{a as v}from"./chunk-DNFD5II2.js";import{a as d}from"./chunk-BX4Z274Q.js";import{a as m}from"./chunk-J6KYLXRD.js";import{b as t}from"./chunk-FY3BTKY4.js";var a=t(m(),1),h=t(v(),1),e=t(d(),1),y=t(c(),1);var r=t(m(),1),o=t(d(),1),u=t(c(),1),w=(0,u.observer)(function({model:n}){let[f,s]=(0,r.useState)(),p=f??n.allowedGappyness;return r.default.createElement("div",{style:{display:"flex",alignItems:"center",gap:8}},r.default.createElement(o.Typography,{style:{whiteSpace:"nowrap"}},"\u2265",p,"% gaps"),r.default.createElement(o.Slider,{"data-testid":"gappyness_slider",style:{width:200,marginInline:10},min:1,max:100,value:p,onChange:(E,l)=>{s(l)},onChangeCommitted:(E,l)=>{n.setAllowedGappyness(l),s(void 0)}}))}),g=w;var C=(0,y.observer)(function({model:i,onClose:n}){return a.default.createElement(h.Dialog,{open:!0,onClose:n,title:"Hide gappy columns"},a.default.createElement(e.DialogContent,null,a.default.createElement(e.Typography,{variant:"body2",sx:{mb:2}},"The viewer hides each column where at least this share of the rows has a gap."),a.default.createElement(g,{model:i})),a.default.createElement(e.DialogActions,null,a.default.createElement(e.Button,{variant:"contained",onClick:n},"Close")))}),x=C;export{x as default};
|
|
2
|
-
//# sourceMappingURL=GapThresholdDialog-
|
|
2
|
+
//# sourceMappingURL=GapThresholdDialog-MMQTM2ZY.js.map
|
package/dist/chunks/{GapThresholdDialog-AXIDV62R.js.map → GapThresholdDialog-MMQTM2ZY.js.map}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/GapThresholdDialog.tsx", "../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/GappynessSlider.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport { Button, DialogActions, DialogContent, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport GappynessSlider from './GappynessSlider.tsx'\n\nimport type { MsaViewModel } from '../../model.ts'\n\nconst GapThresholdDialog = observer(function ({\n model,\n onClose,\n}: {\n model: MsaViewModel\n onClose: () => void\n}) {\n return (\n <Dialog open onClose={onClose} title=\"Hide gappy columns\">\n <DialogContent>\n <Typography variant=\"body2\" sx={{ mb: 2 }}>\n The viewer hides each column where at least this share of the rows has\n a gap.\n </Typography>\n <GappynessSlider model={model} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={onClose}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default GapThresholdDialog\n", "import React, { useState } from 'react'\n\nimport { Slider, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport type { MsaViewModel } from '../../model.ts'\n\nconst GappynessSlider = observer(function GappynessSlider({\n model,\n}: {\n model: MsaViewModel\n}) {\n const [dragValue, setDragValue] = useState<number>()\n const value = dragValue ?? model.allowedGappyness\n return (\n <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>\n {/* the threshold is inclusive: blanks are columns whose gap count is at\n least ceil(allowedGappyness% of the rows), so at 100 it hides the\n columns that are entirely gaps rather than nothing */}\n <Typography style={{ whiteSpace: 'nowrap' }}>\n ≥{value}% gaps\n </Typography>\n <Slider\n // In JBrowse other MUI Sliders share the page, so `.MuiSlider-thumb`\n // can match the wrong one. Tests and screenshot specs target\n // `[data-testid=\"gappyness_slider\"] input`, the hidden range input that\n // takes focus and arrow/PageUp/PageDown.\n //\n // Not `slotProps={{ input: ... }}`: that widens `onChange`'s `val` to\n // `number | number[]`, which setAllowedGappyness rejects.\n //\n // The thumb follows local state while dragging and the model takes the\n // value on release, since each write recomputes the gap columns over\n // the whole alignment.\n data-testid=\"gappyness_slider\"\n style={{ width: 200, marginInline: 10 }}\n min={1}\n max={100}\n value={value}\n onChange={(_, val) => {\n setDragValue(val)\n }}\n onChangeCommitted={(_, val) => {\n model.setAllowedGappyness(val)\n setDragValue(undefined)\n }}\n />\n </div>\n )\n})\n\nexport default GappynessSlider\n"],
|
|
5
5
|
"mappings": "wMAAA,IAAAA,EAAkB,SAElBC,EAAuB,SACvBC,EAAiE,SACjEC,EAAyB,SCJzB,IAAAC,EAAgC,SAEhCC,EAAmC,SACnCC,EAAyB,SAInBC,KAAkB,YAAS,SAAyB,CACxD,MAAAC,CAAK,EAGN,CACC,GAAM,CAACC,EAAWC,CAAY,KAAI,YAAQ,EACpCC,EAAQF,GAAaD,EAAM,iBACjC,OACE,EAAAI,QAAA,cAAA,MAAA,CAAK,MAAO,CAAE,QAAS,OAAQ,WAAY,SAAU,IAAK,CAAC,CAAE,EAI3D,EAAAA,QAAA,cAAC,aAAU,CAAC,MAAO,CAAE,WAAY,QAAQ,CAAE,WACpCD,YAEP,EAAAC,QAAA,cAAC,wBAYa,mBACZ,MAAO,CAAE,MAAO,IAAK,aAAc,EAAE,EACrC,IAAK,EACL,IAAK,IACL,MAAOD,EACP,SAAU,CAACE,EAAGC,IAAO,CACnBJ,EAAaI,CAAG,CAClB,EACA,kBAAmB,CAACD,EAAGC,IAAO,CAC5BN,EAAM,oBAAoBM,CAAG,EAC7BJ,EAAa,MAAS,CACxB,CAAC,CAAA,CACD,CAGR,CAAC,EAEDK,EAAeR,EDzCf,IAAMS,KAAqB,YAAS,SAAU,CAC5C,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,OACE,EAAAC,QAAA,cAAC,SAAM,CAAC,KAAI,GAAC,QAASD,EAAS,MAAM,oBAAoB,EACvD,EAAAC,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,aAAU,CAAC,QAAQ,QAAQ,GAAI,CAAE,GAAI,CAAC,CAAE,EAAA,+EAAA,EAIzC,EAAAA,QAAA,cAACC,EAAe,CAAC,MAAOH,CAAK,CAAA,CAAI,EAEnC,EAAAE,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,SAAM,CAAC,QAAQ,YAAY,QAASD,CAAO,EAAA,OAAA,CAEnC,CACK,CAGtB,CAAC,EAEDG,EAAeL",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "import_mobx_react", "import_react", "import_material", "import_mobx_react", "GappynessSlider", "model", "dragValue", "setDragValue", "value", "React", "_", "val", "GappynessSlider_default", "GapThresholdDialog", "model", "onClose", "React", "GappynessSlider_default", "GapThresholdDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=GoToDialog-
|
|
1
|
+
import{b as r}from"./chunk-MDZDMDUF.js";import"./chunk-CVLB4VFP.js";import{a}from"./chunk-DNFD5II2.js";import{a as u}from"./chunk-BX4Z274Q.js";import{a as i}from"./chunk-J6KYLXRD.js";import{b as t}from"./chunk-FY3BTKY4.js";var o=t(i(),1),l=t(a(),1),m=t(u(),1);function f({model:n,onClose:e}){return o.default.createElement(l.Dialog,{open:!0,onClose:e,title:"Go to row or column",maxWidth:"xs",fullWidth:!0},o.default.createElement(m.DialogContent,null,o.default.createElement(r,{model:n,onFound:e})))}export{f as default};
|
|
2
|
+
//# sourceMappingURL=GoToDialog-HYG2ADFF.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/GoToDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport { DialogContent } from '@mui/material'\n\nimport GoToBox from './GoToBox.tsx'\n\nimport type { MsaViewModel } from '../../model.ts'\n\nexport default function GoToDialog({\n model,\n onClose,\n}: {\n model: MsaViewModel\n onClose: () => void\n}) {\n return (\n <Dialog\n open\n onClose={onClose}\n title=\"Go to row or column\"\n maxWidth=\"xs\"\n fullWidth\n >\n <DialogContent>\n <GoToBox model={model} onFound={onClose} />\n </DialogContent>\n </Dialog>\n )\n}\n"],
|
|
5
5
|
"mappings": "+NAAA,IAAAA,EAAkB,SAElBC,EAAuB,SACvBC,EAA8B,SAMhB,SAAPC,EAA4B,CACjC,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,OACE,EAAAC,QAAA,cAAC,SAAM,CACL,KAAI,GACJ,QAASD,EACT,MAAM,sBACN,SAAS,KACT,UAAS,EAAA,EAET,EAAAC,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAACC,EAAO,CAAC,MAAOH,EAAO,QAASC,CAAO,CAAA,CAAI,CAC7B,CAGtB",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "GoToDialog", "model", "onClose", "React", "GoToBox_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i,b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=HelpDialog-
|
|
1
|
+
import{a as i,b as m}from"./chunk-YTIKINP5.js";import{a as n}from"./chunk-JYQQZRPF.js";import{a as E}from"./chunk-DNFD5II2.js";import{a as b}from"./chunk-BX4Z274Q.js";import{a as p}from"./chunk-J6KYLXRD.js";import{b as a}from"./chunk-FY3BTKY4.js";var e=a(p(),1),u=a(E(),1),t=a(b(),1);var f=(0,e.lazy)(()=>import("./AboutDialog-HJKHE6X5.js"));function c({title:o,rows:l}){return e.default.createElement(e.default.Fragment,null,e.default.createElement(t.Typography,{variant:"subtitle2",sx:{mt:1}},o),e.default.createElement(t.Table,{size:"small","aria-label":o},e.default.createElement(t.TableBody,null,l.map(({label:r,action:s})=>e.default.createElement(t.TableRow,{key:r},e.default.createElement(t.TableCell,{sx:{whiteSpace:"nowrap",fontWeight:500}},r),e.default.createElement(t.TableCell,null,s))))))}function g({model:o,onClose:l}){return e.default.createElement(u.Dialog,{open:!0,title:"Mouse & keyboard",onClose:l},e.default.createElement(t.DialogContent,null,e.default.createElement(c,{title:"Mouse",rows:m}),e.default.createElement(c,{title:"Keyboard (click the alignment first)",rows:i})),e.default.createElement(t.DialogActions,null,e.default.createElement(t.Typography,{variant:"caption",sx:{mr:"auto",pl:1}},"MSAView ",n),e.default.createElement(t.Button,{onClick:()=>{o.queueDialog(r=>[f,{onClose:r}]),l()}},"About & credits"),e.default.createElement(t.Button,{variant:"contained",onClick:l},"Close")))}export{g as default};
|
|
2
|
+
//# sourceMappingURL=HelpDialog-5WXA5QYK.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/HelpDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { lazy } from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport {\n Button,\n DialogActions,\n DialogContent,\n Table,\n TableBody,\n TableCell,\n TableRow,\n Typography,\n} from '@mui/material'\n\nimport { version } from '../../version.ts'\nimport { keyboardControls, mouseControls } from '../controls.ts'\n\nimport type { MsaViewModel } from '../../model.ts'\nimport type { Control } from '../controls.ts'\n\nconst AboutDialog = lazy(() => import('./AboutDialog.tsx'))\n\nfunction ControlTable({ title, rows }: { title: string; rows: Control[] }) {\n return (\n <>\n <Typography variant=\"subtitle2\" sx={{ mt: 1 }}>\n {title}\n </Typography>\n <Table size=\"small\" aria-label={title}>\n <TableBody>\n {rows.map(({ label, action }) => (\n <TableRow key={label}>\n <TableCell sx={{ whiteSpace: 'nowrap', fontWeight: 500 }}>\n {label}\n </TableCell>\n <TableCell>{action}</TableCell>\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </>\n )\n}\n\nexport default function HelpDialog({\n model,\n onClose,\n}: {\n model: MsaViewModel\n onClose: () => void\n}) {\n return (\n <Dialog open title=\"Mouse & keyboard\" onClose={onClose}>\n <DialogContent>\n <ControlTable title=\"Mouse\" rows={mouseControls} />\n <ControlTable\n title=\"Keyboard (click the alignment first)\"\n rows={keyboardControls}\n />\n </DialogContent>\n <DialogActions>\n <Typography variant=\"caption\" sx={{ mr: 'auto', pl: 1 }}>\n MSAView {version}\n </Typography>\n <Button\n onClick={() => {\n model.queueDialog(done => [AboutDialog, { onClose: done }])\n onClose()\n }}\n >\n About & credits\n </Button>\n <Button variant=\"contained\" onClick={onClose}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n"],
|
|
5
5
|
"mappings": "uPAAA,IAAAA,EAA4B,SAE5BC,EAAuB,SACvBC,EASO,SAQP,IAAMC,KAAc,QAAK,IA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cAAC,SAAM,CAAC,QAAQ,YAAY,QAASK,CAAO,EAAA,OAAA,CAEnC,CACK,CAGtB",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "AboutDialog", "ControlTable", "title", "rows", "React", "label", "action", "HelpDialog", "model", "onClose", "mouseControls", "keyboardControls", "version", "done"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p,b as d,c as m,d as h}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=MetadataDialog-
|
|
1
|
+
import{a as p,b as d,c as m,d as h}from"./chunk-5YOLE75H.js";import"./chunk-IBVOKJV3.js";import"./chunk-YXL36I7H.js";import"./chunk-NRAUA3EX.js";import"./chunk-K55ZVN73.js";import"./chunk-73KAPCJ2.js";import"./chunk-GFANDTQR.js";import"./chunk-Y7M36762.js";import{a as O}from"./chunk-CVLB4VFP.js";import{a as N}from"./chunk-DNFD5II2.js";import{a as L}from"./chunk-BX4Z274Q.js";import{a as R}from"./chunk-J6KYLXRD.js";import{b as a}from"./chunk-FY3BTKY4.js";var r=a(R(),1),T=a(N(),1),c=a(L(),1),M=a(O(),1);var E={General:"Alignment",Accessions:"Row accessions",Dbxref:"Row cross-references"},C={ID:"Identifier",AC:"Accession",DE:"Description",AU:"Authors",SE:"Source of seed",SS:"Source of structure",BM:"Build method",SM:"Search method",GA:"Gathering threshold",TC:"Trusted cutoff",NC:"Noise cutoff",TP:"Family type",CL:"Clan",MB:"Clan members",PI:"Previous identifiers",DR:"Database references",CC:"Comment",WK:"Wikipedia",NE:"Pfam family nested in this one",NL:"Nesting location",NH:"Tree (Newick)",SQ:"Number of sequences",RC:"Reference comment",RN:"Reference number",RM:"PubMed ID",RT:"Reference title",RA:"Reference authors",RL:"Reference journal",CB:"Curation: build",DC:"Database comment",DW:"Database web link",OS:"Organism",OC:"Organism classification",AM:"Alignment method",FT:"Feature",SO:"Sequence Ontology term"},y={RT:"Title",RA:"Authors",RL:"Journal",RM:"PubMed",RC:"Comment"},A=new Set(["NH"]);var D=a(R(),1);var g=["RM","RT","RA","RL","RC"];function x(e){return/^\d+$/.test(e)?D.default.createElement("a",{href:`https://pubmed.ncbi.nlm.nih.gov/${e}/`,target:"_blank",rel:"noreferrer"},e):e}function j(e){let o=e.RN;if(!Array.isArray(o)||o.length===0)return e;let s=g.filter(n=>e[n]!=null);if(!s.every(n=>{let i=e[n];return Array.isArray(i)&&i.length===o.length}))return e;let f=Object.fromEntries(Object.entries(e).filter(([n])=>n!=="RN"&&!g.includes(n))),t=Object.fromEntries(o.map((n,i)=>[n,Object.fromEntries(s.map(u=>{let b=e[u][i];return[y[u],u==="RM"?x(b):b]}))]));return{...f,References:t}}function S(e){return e&&typeof e=="object"?j(e):{}}var v=(0,M.observer)(function({model:e,onClose:o}){let s=Object.entries(e.header).filter(([,t])=>t!=null&&!d(t)),l=Object.fromEntries(s.filter(([,t])=>!p(t))),f=s.filter(([,t])=>p(t));return r.default.createElement(T.Dialog,{onClose:()=>{o()},open:!0,title:"Metadata",maxWidth:"xl"},r.default.createElement(c.DialogContent,null,s.length===0?r.default.createElement(c.Typography,null,"This alignment has no metadata."):r.default.createElement(r.default.Fragment,null,Object.keys(l).length>0?r.default.createElement(m,{record:l}):null,f.map(([t,n])=>r.default.createElement("div",{key:t},r.default.createElement(c.Typography,{variant:"h6"},E[t]??t),t==="General"?r.default.createElement(m,{record:S(n),labels:C,monospaceKeys:A}):r.default.createElement(m,{record:n})))),r.default.createElement(c.Typography,{variant:"h6"},"Sequences"),r.default.createElement(h,{str:e.rows})))}),I=v;export{I as default};
|
|
2
|
+
//# sourceMappingURL=MetadataDialog-QQNNQELM.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/MetadataDialog.tsx", "../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/metadataLabels.ts", "../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/metadataRecord.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport { DialogContent, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport MetadataTable, { isEmpty, isRecord } from '../MetadataTable.tsx'\nimport SequenceTextArea from '../SequenceTextArea.tsx'\nimport { gfLabels, monospaceKeys, sectionLabels } from './metadataLabels.ts'\nimport { groupGeneral } from './metadataRecord.tsx'\n\nimport type { MsaViewModel } from '../../model.ts'\n\nconst MetadataDialog = observer(function ({\n model,\n onClose,\n}: {\n model: MsaViewModel\n onClose: () => void\n}) {\n const entries = Object.entries(model.header).filter(\n ([, value]) => value != null && !isEmpty(value),\n )\n const fields = Object.fromEntries(\n entries.filter(([, value]) => !isRecord(value)),\n )\n const sections = entries.filter(([, value]) => isRecord(value))\n return (\n <Dialog\n onClose={() => {\n onClose()\n }}\n open\n title=\"Metadata\"\n maxWidth=\"xl\"\n >\n <DialogContent>\n {entries.length === 0 ? (\n <Typography>This alignment has no metadata.</Typography>\n ) : (\n <>\n {Object.keys(fields).length > 0 ? (\n <MetadataTable record={fields} />\n ) : null}\n {sections.map(([section, value]) => (\n <div key={section}>\n <Typography variant=\"h6\">\n {sectionLabels[section] ?? section}\n </Typography>\n {section === 'General' ? (\n <MetadataTable\n record={groupGeneral(value)}\n labels={gfLabels}\n monospaceKeys={monospaceKeys}\n />\n ) : (\n <MetadataTable record={value as Record<string, unknown>} />\n )}\n </div>\n ))}\n </>\n )}\n <Typography variant=\"h6\">Sequences</Typography>\n <SequenceTextArea str={model.rows} />\n </DialogContent>\n </Dialog>\n )\n})\n\nexport default MetadataDialog\n", "export const sectionLabels: Record<string, string> = {\n General: 'Alignment',\n Accessions: 'Row accessions',\n Dbxref: 'Row cross-references',\n}\n\nexport const gfLabels: Record<string, string> = {\n ID: 'Identifier',\n AC: 'Accession',\n DE: 'Description',\n AU: 'Authors',\n SE: 'Source of seed',\n SS: 'Source of structure',\n BM: 'Build method',\n SM: 'Search method',\n GA: 'Gathering threshold',\n TC: 'Trusted cutoff',\n NC: 'Noise cutoff',\n TP: 'Family type',\n CL: 'Clan',\n MB: 'Clan members',\n PI: 'Previous identifiers',\n DR: 'Database references',\n CC: 'Comment',\n WK: 'Wikipedia',\n NE: 'Pfam family nested in this one',\n NL: 'Nesting location',\n NH: 'Tree (Newick)',\n SQ: 'Number of sequences',\n RC: 'Reference comment',\n RN: 'Reference number',\n RM: 'PubMed ID',\n RT: 'Reference title',\n RA: 'Reference authors',\n RL: 'Reference journal',\n CB: 'Curation: build',\n DC: 'Database comment',\n DW: 'Database web link',\n OS: 'Organism',\n OC: 'Organism classification',\n AM: 'Alignment method',\n FT: 'Feature',\n SO: 'Sequence Ontology term',\n}\n\nexport const referenceFieldLabels: Record<string, string> = {\n RT: 'Title',\n RA: 'Authors',\n RL: 'Journal',\n RM: 'PubMed',\n RC: 'Comment',\n}\n\nexport const monospaceKeys = new Set(['NH'])\n", "import React from 'react'\n\nimport { referenceFieldLabels } from './metadataLabels.ts'\n\nconst referenceTags = ['RM', 'RT', 'RA', 'RL', 'RC'] as const\n\nfunction pubmed(id: string) {\n return /^\\d+$/.test(id) ? (\n <a\n href={`https://pubmed.ncbi.nlm.nih.gov/${id}/`}\n target=\"_blank\"\n rel=\"noreferrer\"\n >\n {id}\n </a>\n ) : (\n id\n )\n}\n\nfunction groupReferences(general: Record<string, unknown>) {\n const numbers = general.RN\n if (!Array.isArray(numbers) || numbers.length === 0) {\n return general\n }\n const present = referenceTags.filter(tag => general[tag] != null)\n const aligned = present.every(tag => {\n const values = general[tag]\n return Array.isArray(values) && values.length === numbers.length\n })\n if (!aligned) {\n return general\n }\n const rest = Object.fromEntries(\n Object.entries(general).filter(\n ([tag]) =>\n tag !== 'RN' && !(referenceTags as readonly string[]).includes(tag),\n ),\n )\n const references = Object.fromEntries(\n numbers.map((number: string, i) => [\n number,\n Object.fromEntries(\n present.map(tag => {\n const value = (general[tag] as string[])[i]!\n return [\n referenceFieldLabels[tag],\n tag === 'RM' ? pubmed(value) : value,\n ]\n }),\n ),\n ]),\n )\n return { ...rest, References: references }\n}\n\nexport function groupGeneral(general: unknown) {\n return general && typeof general === 'object'\n ? groupReferences(general as Record<string, unknown>)\n : {}\n}\n"],
|
|
5
5
|
"mappings": "ycAAA,IAAAA,EAAkB,SAElBC,EAAuB,SACvBC,EAA0C,SAC1CC,EAAyB,SCJlB,IAAMC,EAAwC,CACnD,QAAS,YACT,WAAY,iBACZ,OAAQ,wBAGGC,EAAmC,CAC9C,GAAI,aACJ,GAAI,YACJ,GAAI,cACJ,GAAI,UACJ,GAAI,iBACJ,GAAI,sBACJ,GAAI,eACJ,GAAI,gBACJ,GAAI,sBACJ,GAAI,iBACJ,GAAI,eACJ,GAAI,cACJ,GAAI,OACJ,GAAI,eACJ,GAAI,uBACJ,GAAI,sBACJ,GAAI,UACJ,GAAI,YACJ,GAAI,iCACJ,GAAI,mBACJ,GAAI,gBACJ,GAAI,sBACJ,GAAI,oBACJ,GAAI,mBACJ,GAAI,YACJ,GAAI,kBACJ,GAAI,oBACJ,GAAI,oBACJ,GAAI,kBACJ,GAAI,mBACJ,GAAI,oBACJ,GAAI,WACJ,GAAI,0BACJ,GAAI,mBACJ,GAAI,UACJ,GAAI,0BAGOC,EAA+C,CAC1D,GAAI,QACJ,GAAI,UACJ,GAAI,UACJ,GAAI,SACJ,GAAI,WAGOC,EAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,ECrD3C,IAAAC,EAAkB,SAIlB,IAAMC,EAAgB,CAAC,KAAM,KAAM,KAAM,KAAM,IAAI,EAEnD,SAASC,EAAOC,EAAU,CACxB,MAAO,QAAQ,KAAKA,CAAE,EACpB,EAAAC,QAAA,cA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,CAAC,CAAC,CAAEC,CAAK,IAAM,CAACG,EAASH,CAAK,CAAC,CAAC,EAE3CI,EAAWL,EAAQ,OAAO,CAAC,CAAC,CAAEC,CAAK,IAAMG,EAASH,CAAK,CAAC,EAC9D,OACE,EAAAK,QAAA,cAAC,SAAM,CACL,QAAS,IAAK,CACZP,EAAO,CACT,EACA,KAAI,GACJ,MAAM,WACN,SAAS,IAAI,EAEb,EAAAO,QAAA,cAAC,gBAAa,KACXN,EAAQ,SAAW,EAClB,EAAAM,QAAA,cAAC,aAAU,KAAA,iCAAA,EAEX,EAAAA,QAAA,cAAA,EAAAA,QAAA,SAAA,KACG,OAAO,KAAKH,CAAM,EAAE,OAAS,EAC5B,EAAAG,QAAA,cAACC,EAAa,CAAC,OAAQJ,CAAM,CAAA,EAC3B,KACHE,EAAS,IAAI,CAAC,CAACG,EAASP,CAAK,IAC5B,EAAAK,QAAA,cAAA,MAAA,CAAK,IAAKE,CAAO,EACf,EAAAF,QAAA,cAAC,aAAU,CAAC,QAAQ,IAAI,EACrBG,EAAcD,CAAO,GAAKA,CAAO,EAEnCA,IAAY,UACX,EAAAF,QAAA,cAACC,EAAa,CACZ,OAAQG,EAAaT,CAAK,EAC1B,OAAQU,EACR,cAAeC,CAAa,CAAA,EAG9B,EAAAN,QAAA,cAACC,EAAa,CAAC,OAAQN,CAAgC,CAAA,CACxD,CAEJ,CAAC,EAGN,EAAAK,QAAA,cAAC,aAAU,CAAC,QAAQ,IAAI,EAAA,WAAA,EACxB,EAAAA,QAAA,cAACO,EAAgB,CAAC,IAAKf,EAAM,IAAI,CAAA,CAAI,CACvB,CAGtB,CAAC,EAEDgB,EAAejB",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_material", "import_mobx_react", "sectionLabels", "gfLabels", "referenceFieldLabels", "monospaceKeys", "import_react", "referenceTags", "pubmed", "id", "React", "groupReferences", "general", "numbers", "present", "tag", "values", "rest", "references", "number", "value", "referenceFieldLabels", "groupGeneral", "MetadataDialog", "model", "onClose", "entries", "value", "isEmpty", "fields", "isRecord", "sections", "React", "MetadataTable", "section", "sectionLabels", "groupGeneral", "gfLabels", "monospaceKeys", "SequenceTextArea", "MetadataDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b,c as k,d as C}from"./chunk-KYQ2SO7B.js";import{d as M}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=MsaViewPanel-
|
|
1
|
+
import{a as b,c as k,d as C}from"./chunk-KYQ2SO7B.js";import{d as M}from"./chunk-RTIGCYCA.js";import"./chunk-MDZDMDUF.js";import"./chunk-YTIKINP5.js";import"./chunk-IBVOKJV3.js";import"./chunk-YXL36I7H.js";import"./chunk-FCWXYIFC.js";import{a as B}from"./chunk-M2AAIXY5.js";import"./chunk-6GRHBYHB.js";import"./chunk-QWXSEUZI.js";import"./chunk-K55ZVN73.js";import{a as L}from"./chunk-NSASZ5FM.js";import"./chunk-EKTRLQV7.js";import"./chunk-W5VCM3IV.js";import"./chunk-4IRL4OLU.js";import"./chunk-73KAPCJ2.js";import"./chunk-Y7M36762.js";import{a as y}from"./chunk-CVLB4VFP.js";import{a as P}from"./chunk-DNFD5II2.js";import{a as w}from"./chunk-BX4Z274Q.js";import{a as h}from"./chunk-J6KYLXRD.js";import{b as i}from"./chunk-FY3BTKY4.js";var e=i(h()),z=i(P()),E=i(y());var I=i(L());var o=i(h()),d=i(P()),n=i(w()),S=i(y()),x=i(L());var c=i(h()),J=i(w());function N({jobId:s}){let r=C(s)?k(s):b(s);return c.default.createElement(J.Typography,null,"Job ",s," (",c.default.createElement(B,{href:r},"see status"),")")}var v=N;var U=(0,x.makeStyles)()({margin:{padding:20},progressRow:{display:"flex",alignItems:"center",gap:12}}),D=(0,S.observer)(function({model:r}){let{progress:u,rid:a,error:m}=r,{classes:t}=U(),f=!r.launchCompleted,{blastParams:l,orthologParams:g}=r,p=l?`Running EBI ${l.searchProgram==="phmmer"?"phmmer":"BLAST"}`:g?g.source==="uniref"?"Building UniRef homolog alignment":"Building ortholog alignment":"Loading alignment";return o.default.createElement("div",{className:t.margin},m?o.default.createElement(o.default.Fragment,null,o.default.createElement(n.Typography,{variant:"h5"},f?`${p} failed`:"Alignment no longer available"),a?o.default.createElement(v,{jobId:a}):null,o.default.createElement(d.ErrorMessage,{error:m}),o.default.createElement("div",{className:t.progressRow},o.default.createElement(n.Button,{variant:"outlined",size:"small",onClick:()=>{r.retryLaunch()}},"Retry"),o.default.createElement(n.Button,{variant:"outlined",size:"small",onClick:()=>{r.cancelLaunch()}},"Dismiss"))):o.default.createElement(o.default.Fragment,null,o.default.createElement(d.LoadingEllipses,{message:p,variant:"h5"}),a?o.default.createElement(v,{jobId:a}):null,o.default.createElement("div",{className:t.progressRow},o.default.createElement(n.Typography,null,u||"Initializing"),o.default.createElement(n.Button,{variant:"outlined",size:"small",onClick:()=>{r.cancelLaunch()}},"Cancel"))))}),V=D;var $=(0,I.makeStyles)()({loadingContainer:{padding:20}}),q=(0,E.observer)(function({model:r}){let{classes:u}=$(),{blastParams:a,orthologParams:m,init:t,loadingStoredData:f}=r,l=a??m,g=!!l&&!r.launchCompleted,p=!!(r.data.msa||r.data.tree),T=!!l&&!!r.error&&!p,A=g||T||!!t&&!r.dataInitialized;return e.default.createElement("div",null,A?e.default.createElement(V,{model:r}):f&&!r.dataInitialized?e.default.createElement("div",{className:u.loadingContainer},e.default.createElement(z.LoadingEllipses,{message:"Loading MSA data",variant:"h6"})):e.default.createElement(M,{model:r}))}),X=q;export{X as default};
|
|
2
|
+
//# sourceMappingURL=MsaViewPanel-4PHVMXIL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=TrackInfoDialog-
|
|
1
|
+
import{a as l}from"./chunk-GFANDTQR.js";import{a as k}from"./chunk-Y7M36762.js";import{a as p}from"./chunk-CVLB4VFP.js";import{a as f}from"./chunk-DNFD5II2.js";import{a as g}from"./chunk-BX4Z274Q.js";import{a as d}from"./chunk-J6KYLXRD.js";import{b as o}from"./chunk-FY3BTKY4.js";var e=o(d(),1),c=o(f(),1),i=o(k(),1),t=o(g(),1),m=o(p(),1);var E=(0,i.makeStyles)()(a=>({textArea:{padding:a.spacing(2),overflow:"auto",background:a.palette.action.selected,wordBreak:"break-word"}})),x=(0,m.observer)(function({model:a,onClose:n}){let{name:s,data:r}=a,{classes:u}=E();return e.default.createElement(c.Dialog,{open:!0,onClose:n,fullWidth:!0,maxWidth:"lg",title:`Track info - ${s}`},e.default.createElement(t.DialogContent,null,r===void 0?e.default.createElement(t.Typography,null,"This track has no text data."):e.default.createElement(e.default.Fragment,null,e.default.createElement(l,{text:r}),e.default.createElement("pre",{className:u.textArea},r))),e.default.createElement(t.DialogActions,null,e.default.createElement(t.Button,{variant:"contained",onClick:n,color:"secondary"},"Close")))}),h=x;export{h as default};
|
|
2
|
+
//# sourceMappingURL=TrackInfoDialog-WJAJNV5S.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@9.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@9.8.0_a4121c98828e538e8b3708814bbfe622/node_modules/react-msaview/src/components/dialogs/TrackInfoDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\n\nimport { Dialog } from '@jbrowse/core/ui'\nimport { makeStyles } from '@jbrowse/core/util/tss-react'\nimport { Button, DialogActions, DialogContent, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\n\nimport CopyButton from '../CopyButton.tsx'\n\nimport type { BasicTrack } from '../../types.ts'\n\nconst useStyles = makeStyles()(theme => ({\n textArea: {\n padding: theme.spacing(2),\n overflow: 'auto',\n background: theme.palette.action.selected,\n wordBreak: 'break-word',\n },\n}))\n\nconst TrackInfoDialog = observer(function ({\n model,\n onClose,\n}: {\n model: BasicTrack['model']\n onClose: () => void\n}) {\n const { name, data } = model\n const { classes } = useStyles()\n return (\n <Dialog\n open\n onClose={onClose}\n fullWidth\n maxWidth=\"lg\"\n title={`Track info - ${name}`}\n >\n <DialogContent>\n {/* the bar tracks (conservation) are computed per column and carry no\n text of their own, so there is nothing to show or copy for them */}\n {data === undefined ? (\n <Typography>This track has no text data.</Typography>\n ) : (\n <>\n <CopyButton text={data} />\n <pre className={classes.textArea}>{data}</pre>\n </>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={onClose} color=\"secondary\">\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default TrackInfoDialog\n"],
|
|
5
5
|
"mappings": "wRAAA,IAAAA,EAAkB,SAElBC,EAAuB,SACvBC,EAA2B,SAC3BC,EAAiE,SACjEC,EAAyB,SAMzB,IAAMC,KAAY,cAAU,EAAGC,IAAU,CACvC,SAAU,CACR,QAASA,EAAM,QAAQ,CAAC,EACxB,SAAU,OACV,WAAYA,EAAM,QAAQ,OAAO,SACjC,UAAW,eAEb,EAEIC,KAAkB,YAAS,SAAU,CACzC,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,GAAM,CAAE,KAAAC,EAAM,KAAAC,CAAI,EAAKH,EACjB,CAAE,QAAAI,CAAO,EAAKP,EAAS,EAC7B,OACE,EAAAQ,QAAA,cAAC,SAAM,CACL,KAAI,GACJ,QAASJ,EACT,UAAS,GACT,SAAS,KACT,MAAO,gBAAgBC,CAAI,EAAE,EAE7B,EAAAG,QAAA,cAAC,gBAAa,KAGXF,IAAS,OACR,EAAAE,QAAA,cAAC,aAAU,KAAA,8BAAA,EAEX,EAAAA,QAAA,cAAA,EAAAA,QAAA,SAAA,KACE,EAAAA,QAAA,cAACC,EAAU,CAAC,KAAMH,CAAI,CAAA,EACtB,EAAAE,QAAA,cAAA,MAAA,CAAK,UAAWD,EAAQ,QAAQ,EAAGD,CAAI,CAAO,CAEjD,EAEH,EAAAE,QAAA,cAAC,gBAAa,KACZ,EAAAA,QAAA,cAAC,SAAM,CAAC,QAAQ,YAAY,QAASJ,EAAS,MAAM,WAAW,EAAA,OAAA,CAEtD,CACK,CAGtB,CAAC,EAEDM,EAAeR",
|
|
6
6
|
"names": ["import_react", "import_ui", "import_tss_react", "import_material", "import_mobx_react", "useStyles", "theme", "TrackInfoDialog", "model", "onClose", "name", "data", "classes", "React", "CopyButton", "TrackInfoDialog_default"]
|