jbrowse-plugin-msaview 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AddHighlightModel/MsaToGenomeHighlight.js.map +1 -1
- package/dist/AddHighlightModel/util.js +1 -1
- package/dist/AddHighlightModel/util.js.map +1 -1
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js +8 -3
- package/dist/LaunchMsaView/components/LaunchMsaViewDialog.js.map +1 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.js +12 -4
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js +1 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.js.map +1 -1
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.js +50 -29
- package/dist/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.js.map +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +6 -2
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js.map +1 -1
- package/dist/LaunchMsaView/components/TabUtils.d.ts +1 -5
- package/dist/LaunchMsaView/components/TabUtils.js +1 -7
- package/dist/LaunchMsaView/components/TabUtils.js.map +1 -1
- package/dist/LaunchMsaView/components/tabUtil.d.ts +4 -0
- package/dist/LaunchMsaView/components/tabUtil.js +7 -0
- package/dist/LaunchMsaView/components/tabUtil.js.map +1 -0
- package/dist/LaunchMsaView/index.js +2 -3
- package/dist/LaunchMsaView/index.js.map +1 -1
- package/dist/LaunchMsaView/util.d.ts +1 -1
- package/dist/LaunchMsaView/util.js +1 -1
- package/dist/LaunchMsaView/util.js.map +1 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js +1 -1
- package/dist/MsaViewPanel/components/LoadingBLAST.js.map +1 -1
- package/dist/MsaViewPanel/doLaunchBlast.js +17 -4
- package/dist/MsaViewPanel/doLaunchBlast.js.map +1 -1
- package/dist/MsaViewPanel/model.d.ts +33 -24
- package/dist/MsaViewPanel/model.js +3 -1
- package/dist/MsaViewPanel/model.js.map +1 -1
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.js +4 -4
- package/dist/MsaViewPanel/msaCoordToGenomeCoord.js.map +1 -1
- package/dist/jbrowse-plugin-msaview.umd.production.min.js +27 -27
- package/dist/jbrowse-plugin-msaview.umd.production.min.js.map +4 -4
- package/dist/utils/msa.js +4 -0
- package/dist/utils/msa.js.map +1 -1
- package/dist/utils/ncbiBlast.js +8 -5
- package/dist/utils/ncbiBlast.js.map +1 -1
- package/package.json +8 -8
- package/src/AddHighlightModel/MsaToGenomeHighlight.tsx +4 -2
- package/src/AddHighlightModel/util.ts +1 -1
- package/src/LaunchMsaView/components/LaunchMsaViewDialog.tsx +11 -3
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/NcbiBlastPanel.tsx +12 -4
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/calculateProteinSequence.ts +2 -2
- package/src/LaunchMsaView/components/NewNCBIBlastQuery/useFeatureSequence.ts +69 -34
- package/src/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.tsx +6 -2
- package/src/LaunchMsaView/components/TabUtils.tsx +1 -7
- package/src/LaunchMsaView/components/tabUtil.ts +6 -0
- package/src/LaunchMsaView/index.ts +36 -31
- package/src/LaunchMsaView/util.ts +2 -2
- package/src/MsaViewPanel/components/LoadingBLAST.tsx +2 -2
- package/src/MsaViewPanel/doLaunchBlast.ts +22 -4
- package/src/MsaViewPanel/model.ts +4 -2
- package/src/MsaViewPanel/msaCoordToGenomeCoord.ts +4 -4
- package/src/utils/msa.ts +3 -0
- package/src/utils/ncbiBlast.ts +22 -10
package/src/utils/ncbiBlast.ts
CHANGED
|
@@ -23,15 +23,26 @@ export async function queryBlast({
|
|
|
23
23
|
})
|
|
24
24
|
onRid(rid)
|
|
25
25
|
await waitForRid({ rid, onProgress })
|
|
26
|
-
const ret = await jsonfetch(
|
|
26
|
+
const ret = (await jsonfetch(
|
|
27
27
|
`${BLAST_URL}?CMD=Get&RID=${rid}&FORMAT_TYPE=JSON2_S&FORMAT_OBJECT=Alignment`,
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
)) as {
|
|
29
|
+
BlastOutput2: {
|
|
30
|
+
report: {
|
|
31
|
+
results: {
|
|
32
|
+
search: {
|
|
33
|
+
hits: {
|
|
34
|
+
description: { accession: string; id: string; sciname: string }[]
|
|
35
|
+
hsps: { hseq: string }[]
|
|
36
|
+
}[]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}[]
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
rid,
|
|
44
|
+
hits: ret.BlastOutput2[0]?.report.results.search.hits ?? [],
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
|
|
37
48
|
async function initialQuery({
|
|
@@ -62,8 +73,8 @@ async function initialQuery({
|
|
|
62
73
|
// the initial submission/query to the BLAST "REST API" does not return JSON
|
|
63
74
|
// as a response (e.g. FORMAT_TYPE=JSON does not work), so the RID is
|
|
64
75
|
// literally parsed from the text of the HTML that is returned
|
|
65
|
-
const rid = /^
|
|
66
|
-
const rtoe = /^
|
|
76
|
+
const rid = /^ {4}RID = (.*$)/m.exec(res)?.[1]
|
|
77
|
+
const rtoe = /^ {4}RTOE = (.*$)/m.exec(res)?.[1]
|
|
67
78
|
|
|
68
79
|
if (!rid) {
|
|
69
80
|
throw new Error('Failed to get RID from BLAST request')
|
|
@@ -78,6 +89,7 @@ async function waitForRid({
|
|
|
78
89
|
rid: string
|
|
79
90
|
onProgress: (arg: string) => void
|
|
80
91
|
}) {
|
|
92
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
81
93
|
while (true) {
|
|
82
94
|
const iter = 20
|
|
83
95
|
for (let i = 0; i < iter; i++) {
|