jbrowse-plugin-msaview 5.16.1 → 5.17.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/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +12 -4
- package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.d.ts +6 -2
- package/dist/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.js +4 -4
- package/dist/LaunchMsaView/components/pickSelectedId.test.d.ts +1 -0
- package/dist/LaunchMsaView/components/pickSelectedId.test.js +17 -0
- package/dist/LaunchMsaView/components/useTranscriptSelection.d.ts +1 -0
- package/dist/LaunchMsaView/components/useTranscriptSelection.js +1 -1
- package/dist/LaunchMsaView/detectQueryRow.d.ts +1 -1
- package/dist/LaunchMsaView/detectQueryRow.js +37 -25
- package/dist/LaunchMsaView/detectQueryRow.test.js +9 -0
- package/dist/LaunchMsaView/useQueryRowName.d.ts +1 -1
- package/dist/LaunchMsaView/useQueryRowName.js +2 -2
- package/dist/MsaViewPanel/model.d.ts +49 -36
- package/dist/MsaViewPanel/storedData.test.js +4 -4
- package/dist/OrthoFinderMsaAdapter/OrthoFinderMsaAdapter.d.ts +9 -6
- package/dist/OrthoFinderMsaAdapter/OrthoFinderMsaAdapter.js +50 -19
- package/dist/OrthoFinderMsaAdapter/parseResults.d.ts +20 -5
- package/dist/OrthoFinderMsaAdapter/parseResults.js +32 -14
- package/dist/OrthoFinderMsaAdapter/parseResults.test.js +25 -7
- package/dist/chunks/{AboutDialog-UIDZTTTE.js → AboutDialog-CFANNPHL.js} +2 -2
- package/dist/chunks/{AboutDialog-UIDZTTTE.js.map → AboutDialog-CFANNPHL.js.map} +1 -1
- package/dist/chunks/AnnotationFileDialog-27HTSCJC.js +2 -0
- package/dist/chunks/{AnnotationFileDialog-TFIHQACD.js.map → AnnotationFileDialog-27HTSCJC.js.map} +3 -3
- package/dist/chunks/{ExportSVGDialog-AYE4AXS3.js → ExportSVGDialog-P4ICAFJQ.js} +2 -2
- package/dist/chunks/{ExportSVGDialog-AYE4AXS3.js.map → ExportSVGDialog-P4ICAFJQ.js.map} +1 -1
- package/dist/chunks/{FeatureDialog-XHNPLPWX.js → FeatureDialog-Z5SUYFEB.js} +1 -1
- package/dist/chunks/{FeatureDialog-XHNPLPWX.js.map → FeatureDialog-Z5SUYFEB.js.map} +1 -1
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js → GapThresholdDialog-B5NC7QTB.js} +1 -1
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js.map → GapThresholdDialog-B5NC7QTB.js.map} +1 -1
- package/dist/chunks/{GoToDialog-U3TQYXIE.js → GoToDialog-WWXYDZPR.js} +2 -2
- package/dist/chunks/{GoToDialog-U3TQYXIE.js.map → GoToDialog-WWXYDZPR.js.map} +1 -1
- package/dist/chunks/{HelpDialog-QS4T2P3K.js → HelpDialog-57HMNKIZ.js} +2 -2
- package/dist/chunks/{HelpDialog-QS4T2P3K.js.map → HelpDialog-57HMNKIZ.js.map} +1 -1
- package/dist/chunks/LaunchMsaViewDialog-KKO7NN7P.js +3 -0
- package/dist/chunks/LaunchMsaViewDialog-KKO7NN7P.js.map +7 -0
- package/dist/chunks/MetadataDialog-SFIPDR72.js +2 -0
- package/dist/chunks/{MetadataDialog-BC6EUBOJ.js.map → MetadataDialog-SFIPDR72.js.map} +2 -2
- package/dist/chunks/MsaViewPanel-SVYEMEJP.js +2 -0
- package/dist/chunks/{MsaViewPanel-6ETJVX27.js.map → MsaViewPanel-SVYEMEJP.js.map} +1 -1
- package/dist/chunks/OrthoFinderMsaAdapter-BAVVTZHO.js +2 -0
- package/dist/chunks/OrthoFinderMsaAdapter-BAVVTZHO.js.map +7 -0
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js → TrackInfoDialog-J4XUXUQH.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js.map → TrackInfoDialog-J4XUXUQH.js.map} +1 -1
- package/dist/chunks/TreeNodeInfoDialog-QIUEVP45.js +2 -0
- package/dist/chunks/{TreeNodeInfoDialog-W6L2FDRH.js.map → TreeNodeInfoDialog-QIUEVP45.js.map} +2 -2
- package/dist/chunks/chunk-22YOVDVE.js +2 -0
- package/dist/chunks/{chunk-33ER5TMH.js.map → chunk-22YOVDVE.js.map} +1 -1
- package/dist/chunks/{chunk-27DJABXI.js → chunk-7FQ6JH7S.js} +1 -1
- package/dist/chunks/{chunk-27DJABXI.js.map → chunk-7FQ6JH7S.js.map} +3 -3
- package/dist/chunks/chunk-BABZZGON.js +11 -0
- package/dist/chunks/chunk-BABZZGON.js.map +7 -0
- package/dist/chunks/chunk-BLG5QXPZ.js +164 -0
- package/dist/chunks/chunk-BLG5QXPZ.js.map +7 -0
- package/dist/chunks/{chunk-AOTVWTUV.js → chunk-E3VABHAF.js} +1 -1
- package/dist/chunks/{chunk-AOTVWTUV.js.map → chunk-E3VABHAF.js.map} +1 -1
- package/dist/chunks/chunk-FDAPTOY5.js +2 -0
- package/dist/chunks/chunk-FDAPTOY5.js.map +7 -0
- package/dist/chunks/{chunk-ECXGXFKO.js → chunk-GPYMJZZF.js} +1 -1
- package/dist/chunks/{chunk-ECXGXFKO.js.map → chunk-GPYMJZZF.js.map} +1 -1
- package/dist/chunks/chunk-KHRURQPK.js +2 -0
- package/dist/chunks/chunk-KHRURQPK.js.map +7 -0
- package/dist/chunks/{chunk-KKFBYJZN.js → chunk-LGW6EKNG.js} +1 -1
- package/dist/chunks/{chunk-KKFBYJZN.js.map → chunk-LGW6EKNG.js.map} +1 -1
- package/dist/chunks/{chunk-ET6J3BQX.js → chunk-LVLHKLUU.js} +2 -2
- package/dist/chunks/{chunk-L75R2CI3.js → chunk-NFZIT4K6.js} +4 -4
- package/dist/chunks/{chunk-L75R2CI3.js.map → chunk-NFZIT4K6.js.map} +1 -1
- package/dist/chunks/{chunk-FYL5SHOE.js → chunk-OU67QSXA.js} +1 -1
- package/dist/chunks/{chunk-FYL5SHOE.js.map → chunk-OU67QSXA.js.map} +1 -1
- package/dist/chunks/{chunk-UUDUJ6ZF.js → chunk-RE52WXM7.js} +1 -1
- package/dist/chunks/{chunk-UUDUJ6ZF.js.map → chunk-RE52WXM7.js.map} +1 -1
- package/dist/chunks/chunk-TF47C6NI.js +2 -0
- package/dist/chunks/chunk-TF47C6NI.js.map +7 -0
- package/dist/chunks/{chunk-7JFWQZNK.js → chunk-WKZK7ZZ4.js} +2 -2
- package/dist/chunks/{chunk-7JFWQZNK.js.map → chunk-WKZK7ZZ4.js.map} +1 -1
- package/dist/chunks/dist-DTCYS6P4.js +2 -0
- package/dist/chunks/dist-DTCYS6P4.js.map +7 -0
- package/dist/chunks/dist-E47QTFWN.js +2 -0
- package/dist/chunks/{model-XMH3QSZV.js → model-S32FGNSJ.js} +2 -2
- package/dist/chunks/{model-XMH3QSZV.js.map → model-S32FGNSJ.js.map} +1 -1
- package/dist/chunks/{renderToSvg-VO23YN7B.js → renderToSvg-W5UFFKE3.js} +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js +2 -2
- 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 +3 -3
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +18 -5
- package/src/LaunchMsaView/components/PreLoadedMSA/fetchMSAData.ts +12 -4
- package/src/LaunchMsaView/components/pickSelectedId.test.ts +24 -0
- package/src/LaunchMsaView/components/useTranscriptSelection.ts +1 -1
- package/src/LaunchMsaView/detectQueryRow.test.ts +11 -0
- package/src/LaunchMsaView/detectQueryRow.ts +49 -33
- package/src/LaunchMsaView/useQueryRowName.ts +7 -3
- package/src/MsaViewPanel/storedData.test.ts +4 -4
- package/src/OrthoFinderMsaAdapter/OrthoFinderMsaAdapter.ts +61 -24
- package/src/OrthoFinderMsaAdapter/parseResults.test.ts +34 -7
- package/src/OrthoFinderMsaAdapter/parseResults.ts +42 -14
- package/src/version.ts +1 -1
- package/dist/chunks/AnnotationFileDialog-TFIHQACD.js +0 -2
- package/dist/chunks/LaunchMsaViewDialog-H23R3EDJ.js +0 -3
- package/dist/chunks/LaunchMsaViewDialog-H23R3EDJ.js.map +0 -7
- package/dist/chunks/MetadataDialog-BC6EUBOJ.js +0 -2
- package/dist/chunks/MsaViewPanel-6ETJVX27.js +0 -2
- package/dist/chunks/OrthoFinderMsaAdapter-I366HWAA.js +0 -2
- package/dist/chunks/OrthoFinderMsaAdapter-I366HWAA.js.map +0 -7
- package/dist/chunks/TreeNodeInfoDialog-W6L2FDRH.js +0 -2
- package/dist/chunks/chunk-33ER5TMH.js +0 -2
- package/dist/chunks/chunk-7WGSBPHS.js +0 -6
- package/dist/chunks/chunk-7WGSBPHS.js.map +0 -7
- package/dist/chunks/chunk-K55ZVN73.js +0 -5
- package/dist/chunks/chunk-K55ZVN73.js.map +0 -7
- package/dist/chunks/chunk-NDUZUXDJ.js +0 -2
- package/dist/chunks/chunk-NDUZUXDJ.js.map +0 -7
- package/dist/chunks/chunk-TEQX6FF3.js +0 -164
- package/dist/chunks/chunk-TEQX6FF3.js.map +0 -7
- package/dist/chunks/chunk-TVOPZHTJ.js +0 -2
- package/dist/chunks/chunk-TVOPZHTJ.js.map +0 -7
- package/dist/chunks/chunk-YXL36I7H.js +0 -8
- package/dist/chunks/chunk-YXL36I7H.js.map +0 -7
- package/dist/chunks/dist-34WACJJR.js +0 -2
- package/dist/chunks/dist-34WACJJR.js.map +0 -7
- package/dist/chunks/dist-NZDQ46PF.js +0 -2
- /package/dist/chunks/{chunk-ET6J3BQX.js.map → chunk-LVLHKLUU.js.map} +0 -0
- /package/dist/chunks/{dist-NZDQ46PF.js.map → dist-E47QTFWN.js.map} +0 -0
- /package/dist/chunks/{renderToSvg-VO23YN7B.js.map → renderToSvg-W5UFFKE3.js.map} +0 -0
|
@@ -28,11 +28,18 @@ const PreLoadedMSA = observer(function ({ model, feature, handleClose, preferred
|
|
|
28
28
|
const { classes } = useStyles();
|
|
29
29
|
const { pluginManager } = getEnv(model);
|
|
30
30
|
const { assemblyNames } = view;
|
|
31
|
+
const assemblyName = assemblyNames[0];
|
|
31
32
|
const { launchError, submit } = useLaunchSubmit(handleClose);
|
|
32
33
|
const datasets = readMsaDatasets(session.jbrowse);
|
|
33
34
|
const [selectedDatasetId, setSelectedDatasetId] = useState(datasets?.[0]?.datasetId);
|
|
34
35
|
const selectedDataset = datasets?.find(d => d.datasetId === selectedDatasetId);
|
|
35
|
-
const { data: msaList, isLoading: msaListLoading, error: msaListFetchError, } = useFetch(selectedDataset
|
|
36
|
+
const { data: msaList, isLoading: msaListLoading, error: msaListFetchError, } = useFetch(selectedDataset
|
|
37
|
+
? `${selectedDataset.datasetId}-${assemblyName}-msa-list`
|
|
38
|
+
: null, () => fetchMSAList({
|
|
39
|
+
config: selectedDataset.adapter,
|
|
40
|
+
pluginManager,
|
|
41
|
+
assemblyName,
|
|
42
|
+
}));
|
|
36
43
|
const msaIds = useMemo(() => msaList && new Set(msaList), [msaList]);
|
|
37
44
|
const transcriptSelection = useTranscriptSelection({
|
|
38
45
|
feature,
|
|
@@ -49,9 +56,10 @@ const PreLoadedMSA = observer(function ({ model, feature, handleClose, preferred
|
|
|
49
56
|
? findDatasetId(selectedTranscript, feature, msaIds)
|
|
50
57
|
: undefined;
|
|
51
58
|
const { data: msaData, isLoading: msaDataLoading, error: msaDataFetchError, } = useFetch(msaId && selectedDataset
|
|
52
|
-
? `${selectedDataset.datasetId}-${msaId}-msa`
|
|
59
|
+
? `${selectedDataset.datasetId}-${assemblyName}-${msaId}-msa`
|
|
53
60
|
: null, () => fetchMSA({
|
|
54
61
|
msaId: msaId,
|
|
62
|
+
assemblyName,
|
|
55
63
|
config: selectedDataset.adapter,
|
|
56
64
|
pluginManager,
|
|
57
65
|
}));
|
|
@@ -61,12 +69,12 @@ const PreLoadedMSA = observer(function ({ model, feature, handleClose, preferred
|
|
|
61
69
|
// checked, and a name the alignment does not carry fails silently: the view
|
|
62
70
|
// opens, renders, and never navigates. The row is found by sequence instead,
|
|
63
71
|
// the same way the Manual tab finds it.
|
|
64
|
-
const queryRow = useQueryRowName(msaText, proteinSequence);
|
|
72
|
+
const queryRow = useQueryRowName(msaText, proteinSequence, msaData?.queryRowName);
|
|
65
73
|
// The name this panel used to launch with unconditionally. A dataset built to
|
|
66
74
|
// that convention does carry the row, so it is worth falling back to when the
|
|
67
75
|
// residues do not match closely enough to find it -- but only when the
|
|
68
76
|
// alignment really has it, which is the check the old code never made.
|
|
69
|
-
const querySeqName = resolveQueryRowName(queryRow, `${msaId ?? ''}_${
|
|
77
|
+
const querySeqName = resolveQueryRowName(queryRow, `${msaId ?? ''}_${assemblyName ?? ''}`);
|
|
70
78
|
const e = msaListFetchError ??
|
|
71
79
|
msaDataFetchError ??
|
|
72
80
|
transcriptSelection.error ??
|
|
@@ -3,13 +3,17 @@ import type { AnyConfigurationModel } from '@jbrowse/core/configuration';
|
|
|
3
3
|
export interface DatasetMsa {
|
|
4
4
|
msa: string;
|
|
5
5
|
tree?: string;
|
|
6
|
+
/** the row the dataset names as the protein's own, preferred over a row that matches it equally */
|
|
7
|
+
queryRowName?: string;
|
|
6
8
|
}
|
|
7
|
-
export declare function fetchMSAList({ config, pluginManager, }: {
|
|
9
|
+
export declare function fetchMSAList({ config, pluginManager, assemblyName, }: {
|
|
8
10
|
config: AnyConfigurationModel;
|
|
9
11
|
pluginManager: PluginManager;
|
|
12
|
+
assemblyName?: string;
|
|
10
13
|
}): Promise<string[]>;
|
|
11
|
-
export declare function fetchMSA({ config, pluginManager, msaId, }: {
|
|
14
|
+
export declare function fetchMSA({ config, pluginManager, msaId, assemblyName, }: {
|
|
12
15
|
config: AnyConfigurationModel;
|
|
13
16
|
pluginManager: PluginManager;
|
|
14
17
|
msaId: string;
|
|
18
|
+
assemblyName?: string;
|
|
15
19
|
}): Promise<DatasetMsa>;
|
|
@@ -3,11 +3,11 @@ async function getMsaAdapter(pluginManager, config) {
|
|
|
3
3
|
const result = await getAdapter(pluginManager, 'msa', config);
|
|
4
4
|
return result.dataAdapter;
|
|
5
5
|
}
|
|
6
|
-
export async function fetchMSAList({ config, pluginManager, }) {
|
|
6
|
+
export async function fetchMSAList({ config, pluginManager, assemblyName, }) {
|
|
7
7
|
const adapter = await getMsaAdapter(pluginManager, config);
|
|
8
|
-
return adapter.getMSAList();
|
|
8
|
+
return adapter.getMSAList(assemblyName);
|
|
9
9
|
}
|
|
10
|
-
export async function fetchMSA({ config, pluginManager, msaId, }) {
|
|
10
|
+
export async function fetchMSA({ config, pluginManager, msaId, assemblyName, }) {
|
|
11
11
|
const adapter = await getMsaAdapter(pluginManager, config);
|
|
12
|
-
return adapter.getMSA(msaId);
|
|
12
|
+
return adapter.getMSA(msaId, assemblyName);
|
|
13
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SimpleFeature } from '@jbrowse/core/util';
|
|
2
|
+
import { expect, test } from 'vitest';
|
|
3
|
+
import { pickSelectedId } from './useTranscriptSelection';
|
|
4
|
+
const transcript = (id) => new SimpleFeature({ uniqueId: id, refName: '2L', start: 0, end: 10 });
|
|
5
|
+
const options = ['t1', 't2', 't3'].map(transcript);
|
|
6
|
+
test('with no hasData the selection always stands', () => {
|
|
7
|
+
expect(pickSelectedId('t2', options, undefined)).toBe('t2');
|
|
8
|
+
});
|
|
9
|
+
test('a selection with data stands', () => {
|
|
10
|
+
expect(pickSelectedId('t2', options, () => true)).toBe('t2');
|
|
11
|
+
});
|
|
12
|
+
test('a selection without data moves to the first option that has some', () => {
|
|
13
|
+
expect(pickSelectedId('t1', options, t => t.id() !== 't1')).toBe('t2');
|
|
14
|
+
});
|
|
15
|
+
test('with no option holding data the selection stands', () => {
|
|
16
|
+
expect(pickSelectedId('t3', options, () => false)).toBe('t3');
|
|
17
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SequenceStatus } from './SequenceStatus';
|
|
2
2
|
import type { Feature } from '@jbrowse/core/util';
|
|
3
|
+
export declare function pickSelectedId(currentId: string, options: Feature[], hasData: ((transcript: Feature) => boolean) | undefined): string;
|
|
3
4
|
export declare function useTranscriptSelection({ feature, view, hasData, preferredTranscriptId, }: {
|
|
4
5
|
feature: Feature;
|
|
5
6
|
view: {
|
|
@@ -4,7 +4,7 @@ import { useFeatureSequence } from './useFeatureSequence';
|
|
|
4
4
|
// Keep the current selection if it has data, otherwise fall back to the first
|
|
5
5
|
// option that does (or the current id if none do). With no hasData constraint
|
|
6
6
|
// the current selection always stands.
|
|
7
|
-
function pickSelectedId(currentId, options, hasData) {
|
|
7
|
+
export function pickSelectedId(currentId, options, hasData) {
|
|
8
8
|
if (!hasData) {
|
|
9
9
|
return currentId;
|
|
10
10
|
}
|
|
@@ -44,4 +44,4 @@ export interface MsaQueryRow {
|
|
|
44
44
|
* wanted on every keystroke in the paste box, and asking separately parsed a
|
|
45
45
|
* few-hundred-row alignment twice per character.
|
|
46
46
|
*/
|
|
47
|
-
export declare function findQueryRow(msaText: string, proteinSequence: string): MsaQueryRow;
|
|
47
|
+
export declare function findQueryRow(msaText: string, proteinSequence: string, preferredName?: string): MsaQueryRow;
|
|
@@ -41,7 +41,7 @@ const PARTIAL_COVERAGE_FLOOR = 0.5;
|
|
|
41
41
|
* wanted on every keystroke in the paste box, and asking separately parsed a
|
|
42
42
|
* few-hundred-row alignment twice per character.
|
|
43
43
|
*/
|
|
44
|
-
export function findQueryRow(msaText, proteinSequence) {
|
|
44
|
+
export function findQueryRow(msaText, proteinSequence, preferredName) {
|
|
45
45
|
if (!msaText.trim()) {
|
|
46
46
|
return { names: [] };
|
|
47
47
|
}
|
|
@@ -56,42 +56,54 @@ export function findQueryRow(msaText, proteinSequence) {
|
|
|
56
56
|
}
|
|
57
57
|
const names = parsed.getNames();
|
|
58
58
|
const query = normalize(proteinSequence);
|
|
59
|
-
return {
|
|
59
|
+
return {
|
|
60
|
+
names,
|
|
61
|
+
match: query ? bestMatch(parsed, names, query, preferredName) : undefined,
|
|
62
|
+
};
|
|
60
63
|
}
|
|
61
|
-
function
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return { name, quality: 'exact', identity: 1, offset: 0 };
|
|
71
|
-
}
|
|
64
|
+
function scoreRow(parsed, name, query) {
|
|
65
|
+
const row = normalize(getUngappedSequence(parsed.getRow(name)));
|
|
66
|
+
if (!row) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
else if (row === query) {
|
|
70
|
+
return { name, quality: 'exact', identity: 1, offset: 0 };
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
72
73
|
// BLAST reports the aligned region, so the row is often the query trimmed
|
|
73
74
|
// at one or both ends rather than the whole protein
|
|
74
75
|
const contained = query.indexOf(row);
|
|
75
76
|
const containing = row.indexOf(query);
|
|
76
77
|
if (contained !== -1 || containing !== -1) {
|
|
77
78
|
const coverage = Math.min(row.length, query.length) / Math.max(row.length, query.length);
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
return coverage >= PARTIAL_COVERAGE_FLOOR
|
|
80
|
+
? {
|
|
80
81
|
name,
|
|
81
82
|
quality: 'partial',
|
|
82
83
|
identity: coverage,
|
|
83
84
|
offset: contained === -1 ? -containing : contained,
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
continue;
|
|
85
|
+
}
|
|
86
|
+
: undefined;
|
|
87
87
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
else {
|
|
89
|
+
const identity = identityOverOverlap(row, query);
|
|
90
|
+
return identity >= SIMILARITY_FLOOR
|
|
91
|
+
? { name, quality: 'similar', identity, offset: 0 }
|
|
92
|
+
: undefined;
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
}
|
|
96
|
+
const qualityOrder = ['exact', 'partial', 'similar'];
|
|
97
|
+
/**
|
|
98
|
+
* The row matching the protein best. A paralog with an identical protein
|
|
99
|
+
* matches exactly as well as the query does, so a row the dataset itself names
|
|
100
|
+
* as the protein's own wins any tie.
|
|
101
|
+
*/
|
|
102
|
+
function bestMatch(parsed, names, query, preferredName) {
|
|
103
|
+
return names
|
|
104
|
+
.map(name => scoreRow(parsed, name, query))
|
|
105
|
+
.filter(match => match !== undefined)
|
|
106
|
+
.sort((a, b) => qualityOrder.indexOf(a.quality) - qualityOrder.indexOf(b.quality) ||
|
|
107
|
+
b.identity - a.identity ||
|
|
108
|
+
Number(b.name === preferredName) - Number(a.name === preferredName))[0];
|
|
97
109
|
}
|
|
@@ -93,3 +93,12 @@ describe('findQueryRow row names', () => {
|
|
|
93
93
|
expect(findQueryRow('', protein).names).toEqual([]);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
+
test("an identical paralog loses the tie to the row the dataset names as the protein's own", () => {
|
|
97
|
+
const msa = '>sp_H4copy\nMSGRGKGG\n>sp_His4r\nMSGRGKGG\n>sp_other\nMSGRGKAA\n';
|
|
98
|
+
expect(findQueryRow(msa, 'MSGRGKGG').match?.name).toBe('sp_H4copy');
|
|
99
|
+
expect(findQueryRow(msa, 'MSGRGKGG', 'sp_His4r').match?.name).toBe('sp_His4r');
|
|
100
|
+
});
|
|
101
|
+
test('a named row that matches worse than another does not win', () => {
|
|
102
|
+
const msa = '>sp_exact\nMSGRGKGG\n>sp_named\nMSGRGKAA\n';
|
|
103
|
+
expect(findQueryRow(msa, 'MSGRGKGG', 'sp_named').match?.name).toBe('sp_exact');
|
|
104
|
+
});
|
|
@@ -18,7 +18,7 @@ export declare function resolveQueryRowName(queryRow: {
|
|
|
18
18
|
querySeqName: string;
|
|
19
19
|
names: string[];
|
|
20
20
|
}, fallback: string): string;
|
|
21
|
-
export declare function useQueryRowName(msaText: string, proteinSequence: string): {
|
|
21
|
+
export declare function useQueryRowName(msaText: string, proteinSequence: string, preferredName?: string): {
|
|
22
22
|
detected: import("./detectQueryRow").QueryRowMatch | undefined;
|
|
23
23
|
names: string[];
|
|
24
24
|
querySeqName: string;
|
|
@@ -19,11 +19,11 @@ import { findQueryRow } from './detectQueryRow';
|
|
|
19
19
|
export function resolveQueryRowName(queryRow, fallback) {
|
|
20
20
|
return (queryRow.querySeqName || (queryRow.names.includes(fallback) ? fallback : ''));
|
|
21
21
|
}
|
|
22
|
-
export function useQueryRowName(msaText, proteinSequence) {
|
|
22
|
+
export function useQueryRowName(msaText, proteinSequence, preferredName) {
|
|
23
23
|
const [override, setOverride] = useState();
|
|
24
24
|
// parsing runs on every keystroke in the paste box otherwise, and an
|
|
25
25
|
// alignment of a few hundred rows is not free
|
|
26
|
-
const { names, match } = useMemo(() => findQueryRow(msaText, proteinSequence), [msaText, proteinSequence]);
|
|
26
|
+
const { names, match } = useMemo(() => findQueryRow(msaText, proteinSequence, preferredName), [msaText, proteinSequence, preferredName]);
|
|
27
27
|
// a row picked from one alignment says nothing about the next one pasted
|
|
28
28
|
const picked = override !== undefined && (names.length === 0 || names.includes(override))
|
|
29
29
|
? override
|
|
@@ -112,7 +112,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
112
112
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
113
113
|
displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
114
114
|
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
115
|
-
}, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
115
|
+
}, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "cladesSeeded" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
116
116
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
117
117
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
118
118
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
@@ -129,8 +129,8 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
129
129
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
130
130
|
customColorScheme: import("@jbrowse/mobx-state-tree").IType<Record<string, string> | undefined, Record<string, string> | undefined, Record<string, string> | undefined>;
|
|
131
131
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
132
|
-
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("
|
|
133
|
-
}, "id" | "type" | "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & {
|
|
132
|
+
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
|
|
133
|
+
}, "id" | "type" | "allowedGappyness" | "clades" | "cladesSeeded" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & {
|
|
134
134
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
135
135
|
showDomains: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
136
136
|
domainFill: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -473,9 +473,10 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
473
473
|
rotated: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
474
474
|
treeRoot: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").TreeRoot | undefined, import("react-msaview").TreeRoot | undefined, import("react-msaview").TreeRoot | undefined>;
|
|
475
475
|
showOnly: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
476
|
+
cladesSeeded: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
476
477
|
turnedOffTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
|
|
477
478
|
trackHeights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<number>>, [undefined]>;
|
|
478
|
-
columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
479
|
+
columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").ColumnTrackSpec, import("react-msaview").ColumnTrackSpec, import("react-msaview").ColumnTrackSpec>>, [undefined]>;
|
|
479
480
|
residueMappings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").ResidueMapping, import("react-msaview").ResidueMapping, import("react-msaview").ResidueMapping>>, [undefined]>;
|
|
480
481
|
data: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
481
482
|
tree: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
@@ -498,8 +499,8 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
498
499
|
selection: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").MsaSelection | undefined, import("react-msaview").MsaSelection | undefined, import("react-msaview").MsaSelection | undefined>;
|
|
499
500
|
region: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Region | undefined, import("react-msaview").Region | undefined, import("react-msaview").Region | undefined>;
|
|
500
501
|
clades: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Clade, import("react-msaview").Clade, import("react-msaview").Clade>>, [undefined]>;
|
|
501
|
-
encodings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
502
|
-
rowPanels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
502
|
+
encodings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Encoding, import("react-msaview").Encoding, import("react-msaview").Encoding>>, [undefined]>;
|
|
503
|
+
rowPanels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").RowPanelSpec, import("react-msaview").RowPanelSpec, import("react-msaview").RowPanelSpec>>, [undefined]>;
|
|
503
504
|
}, "init" | "querySeqName" | "embeddedMode" | "launchCompleted" | "connectedViewId" | "connectedFeature" | "connectedTranscript" | "blastParams" | "orthologParams" | "querySeqOffset" | "uniprotId" | "zoomToBaseLevel" | "dataStoreId" | "mafRegion" | "domainsOnGenome"> & {
|
|
504
505
|
connectedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
505
506
|
connectedFeature: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
|
|
@@ -554,9 +555,10 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
554
555
|
setCustomColorScheme(map?: Record<string, string>): void;
|
|
555
556
|
setBgColor(arg: boolean): void;
|
|
556
557
|
setShowColumnStats(arg: boolean): void;
|
|
557
|
-
setMSAFormat(arg?: import("
|
|
558
|
+
setMSAFormat(arg?: import("msa-parsers").MSAFormat): void;
|
|
558
559
|
} & {
|
|
559
560
|
headerHeight: number;
|
|
561
|
+
availableHeight: number | undefined;
|
|
560
562
|
settingsOpen: boolean;
|
|
561
563
|
zoomHeld: {
|
|
562
564
|
col: number;
|
|
@@ -592,7 +594,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
592
594
|
dismissedWarnings: string[];
|
|
593
595
|
resetCount: number;
|
|
594
596
|
hostCarriesData: boolean;
|
|
595
|
-
annotations: import("
|
|
597
|
+
annotations: import("msa-parsers").Annotation[];
|
|
596
598
|
} & {
|
|
597
599
|
drawRelativeTo(id: string | undefined): void;
|
|
598
600
|
setHideGaps(arg: boolean): void;
|
|
@@ -603,6 +605,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
603
605
|
setSettingsOpen(arg: boolean): void;
|
|
604
606
|
setHighResScaleFactor(arg: number): void;
|
|
605
607
|
setHeight(height: number): void;
|
|
608
|
+
setAvailableHeight(height?: number): void;
|
|
606
609
|
setError(error?: unknown): void;
|
|
607
610
|
addWarning(warning: string): void;
|
|
608
611
|
setHostCarriesData(arg: boolean): void;
|
|
@@ -628,6 +631,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
628
631
|
toggleCollapsed(node: string): void;
|
|
629
632
|
toggleRotated(node: string): void;
|
|
630
633
|
clearRotated(): void;
|
|
634
|
+
clearNodeState(): void;
|
|
631
635
|
setTreeRoot(treeRoot?: import("react-msaview").TreeRoot): void;
|
|
632
636
|
setShowOnly(node?: string): void;
|
|
633
637
|
setData(data: {
|
|
@@ -672,8 +676,8 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
672
676
|
readonly rowData: Record<string, Record<string, string> | undefined>;
|
|
673
677
|
rowDataOf(name: string): Record<string, string> | undefined;
|
|
674
678
|
readonly rowFields: string[];
|
|
675
|
-
readonly MSA: import("
|
|
676
|
-
readonly allAnnotations: import("
|
|
679
|
+
readonly MSA: import("msa-parsers").MSAParserType | null;
|
|
680
|
+
readonly allAnnotations: import("msa-parsers").Annotation[];
|
|
677
681
|
readonly actuallyShowDomains: boolean;
|
|
678
682
|
readonly numColumns: number;
|
|
679
683
|
readonly inputTree: import("react-msaview").NodeWithIds;
|
|
@@ -687,9 +691,11 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
687
691
|
names: string[];
|
|
688
692
|
depth: number;
|
|
689
693
|
};
|
|
694
|
+
readonly treeHierarchy: import("react-msaview").HierarchyNode<import("react-msaview").NodeWithIds>;
|
|
690
695
|
readonly maxTipLabelWidth: number;
|
|
691
696
|
readonly labelColumnWidth: number;
|
|
692
697
|
readonly fittedTreeAreaWidth: number;
|
|
698
|
+
readonly effectiveHeight: number;
|
|
693
699
|
readonly effectiveTreeAreaWidth: number;
|
|
694
700
|
readonly effectiveTreeWidth: number;
|
|
695
701
|
readonly showTreeText: boolean;
|
|
@@ -807,12 +813,12 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
807
813
|
readonly topBandHeight: number;
|
|
808
814
|
readonly msaAreaHeight: number;
|
|
809
815
|
readonly totalTrackAreaHeight: number;
|
|
810
|
-
readonly annotationTypes: Map<string, import("
|
|
816
|
+
readonly annotationTypes: Map<string, import("msa-parsers").Annotation>;
|
|
811
817
|
readonly defaultOffAccessions: Set<string>;
|
|
812
818
|
featureOff(accession: string): boolean;
|
|
813
|
-
readonly filteredAnnotations: import("
|
|
819
|
+
readonly filteredAnnotations: import("msa-parsers").Annotation[];
|
|
814
820
|
readonly cellFill: "residue" | "domain" | "none";
|
|
815
|
-
readonly annotationsByRow: Record<string, import("
|
|
821
|
+
readonly annotationsByRow: Record<string, import("msa-parsers").Annotation[]>;
|
|
816
822
|
} & {
|
|
817
823
|
readonly showVerticalScrollbar: boolean;
|
|
818
824
|
} & {
|
|
@@ -838,6 +844,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
838
844
|
setHoveredTreeNode(nodeId?: string): void;
|
|
839
845
|
calculateNeighborJoiningTreeFromMSA(): void;
|
|
840
846
|
rerootAt(nodeId: string): void;
|
|
847
|
+
seedCladeMarks(): void;
|
|
841
848
|
replaceTree(newick: string): void;
|
|
842
849
|
resetZoom(): void;
|
|
843
850
|
zoomAtCenter(scaleFactor: number, axis?: "both" | "horizontal" | "vertical"): void;
|
|
@@ -848,14 +855,14 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
848
855
|
endWheelZoom(): void;
|
|
849
856
|
doScrollY(deltaY: number): void;
|
|
850
857
|
setScrollY(n: number): void;
|
|
851
|
-
setAnnotations(annotations: import("
|
|
858
|
+
setAnnotations(annotations: import("msa-parsers").Annotation[]): void;
|
|
852
859
|
applyGFFText(gffText: string): void;
|
|
853
860
|
doScrollX(deltaX: number): void;
|
|
854
861
|
setScrollX(n: number): void;
|
|
855
|
-
setColumnTracks(tracks:
|
|
862
|
+
setColumnTracks(tracks: import("react-msaview").ColumnTrackSpec[]): void;
|
|
856
863
|
setRowData(rowData: import("react-msaview").RowDataInput): void;
|
|
857
|
-
setEncodings(encodings:
|
|
858
|
-
setRowPanels(panels:
|
|
864
|
+
setEncodings(encodings: import("react-msaview").Encoding[]): void;
|
|
865
|
+
setRowPanels(panels: import("react-msaview").RowPanelSpec[]): void;
|
|
859
866
|
setResidueMappings(mappings: import("react-msaview").ResidueMapping[]): void;
|
|
860
867
|
toggleTrack(id: string): void;
|
|
861
868
|
setTracksShown(ids: string[], shown: boolean): void;
|
|
@@ -868,24 +875,25 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
868
875
|
readonly hoveredCell: import("react-msaview").Cell | undefined;
|
|
869
876
|
readonly clickedCell: import("react-msaview").Cell | undefined;
|
|
870
877
|
readonly viewport: import("react-msaview").Viewport | undefined;
|
|
871
|
-
readonly segmentDomainTypes: import("
|
|
872
|
-
readonly
|
|
878
|
+
readonly segmentDomainTypes: import("msa-parsers").Annotation[];
|
|
879
|
+
readonly domainLegendEntries: import("react-msaview").LegendEntry[];
|
|
880
|
+
readonly categoricalDomainTypes: import("msa-parsers").Annotation[];
|
|
873
881
|
readonly fillPalette: {
|
|
874
882
|
[x: string]: string;
|
|
875
883
|
};
|
|
876
884
|
readonly featureFillEncoding: import("react-msaview").ResolvedEncoding | undefined;
|
|
877
|
-
readonly featureColors: Map<import("
|
|
885
|
+
readonly featureColors: Map<import("msa-parsers").Annotation, {
|
|
878
886
|
fill: string;
|
|
879
887
|
stroke: string;
|
|
880
888
|
}>;
|
|
881
|
-
readonly featureLabels: Map<import("
|
|
889
|
+
readonly featureLabels: Map<import("msa-parsers").Annotation, string> | undefined;
|
|
882
890
|
readonly segmentLabels: Map<string, string>;
|
|
883
|
-
readonly visibleDomainTypes: import("
|
|
891
|
+
readonly visibleDomainTypes: import("msa-parsers").Annotation[];
|
|
884
892
|
readonly legends: import("react-msaview").Legend[];
|
|
885
893
|
readonly domainUnderline: boolean;
|
|
886
894
|
readonly domainBands: Map<string, import("react-msaview").DomainBand[]>;
|
|
887
895
|
readonly domainBandsByStart: Map<string, import("react-msaview").DomainBand[]>;
|
|
888
|
-
readonly mouseOverDomains: import("
|
|
896
|
+
readonly mouseOverDomains: import("msa-parsers").Annotation[];
|
|
889
897
|
readonly referenceRowIndex: number | undefined;
|
|
890
898
|
readonly hoveredRowIndices: number[];
|
|
891
899
|
readonly highlightedColumnRuns: {
|
|
@@ -914,14 +922,16 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
914
922
|
rowData: Record<string, string> | undefined;
|
|
915
923
|
};
|
|
916
924
|
readonly resolvedEncodings: import("react-msaview").ResolvedEncoding[];
|
|
925
|
+
readonly colorEncodings: import("react-msaview").ColorEncoding[];
|
|
926
|
+
encodingFor(channel: import("react-msaview").ColorEncodingChannel): import("react-msaview").ResolvedEncoding | undefined;
|
|
917
927
|
readonly resolvedScales: Map<string, import("react-msaview").SharedScale>;
|
|
918
928
|
scaleOf(channel: import("react-msaview").ColorChannel, table: import("react-msaview").ScaleTable): import("react-msaview").SharedScale;
|
|
919
929
|
readonly rowPanelScales: ({
|
|
920
930
|
header: string;
|
|
921
931
|
field: string;
|
|
922
932
|
kind: "strip";
|
|
923
|
-
legend: import("react-msaview").LegendEntry[];
|
|
924
933
|
colors: Map<string, string>;
|
|
934
|
+
legend: import("react-msaview").LegendEntry[];
|
|
925
935
|
legendKey?: string | undefined;
|
|
926
936
|
legendTitle?: string | undefined;
|
|
927
937
|
} | {
|
|
@@ -929,14 +939,14 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
929
939
|
x: "column" | "position";
|
|
930
940
|
field?: string | undefined;
|
|
931
941
|
kind: "features";
|
|
932
|
-
|
|
933
|
-
colors: Map<import("react-msaview").Annotation, {
|
|
942
|
+
colors: Map<import("msa-parsers").Annotation, {
|
|
934
943
|
fill: string;
|
|
935
944
|
stroke: string;
|
|
936
945
|
}>;
|
|
946
|
+
legend: import("react-msaview").LegendEntry[];
|
|
937
947
|
legendKey?: string | undefined;
|
|
938
948
|
legendTitle?: string | undefined;
|
|
939
|
-
labels?: Map<import("
|
|
949
|
+
labels?: Map<import("msa-parsers").Annotation, string> | undefined;
|
|
940
950
|
})[];
|
|
941
951
|
readonly resolvedRowPanels: import("react-msaview").ResolvedRowPanel[];
|
|
942
952
|
readonly featureAlignShifts: Map<string, Map<string, number>>;
|
|
@@ -1327,7 +1337,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1327
1337
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1328
1338
|
displayName: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1329
1339
|
minimized: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1330
|
-
}, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
1340
|
+
}, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "cladesSeeded" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & Omit<Omit<Omit<{}, "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth"> & {
|
|
1331
1341
|
drawLabels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1332
1342
|
labelsAlignRight: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1333
1343
|
treeAreaWidth: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<number>>;
|
|
@@ -1344,8 +1354,8 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1344
1354
|
colorSchemeName: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1345
1355
|
customColorScheme: import("@jbrowse/mobx-state-tree").IType<Record<string, string> | undefined, Record<string, string> | undefined, Record<string, string> | undefined>;
|
|
1346
1356
|
showColumnStats: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1347
|
-
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("
|
|
1348
|
-
}, "id" | "type" | "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & {
|
|
1357
|
+
msaFormat: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<import("msa-parsers").MSAFormat>>;
|
|
1358
|
+
}, "id" | "type" | "allowedGappyness" | "clades" | "cladesSeeded" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & {
|
|
1349
1359
|
id: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
1350
1360
|
showDomains: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1351
1361
|
domainFill: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
@@ -1688,9 +1698,10 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1688
1698
|
rotated: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
1689
1699
|
treeRoot: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").TreeRoot | undefined, import("react-msaview").TreeRoot | undefined, import("react-msaview").TreeRoot | undefined>;
|
|
1690
1700
|
showOnly: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1701
|
+
cladesSeeded: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1691
1702
|
turnedOffTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>>, [undefined]>;
|
|
1692
1703
|
trackHeights: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IMapType<import("@jbrowse/mobx-state-tree").ISimpleType<number>>, [undefined]>;
|
|
1693
|
-
columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
1704
|
+
columnTracks: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").ColumnTrackSpec, import("react-msaview").ColumnTrackSpec, import("react-msaview").ColumnTrackSpec>>, [undefined]>;
|
|
1694
1705
|
residueMappings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").ResidueMapping, import("react-msaview").ResidueMapping, import("react-msaview").ResidueMapping>>, [undefined]>;
|
|
1695
1706
|
data: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IModelType<{
|
|
1696
1707
|
tree: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
@@ -1713,8 +1724,8 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1713
1724
|
selection: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").MsaSelection | undefined, import("react-msaview").MsaSelection | undefined, import("react-msaview").MsaSelection | undefined>;
|
|
1714
1725
|
region: import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Region | undefined, import("react-msaview").Region | undefined, import("react-msaview").Region | undefined>;
|
|
1715
1726
|
clades: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Clade, import("react-msaview").Clade, import("react-msaview").Clade>>, [undefined]>;
|
|
1716
|
-
encodings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
1717
|
-
rowPanels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").
|
|
1727
|
+
encodings: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").Encoding, import("react-msaview").Encoding, import("react-msaview").Encoding>>, [undefined]>;
|
|
1728
|
+
rowPanels: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").IArrayType<import("@jbrowse/mobx-state-tree").IType<import("react-msaview").RowPanelSpec, import("react-msaview").RowPanelSpec, import("react-msaview").RowPanelSpec>>, [undefined]>;
|
|
1718
1729
|
}, "init" | "querySeqName" | "embeddedMode" | "launchCompleted" | "connectedViewId" | "connectedFeature" | "connectedTranscript" | "blastParams" | "orthologParams" | "querySeqOffset" | "uniprotId" | "zoomToBaseLevel" | "dataStoreId" | "mafRegion" | "domainsOnGenome"> & {
|
|
1719
1730
|
connectedViewId: import("@jbrowse/mobx-state-tree").IMaybe<import("@jbrowse/mobx-state-tree").ISimpleType<string>>;
|
|
1720
1731
|
connectedFeature: import("@jbrowse/mobx-state-tree").IType<any, any, any>;
|
|
@@ -1731,12 +1742,12 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1731
1742
|
mafRegion: import("@jbrowse/mobx-state-tree").IType<MafRegion | undefined, MafRegion | undefined, MafRegion | undefined>;
|
|
1732
1743
|
embeddedMode: import("@jbrowse/mobx-state-tree").IType<boolean | undefined, boolean, boolean>;
|
|
1733
1744
|
domainsOnGenome: import("@jbrowse/mobx-state-tree").IOptionalIType<import("@jbrowse/mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
1734
|
-
}>, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & ({
|
|
1745
|
+
}>, "id" | "type" | "drawLabels" | "drawNodeBubbles" | "drawNodeLabels" | "drawTree" | "labelsAlignRight" | "overviewHeight" | "showBranchLen" | "showTreeOverview" | "treeAreaWidth" | "treeOrder" | "treeWidth" | "bgColor" | "colorSchemeName" | "customColorScheme" | "msaFormat" | "showColumnStats" | "allowedGappyness" | "clades" | "cladesSeeded" | "colWidth" | "collapsed" | "columnTracks" | "currentAlignment" | "data" | "domainFill" | "drawMsaLetters" | "embeddedMode" | "encodings" | "features" | "gffFilehandle" | "height" | "hideGaps" | "highlightColumns" | "highlights" | "msaFilehandle" | "region" | "relativeTo" | "residueMappings" | "rotated" | "rowHeight" | "rowPanels" | "scrollX" | "scrollY" | "scrollZoom" | "scrollZoomAxis" | "selection" | "showDomainLegend" | "showDomains" | "showOnly" | "subFeatureRows" | "trackHeights" | "treeFilehandle" | "treeMetadataFilehandle" | "treeRoot" | "turnedOffFeatures" | "turnedOffTracks"> & ({
|
|
1735
1746
|
bgColor: boolean;
|
|
1736
1747
|
colorSchemeName: string;
|
|
1737
1748
|
customColorScheme: Record<string, string> | undefined;
|
|
1738
1749
|
showColumnStats: boolean;
|
|
1739
|
-
msaFormat: import("
|
|
1750
|
+
msaFormat: import("msa-parsers").MSAFormat | undefined;
|
|
1740
1751
|
drawLabels: boolean;
|
|
1741
1752
|
labelsAlignRight: boolean;
|
|
1742
1753
|
treeAreaWidth: number | undefined;
|
|
@@ -1851,6 +1862,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1851
1862
|
rotated: string[];
|
|
1852
1863
|
treeRoot: import("react-msaview").TreeRoot | undefined;
|
|
1853
1864
|
showOnly: string | undefined;
|
|
1865
|
+
cladesSeeded: boolean;
|
|
1854
1866
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
1855
1867
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
1856
1868
|
residueMappings: import("react-msaview").ResidueMapping[];
|
|
@@ -1875,7 +1887,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1875
1887
|
colorSchemeName: string;
|
|
1876
1888
|
customColorScheme: Record<string, string> | undefined;
|
|
1877
1889
|
showColumnStats: boolean;
|
|
1878
|
-
msaFormat: import("
|
|
1890
|
+
msaFormat: import("msa-parsers").MSAFormat | undefined;
|
|
1879
1891
|
drawLabels: boolean;
|
|
1880
1892
|
labelsAlignRight: boolean;
|
|
1881
1893
|
treeAreaWidth: number | undefined;
|
|
@@ -1990,6 +2002,7 @@ export default function stateModelFactory(): import("@jbrowse/mobx-state-tree").
|
|
|
1990
2002
|
rotated: string[];
|
|
1991
2003
|
treeRoot: import("react-msaview").TreeRoot | undefined;
|
|
1992
2004
|
showOnly: string | undefined;
|
|
2005
|
+
cladesSeeded: boolean;
|
|
1993
2006
|
turnedOffTracks: import("mobx").IKeyValueMap<boolean>;
|
|
1994
2007
|
trackHeights: import("mobx").IKeyValueMap<number>;
|
|
1995
2008
|
residueMappings: import("react-msaview").ResidueMapping[];
|