jbrowse-plugin-mafviewer 1.4.5 → 1.4.6
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/BigMafAdapter/BigMafAdapter.js +4 -5
- package/dist/BigMafAdapter/BigMafAdapter.js.map +1 -1
- package/dist/BigMafAdapter/configSchema.d.ts +2 -2
- package/dist/LinearMafDisplay/components/LinearMafDisplayComponent.js +38 -108
- package/dist/LinearMafDisplay/components/LinearMafDisplayComponent.js.map +1 -1
- package/dist/LinearMafDisplay/components/MAFTooltip.d.ts +0 -3
- package/dist/LinearMafDisplay/components/MAFTooltip.js.map +1 -1
- package/dist/LinearMafDisplay/components/MsaHighlightOverlay.d.ts +9 -0
- package/dist/LinearMafDisplay/components/MsaHighlightOverlay.js +34 -0
- package/dist/LinearMafDisplay/components/MsaHighlightOverlay.js.map +1 -0
- package/dist/LinearMafDisplay/components/Sidebar/SvgWrapper.js +1 -1
- package/dist/LinearMafDisplay/components/Sidebar/SvgWrapper.js.map +1 -1
- package/dist/LinearMafDisplay/components/useDragSelection.d.ts +25 -0
- package/dist/LinearMafDisplay/components/useDragSelection.js +103 -0
- package/dist/LinearMafDisplay/components/useDragSelection.js.map +1 -0
- package/dist/LinearMafDisplay/configSchema.d.ts +3 -30
- package/dist/LinearMafDisplay/stateModel.d.ts +1043 -121
- package/dist/LinearMafDisplay/stateModel.js +85 -41
- package/dist/LinearMafDisplay/stateModel.js.map +1 -1
- package/dist/LinearMafDisplay/types.d.ts +2 -2
- package/dist/LinearMafDisplay/util.d.ts +5 -0
- package/dist/LinearMafDisplay/util.js +25 -4
- package/dist/LinearMafDisplay/util.js.map +1 -1
- package/dist/LinearMafRenderer/LinearMafRenderer.d.ts +41 -5
- package/dist/LinearMafRenderer/LinearMafRenderer.js +1 -1
- package/dist/LinearMafRenderer/LinearMafRenderer.js.map +1 -1
- package/dist/LinearMafRenderer/components/LinearMafRendering.d.ts +14 -5
- package/dist/LinearMafRenderer/components/LinearMafRendering.js +21 -19
- package/dist/LinearMafRenderer/components/LinearMafRendering.js.map +1 -1
- package/dist/LinearMafRenderer/configSchema.d.ts +1 -6
- package/dist/LinearMafRenderer/configSchema.js +1 -6
- package/dist/LinearMafRenderer/configSchema.js.map +1 -1
- package/dist/LinearMafRenderer/rendering/insertions.d.ts +1 -1
- package/dist/LinearMafRenderer/rendering/insertions.js +2 -2
- package/dist/LinearMafRenderer/rendering/mismatches.d.ts +1 -1
- package/dist/LinearMafRenderer/rendering/mismatches.js +3 -3
- package/dist/LinearMafRenderer/rendering/types.d.ts +1 -1
- package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js +1 -1
- package/dist/MafAddTrackWorkflow/AddTrackWorkflow.js.map +1 -1
- package/dist/MafAddTrackWorkflow/index.js +1 -1
- package/dist/MafAddTrackWorkflow/index.js.map +1 -1
- package/dist/MafGetSequences/MafGetSequences.d.ts +1 -0
- package/dist/MafGetSequences/MafGetSequences.js +2 -1
- package/dist/MafGetSequences/MafGetSequences.js.map +1 -1
- package/dist/MafSequenceWidget/LabelsCanvas.d.ts +8 -0
- package/dist/MafSequenceWidget/LabelsCanvas.js +37 -0
- package/dist/MafSequenceWidget/LabelsCanvas.js.map +1 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlight.d.ts +6 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlight.js +52 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlight.js.map +1 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlightExtension.d.ts +2 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlightExtension.js +12 -0
- package/dist/MafSequenceWidget/MafSequenceHoverHighlightExtension.js.map +1 -0
- package/dist/MafSequenceWidget/MafSequenceWidget.d.ts +6 -0
- package/dist/MafSequenceWidget/MafSequenceWidget.js +189 -0
- package/dist/MafSequenceWidget/MafSequenceWidget.js.map +1 -0
- package/dist/MafSequenceWidget/SequenceCanvas.d.ts +12 -0
- package/dist/MafSequenceWidget/SequenceCanvas.js +86 -0
- package/dist/MafSequenceWidget/SequenceCanvas.js.map +1 -0
- package/dist/MafSequenceWidget/SequenceDisplay.d.ts +12 -0
- package/dist/MafSequenceWidget/SequenceDisplay.js +117 -0
- package/dist/MafSequenceWidget/SequenceDisplay.js.map +1 -0
- package/dist/MafSequenceWidget/SequenceTooltip.d.ts +11 -0
- package/dist/MafSequenceWidget/SequenceTooltip.js +39 -0
- package/dist/MafSequenceWidget/SequenceTooltip.js.map +1 -0
- package/dist/MafSequenceWidget/baseColors.d.ts +3 -0
- package/dist/MafSequenceWidget/baseColors.js +64 -0
- package/dist/MafSequenceWidget/baseColors.js.map +1 -0
- package/dist/MafSequenceWidget/colToGenomePos.d.ts +13 -0
- package/dist/MafSequenceWidget/colToGenomePos.js +32 -0
- package/dist/MafSequenceWidget/colToGenomePos.js.map +1 -0
- package/dist/MafSequenceWidget/colToGenomePos.test.d.ts +1 -0
- package/dist/MafSequenceWidget/colToGenomePos.test.js +136 -0
- package/dist/MafSequenceWidget/colToGenomePos.test.js.map +1 -0
- package/dist/MafSequenceWidget/configSchema.d.ts +1 -0
- package/dist/MafSequenceWidget/configSchema.js +3 -0
- package/dist/MafSequenceWidget/configSchema.js.map +1 -0
- package/dist/MafSequenceWidget/constants.d.ts +4 -0
- package/dist/MafSequenceWidget/constants.js +5 -0
- package/dist/MafSequenceWidget/constants.js.map +1 -0
- package/dist/MafSequenceWidget/index.d.ts +2 -0
- package/dist/MafSequenceWidget/index.js +16 -0
- package/dist/MafSequenceWidget/index.js.map +1 -0
- package/dist/MafSequenceWidget/stateModelFactory.d.ts +67 -0
- package/dist/MafSequenceWidget/stateModelFactory.js +21 -0
- package/dist/MafSequenceWidget/stateModelFactory.js.map +1 -0
- package/dist/MafTabixAdapter/MafTabixAdapter.js +4 -35
- package/dist/MafTabixAdapter/MafTabixAdapter.js.map +1 -1
- package/dist/MafTabixAdapter/configSchema.d.ts +4 -4
- package/dist/MafTrack/configSchema.d.ts +16 -11
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js +12 -24
- package/dist/jbrowse-plugin-mafviewer.umd.production.min.js.map +4 -4
- package/dist/util/clipboard.d.ts +2 -0
- package/dist/util/clipboard.js +28 -0
- package/dist/util/clipboard.js.map +1 -0
- package/dist/util/fastaUtils.d.ts +2 -1
- package/dist/util/fastaUtils.js +72 -2
- package/dist/util/fastaUtils.js.map +1 -1
- package/dist/util/fastaUtils.test.js +190 -0
- package/dist/util/fastaUtils.test.js.map +1 -1
- package/dist/util/parseAssemblyName.d.ts +32 -0
- package/dist/util/parseAssemblyName.js +87 -0
- package/dist/util/parseAssemblyName.js.map +1 -0
- package/dist/util/parseAssemblyName.test.d.ts +1 -0
- package/dist/util/parseAssemblyName.test.js +269 -0
- package/dist/util/parseAssemblyName.test.js.map +1 -0
- package/package.json +7 -7
- package/src/BigMafAdapter/BigMafAdapter.ts +5 -5
- package/src/LinearMafDisplay/components/LinearMafDisplayComponent.tsx +62 -144
- package/src/LinearMafDisplay/components/MAFTooltip.tsx +0 -3
- package/src/LinearMafDisplay/components/MsaHighlightOverlay.tsx +62 -0
- package/src/LinearMafDisplay/components/Sidebar/SvgWrapper.tsx +1 -1
- package/src/LinearMafDisplay/components/useDragSelection.ts +159 -0
- package/src/LinearMafDisplay/stateModel.ts +135 -48
- package/src/LinearMafDisplay/types.ts +2 -2
- package/src/LinearMafDisplay/util.ts +31 -5
- package/src/LinearMafRenderer/LinearMafRenderer.ts +1 -1
- package/src/LinearMafRenderer/components/LinearMafRendering.tsx +38 -24
- package/src/LinearMafRenderer/configSchema.ts +1 -6
- package/src/LinearMafRenderer/rendering/insertions.ts +2 -2
- package/src/LinearMafRenderer/rendering/mismatches.ts +3 -3
- package/src/LinearMafRenderer/rendering/types.ts +1 -1
- package/src/MafAddTrackWorkflow/AddTrackWorkflow.tsx +1 -1
- package/src/MafAddTrackWorkflow/index.ts +1 -1
- package/src/MafGetSequences/MafGetSequences.ts +10 -2
- package/src/MafSequenceWidget/LabelsCanvas.tsx +58 -0
- package/src/MafSequenceWidget/MafSequenceHoverHighlight.tsx +83 -0
- package/src/MafSequenceWidget/MafSequenceHoverHighlightExtension.tsx +24 -0
- package/src/MafSequenceWidget/MafSequenceWidget.tsx +294 -0
- package/src/MafSequenceWidget/SequenceCanvas.tsx +136 -0
- package/src/MafSequenceWidget/SequenceDisplay.tsx +188 -0
- package/src/MafSequenceWidget/SequenceTooltip.tsx +70 -0
- package/src/MafSequenceWidget/baseColors.ts +76 -0
- package/src/MafSequenceWidget/colToGenomePos.test.ts +166 -0
- package/src/MafSequenceWidget/colToGenomePos.ts +40 -0
- package/src/MafSequenceWidget/configSchema.ts +3 -0
- package/src/MafSequenceWidget/constants.ts +4 -0
- package/src/MafSequenceWidget/index.ts +24 -0
- package/src/MafSequenceWidget/stateModelFactory.ts +43 -0
- package/src/MafTabixAdapter/MafTabixAdapter.ts +12 -51
- package/src/index.ts +2 -0
- package/src/util/__snapshots__/fastaUtils.test.ts.snap +35 -0
- package/src/util/clipboard.ts +35 -0
- package/src/util/fastaUtils.test.ts +199 -0
- package/src/util/fastaUtils.ts +94 -1
- package/src/util/parseAssemblyName.test.ts +350 -0
- package/src/util/parseAssemblyName.ts +106 -0
- package/dist/LinearMafDisplay/components/GetSequenceDialog/GetSequenceDialog.d.ts +0 -11
- package/dist/LinearMafDisplay/components/GetSequenceDialog/GetSequenceDialog.js +0 -97
- package/dist/LinearMafDisplay/components/GetSequenceDialog/GetSequenceDialog.js.map +0 -1
- package/dist/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.d.ts +0 -14
- package/dist/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.js +0 -69
- package/dist/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.js.map +0 -1
- package/dist/LinearMafDisplay/components/util.d.ts +0 -1
- package/dist/LinearMafDisplay/components/util.js +0 -8
- package/dist/LinearMafDisplay/components/util.js.map +0 -1
- package/dist/util/fetchSequences.d.ts +0 -18
- package/dist/util/fetchSequences.js +0 -39
- package/dist/util/fetchSequences.js.map +0 -1
- package/dist/util/useSequences.d.ts +0 -21
- package/dist/util/useSequences.js +0 -64
- package/dist/util/useSequences.js.map +0 -1
- package/src/LinearMafDisplay/components/GetSequenceDialog/GetSequenceDialog.tsx +0 -175
- package/src/LinearMafDisplay/components/InsertionSequenceDialog/InsertionSequenceDialog.tsx +0 -105
- package/src/LinearMafDisplay/components/util.ts +0 -7
- package/src/util/fetchSequences.ts +0 -57
- package/src/util/useSequences.ts +0 -90
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
|
|
3
|
-
import { Dialog } from '@jbrowse/core/ui'
|
|
4
|
-
import { Button, DialogActions, DialogContent, TextField } from '@mui/material'
|
|
5
|
-
import { observer } from 'mobx-react'
|
|
6
|
-
import { makeStyles } from 'tss-react/mui'
|
|
7
|
-
|
|
8
|
-
const useStyles = makeStyles()({
|
|
9
|
-
dialogContent: {
|
|
10
|
-
width: '60em',
|
|
11
|
-
},
|
|
12
|
-
textAreaInput: {
|
|
13
|
-
fontFamily: 'monospace',
|
|
14
|
-
whiteSpace: 'pre',
|
|
15
|
-
overflowX: 'auto',
|
|
16
|
-
},
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const InsertionSequenceDialog = observer(function ({
|
|
20
|
-
onClose,
|
|
21
|
-
model,
|
|
22
|
-
insertionData,
|
|
23
|
-
}: {
|
|
24
|
-
onClose: () => void
|
|
25
|
-
model: {
|
|
26
|
-
showAsUpperCase: boolean
|
|
27
|
-
}
|
|
28
|
-
insertionData: {
|
|
29
|
-
sequence: string
|
|
30
|
-
sampleLabel: string
|
|
31
|
-
chr: string
|
|
32
|
-
pos: number
|
|
33
|
-
}
|
|
34
|
-
}) {
|
|
35
|
-
const { classes } = useStyles()
|
|
36
|
-
const [copied, setCopied] = useState(false)
|
|
37
|
-
const { sequence, sampleLabel, chr, pos } = insertionData
|
|
38
|
-
const { showAsUpperCase } = model
|
|
39
|
-
const displaySequence = showAsUpperCase
|
|
40
|
-
? sequence.toUpperCase()
|
|
41
|
-
: sequence.toLowerCase()
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<Dialog
|
|
45
|
-
open
|
|
46
|
-
onClose={onClose}
|
|
47
|
-
title={`Insertion Sequence (${sequence.length}bp)`}
|
|
48
|
-
maxWidth="lg"
|
|
49
|
-
>
|
|
50
|
-
<DialogContent>
|
|
51
|
-
<div style={{ marginBottom: 16 }}>
|
|
52
|
-
<strong>Sample:</strong> {sampleLabel}
|
|
53
|
-
<br />
|
|
54
|
-
<strong>Position:</strong> {chr}:{pos.toLocaleString('en-US')}
|
|
55
|
-
<br />
|
|
56
|
-
<strong>Length:</strong> {sequence.length}bp
|
|
57
|
-
</div>
|
|
58
|
-
<TextField
|
|
59
|
-
variant="outlined"
|
|
60
|
-
multiline
|
|
61
|
-
minRows={3}
|
|
62
|
-
maxRows={10}
|
|
63
|
-
className={classes.dialogContent}
|
|
64
|
-
fullWidth
|
|
65
|
-
value={displaySequence}
|
|
66
|
-
slotProps={{
|
|
67
|
-
input: {
|
|
68
|
-
readOnly: true,
|
|
69
|
-
classes: {
|
|
70
|
-
input: classes.textAreaInput,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
}}
|
|
74
|
-
/>
|
|
75
|
-
</DialogContent>
|
|
76
|
-
<DialogActions>
|
|
77
|
-
<Button
|
|
78
|
-
variant="contained"
|
|
79
|
-
color="primary"
|
|
80
|
-
onClick={() => {
|
|
81
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
82
|
-
;(async () => {
|
|
83
|
-
try {
|
|
84
|
-
await navigator.clipboard.writeText(displaySequence)
|
|
85
|
-
setCopied(true)
|
|
86
|
-
setTimeout(() => {
|
|
87
|
-
setCopied(false)
|
|
88
|
-
}, 1000)
|
|
89
|
-
} catch (e) {
|
|
90
|
-
console.error(e)
|
|
91
|
-
}
|
|
92
|
-
})()
|
|
93
|
-
}}
|
|
94
|
-
>
|
|
95
|
-
{copied ? 'Copied!' : 'Copy to Clipboard'}
|
|
96
|
-
</Button>
|
|
97
|
-
<Button color="secondary" variant="contained" onClick={onClose}>
|
|
98
|
-
Close
|
|
99
|
-
</Button>
|
|
100
|
-
</DialogActions>
|
|
101
|
-
</Dialog>
|
|
102
|
-
)
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
export default InsertionSequenceDialog
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { getContainingView, getSession } from '@jbrowse/core/util'
|
|
2
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks'
|
|
3
|
-
|
|
4
|
-
import type { LinearMafDisplayModel } from '../LinearMafDisplay/stateModel'
|
|
5
|
-
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
6
|
-
|
|
7
|
-
interface SelectionCoords {
|
|
8
|
-
dragStartX: number
|
|
9
|
-
dragEndX: number
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Fetch sequences for the given selection coordinates
|
|
14
|
-
* @param model - The LinearMafDisplayModel
|
|
15
|
-
* @param selectionCoords - The selection coordinates (dragStartX and dragEndX)
|
|
16
|
-
* @param showAllLetters - Whether to show all letters or just the differences
|
|
17
|
-
* @returns Promise that resolves to the FASTA sequence
|
|
18
|
-
*/
|
|
19
|
-
export async function fetchSequences({
|
|
20
|
-
model,
|
|
21
|
-
selectionCoords,
|
|
22
|
-
showAllLetters,
|
|
23
|
-
}: {
|
|
24
|
-
model: LinearMafDisplayModel
|
|
25
|
-
selectionCoords: SelectionCoords
|
|
26
|
-
showAllLetters: boolean
|
|
27
|
-
}) {
|
|
28
|
-
const { samples, adapterConfig } = model
|
|
29
|
-
const { rpcManager } = getSession(model)
|
|
30
|
-
const sessionId = getRpcSessionId(model)
|
|
31
|
-
const view = getContainingView(model) as LinearGenomeViewModel
|
|
32
|
-
const { refName, assemblyName } = view.displayedRegions[0]!
|
|
33
|
-
const { dragStartX, dragEndX } = selectionCoords
|
|
34
|
-
const [s, e] = [
|
|
35
|
-
Math.min(dragStartX, dragEndX),
|
|
36
|
-
Math.max(dragStartX, dragEndX),
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
const fastaSequence = (await rpcManager.call(sessionId, 'MafGetSequences', {
|
|
40
|
-
sessionId,
|
|
41
|
-
adapterConfig,
|
|
42
|
-
samples,
|
|
43
|
-
showAllLetters,
|
|
44
|
-
regions: [
|
|
45
|
-
{
|
|
46
|
-
refName,
|
|
47
|
-
start: view.pxToBp(s).coord - 1,
|
|
48
|
-
end: view.pxToBp(e).coord,
|
|
49
|
-
assemblyName,
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
})) as string[]
|
|
53
|
-
|
|
54
|
-
return fastaSequence
|
|
55
|
-
.map((r, idx) => `>${samples![idx]!.label}\n${r}`)
|
|
56
|
-
.join('\n')
|
|
57
|
-
}
|
package/src/util/useSequences.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
2
|
-
|
|
3
|
-
import { getContainingView, getSession } from '@jbrowse/core/util'
|
|
4
|
-
import { getRpcSessionId } from '@jbrowse/core/util/tracks'
|
|
5
|
-
|
|
6
|
-
import type { LinearMafDisplayModel } from '../LinearMafDisplay/stateModel'
|
|
7
|
-
import type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'
|
|
8
|
-
|
|
9
|
-
interface SelectionCoords {
|
|
10
|
-
dragStartX: number
|
|
11
|
-
dragEndX: number
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface UseSequencesOptions {
|
|
15
|
-
model: LinearMafDisplayModel
|
|
16
|
-
selectionCoords?: SelectionCoords
|
|
17
|
-
showAllLetters: boolean
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* React hook to fetch sequences for the given selection coordinates
|
|
22
|
-
* @param options - The options for fetching sequences
|
|
23
|
-
* @returns An object containing the sequence, loading state, and error
|
|
24
|
-
*/
|
|
25
|
-
export function useSequences({
|
|
26
|
-
model,
|
|
27
|
-
selectionCoords,
|
|
28
|
-
showAllLetters,
|
|
29
|
-
}: UseSequencesOptions) {
|
|
30
|
-
const [sequence, setSequence] = useState<string>('')
|
|
31
|
-
const [loading, setLoading] = useState(true)
|
|
32
|
-
const [error, setError] = useState<unknown>()
|
|
33
|
-
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
// If no selection coordinates, no need to fetch
|
|
36
|
-
if (!selectionCoords) {
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
40
|
-
;(async () => {
|
|
41
|
-
try {
|
|
42
|
-
setLoading(true)
|
|
43
|
-
setError(undefined)
|
|
44
|
-
|
|
45
|
-
const { samples, adapterConfig } = model
|
|
46
|
-
const { rpcManager } = getSession(model)
|
|
47
|
-
const sessionId = getRpcSessionId(model)
|
|
48
|
-
const view = getContainingView(model) as LinearGenomeViewModel
|
|
49
|
-
const { refName, assemblyName } = view.displayedRegions[0]!
|
|
50
|
-
const { dragStartX, dragEndX } = selectionCoords
|
|
51
|
-
const [s, e] = [
|
|
52
|
-
Math.min(dragStartX, dragEndX),
|
|
53
|
-
Math.max(dragStartX, dragEndX),
|
|
54
|
-
]
|
|
55
|
-
|
|
56
|
-
const fastaSequence = (await rpcManager.call(
|
|
57
|
-
sessionId,
|
|
58
|
-
'MafGetSequences',
|
|
59
|
-
{
|
|
60
|
-
sessionId,
|
|
61
|
-
adapterConfig,
|
|
62
|
-
samples,
|
|
63
|
-
showAllLetters,
|
|
64
|
-
regions: [
|
|
65
|
-
{
|
|
66
|
-
refName,
|
|
67
|
-
start: view.pxToBp(s).coord - 1,
|
|
68
|
-
end: view.pxToBp(e).coord,
|
|
69
|
-
assemblyName,
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
)) as string[]
|
|
74
|
-
|
|
75
|
-
const formattedSequence = fastaSequence
|
|
76
|
-
.map((r, idx) => `>${samples![idx]!.label}\n${r}`)
|
|
77
|
-
.join('\n')
|
|
78
|
-
|
|
79
|
-
setSequence(formattedSequence)
|
|
80
|
-
} catch (e) {
|
|
81
|
-
console.error(e)
|
|
82
|
-
setError(e)
|
|
83
|
-
} finally {
|
|
84
|
-
setLoading(false)
|
|
85
|
-
}
|
|
86
|
-
})()
|
|
87
|
-
}, [model, selectionCoords, showAllLetters])
|
|
88
|
-
|
|
89
|
-
return { sequence, loading, error }
|
|
90
|
-
}
|