jbrowse-plugin-msaview 2.3.3 → 2.3.8
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/README.md +15 -216
- package/dist/AddHighlightModel/GenomeMouseoverHighlight.js.map +1 -1
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js +2 -11
- package/dist/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.js.map +1 -1
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js +19 -4
- package/dist/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js +39 -53
- package/dist/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js +9 -22
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js +4 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js +8 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js +15 -7
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js +8 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.d.ts +7 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js +32 -0
- package/dist/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.js.map +1 -0
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +7 -2
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/TabPanel.js +1 -1
- package/dist/LaunchMsaView/components/TabPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/TranscriptSelector.js +7 -3
- package/dist/LaunchMsaView/components/TranscriptSelector.js.map +1 -1
- package/dist/LaunchMsaView/components/useTranscriptSelection.js +15 -14
- package/dist/LaunchMsaView/components/useTranscriptSelection.js.map +1 -1
- package/dist/MsaViewPanel/afterCreateAutoruns.js +17 -18
- package/dist/MsaViewPanel/afterCreateAutoruns.js.map +1 -1
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js +15 -10
- package/dist/MsaViewPanel/components/ConnectStructureDialog.js.map +1 -1
- package/dist/MsaViewPanel/components/ErrorBoundary.d.ts +19 -0
- package/dist/MsaViewPanel/components/ErrorBoundary.js +22 -0
- package/dist/MsaViewPanel/components/ErrorBoundary.js.map +1 -0
- package/dist/MsaViewPanel/components/MsaViewPanel.js +11 -2
- package/dist/MsaViewPanel/components/MsaViewPanel.js.map +1 -1
- package/dist/MsaViewPanel/model.d.ts +2 -14
- package/dist/MsaViewPanel/model.js +13 -10
- package/dist/MsaViewPanel/model.js.map +1 -1
- package/dist/MsaViewPanel/pairwiseAlignment.js +15 -10
- package/dist/MsaViewPanel/pairwiseAlignment.js.map +1 -1
- package/dist/MsaViewPanel/structureConnection.d.ts +22 -0
- package/dist/MsaViewPanel/structureConnection.js +4 -0
- package/dist/MsaViewPanel/structureConnection.js.map +1 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +26 -26
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/utils/blastCache.js +2 -3
- package/dist/utils/blastCache.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +33 -35
- package/src/AddHighlightModel/GenomeMouseoverHighlight.tsx +1 -2
- package/src/BgzipFastaMsaAdapter/BgzipFastaMsaAdapter.ts +2 -11
- package/src/LaunchMsaView/components/ManualMSALoader/ManualMSALoader.tsx +22 -7
- package/src/LaunchMsaView/components/NCBIBlastQuery/CachedBlastResults.tsx +40 -58
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastAutomaticPanel.tsx +14 -23
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastManualPanel.tsx +4 -1
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastPanel.tsx +9 -1
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBIBlastRIDPanel.tsx +15 -8
- package/src/LaunchMsaView/components/NCBIBlastQuery/NCBISettingsDialog.tsx +9 -1
- package/src/LaunchMsaView/components/NCBIBlastQuery/useCachedBlastResults.ts +52 -0
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +11 -2
- package/src/LaunchMsaView/components/TabPanel.tsx +1 -1
- package/src/LaunchMsaView/components/TranscriptSelector.tsx +7 -3
- package/src/LaunchMsaView/components/useTranscriptSelection.ts +25 -17
- package/src/MsaViewPanel/afterCreateAutoruns.ts +17 -18
- package/src/MsaViewPanel/components/ConnectStructureDialog.tsx +23 -25
- package/src/MsaViewPanel/components/ErrorBoundary.tsx +40 -0
- package/src/MsaViewPanel/components/MsaViewPanel.tsx +22 -11
- package/src/MsaViewPanel/model.ts +49 -33
- package/src/MsaViewPanel/pairwiseAlignment.ts +15 -10
- package/src/MsaViewPanel/structureConnection.ts +23 -0
- package/src/utils/blastCache.ts +2 -3
- package/src/version.ts +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import BLOSUM62 from './blosum62'
|
|
2
2
|
|
|
3
3
|
function getScore(a: string, b: string) {
|
|
4
|
-
|
|
5
|
-
const upper_b = b.toUpperCase()
|
|
6
|
-
return BLOSUM62[upper_a]?.[upper_b] ?? -4
|
|
4
|
+
return BLOSUM62[a.toUpperCase()]?.[b.toUpperCase()] ?? -4
|
|
7
5
|
}
|
|
8
6
|
|
|
9
7
|
const GAP_OPEN = -10
|
|
@@ -75,10 +73,12 @@ export function needlemanWunsch(
|
|
|
75
73
|
let i = m
|
|
76
74
|
let j = n
|
|
77
75
|
|
|
78
|
-
const
|
|
79
|
-
const
|
|
76
|
+
const mScore = M[m]![n]!
|
|
77
|
+
const ixScore = Ix[m]![n]!
|
|
78
|
+
const iyScore = Iy[m]![n]!
|
|
79
|
+
const score = Math.max(mScore, ixScore, iyScore)
|
|
80
80
|
let currentMatrix: 'M' | 'Ix' | 'Iy' =
|
|
81
|
-
score ===
|
|
81
|
+
score === mScore ? 'M' : score === ixScore ? 'Ix' : 'Iy'
|
|
82
82
|
|
|
83
83
|
while (i > 0 || j > 0) {
|
|
84
84
|
if (currentMatrix === 'M' && i > 0 && j > 0) {
|
|
@@ -88,10 +88,11 @@ export function needlemanWunsch(
|
|
|
88
88
|
const matchScore = getScore(seq1[i - 1]!, seq2[j - 1]!)
|
|
89
89
|
const prevM = M[i - 1]![j - 1]!
|
|
90
90
|
const prevIx = Ix[i - 1]![j - 1]!
|
|
91
|
+
const currentScore = M[i]![j]!
|
|
91
92
|
|
|
92
|
-
if (
|
|
93
|
+
if (currentScore === prevM + matchScore) {
|
|
93
94
|
currentMatrix = 'M'
|
|
94
|
-
} else if (
|
|
95
|
+
} else if (currentScore === prevIx + matchScore) {
|
|
95
96
|
currentMatrix = 'Ix'
|
|
96
97
|
} else {
|
|
97
98
|
currentMatrix = 'Iy'
|
|
@@ -102,13 +103,17 @@ export function needlemanWunsch(
|
|
|
102
103
|
alignedSeq1 = seq1[i - 1] + alignedSeq1
|
|
103
104
|
alignedSeq2 = '-' + alignedSeq2
|
|
104
105
|
|
|
105
|
-
|
|
106
|
+
const ixScore = Ix[i]![j]!
|
|
107
|
+
const mScore = M[i - 1]![j]! + gapOpen
|
|
108
|
+
currentMatrix = ixScore === mScore ? 'M' : 'Ix'
|
|
106
109
|
i--
|
|
107
110
|
} else if (j > 0) {
|
|
108
111
|
alignedSeq1 = '-' + alignedSeq1
|
|
109
112
|
alignedSeq2 = seq2[j - 1] + alignedSeq2
|
|
110
113
|
|
|
111
|
-
|
|
114
|
+
const iyScore = Iy[i]![j]!
|
|
115
|
+
const mScore = M[i]![j - 1]! + gapOpen
|
|
116
|
+
currentMatrix = iyScore === mScore ? 'M' : 'Iy'
|
|
112
117
|
j--
|
|
113
118
|
} else {
|
|
114
119
|
break
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
export interface ProteinViewStructure {
|
|
2
|
+
url?: string
|
|
3
|
+
connectedViewId?: string
|
|
4
|
+
uniprotId?: string
|
|
5
|
+
structureSequences?: string[]
|
|
6
|
+
hoverGenomeHighlights?: { start: number; end: number }[]
|
|
7
|
+
hoverPosition?: { structureSeqPos?: number }
|
|
8
|
+
clearHighlightFromExternal?: () => void
|
|
9
|
+
highlightFromExternal?: (pos: number) => void
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ProteinView {
|
|
13
|
+
type: 'ProteinView'
|
|
14
|
+
id: string
|
|
15
|
+
displayName?: string
|
|
16
|
+
structures: ProteinViewStructure[]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function isProteinView(view: unknown): view is ProteinView {
|
|
20
|
+
const v = view as Record<string, unknown>
|
|
21
|
+
return v.type === 'ProteinView' && Array.isArray(v.structures)
|
|
22
|
+
}
|
|
23
|
+
|
|
1
24
|
/**
|
|
2
25
|
* Represents a connection between the MSA view and a protein structure
|
|
3
26
|
*/
|
package/src/utils/blastCache.ts
CHANGED
|
@@ -40,11 +40,10 @@ function createCacheKey(
|
|
|
40
40
|
blastProgram: string,
|
|
41
41
|
transcriptId?: string,
|
|
42
42
|
) {
|
|
43
|
-
const seqKey = proteinSequence.slice(0, 100)
|
|
44
43
|
if (transcriptId) {
|
|
45
|
-
return `${blastDatabase}:${blastProgram}:${transcriptId}:${
|
|
44
|
+
return `${blastDatabase}:${blastProgram}:${transcriptId}:${proteinSequence}`
|
|
46
45
|
}
|
|
47
|
-
return `${blastDatabase}:${blastProgram}:${
|
|
46
|
+
return `${blastDatabase}:${blastProgram}:${proteinSequence}`
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
export async function getCachedBlastResult({
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.3.
|
|
1
|
+
export const version = '2.3.8'
|