jbrowse-plugin-msaview 5.16.2 → 5.18.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/README.md +1 -1
- package/dist/LaunchMsaView/components/PreLoadedMSA/PreLoadedMSADataPanel.js +1 -1
- package/dist/MsaViewPanel/model.d.ts +173 -72
- package/dist/MsaViewPanel/storedData.test.js +4 -4
- package/dist/chunks/{AboutDialog-UIDZTTTE.js → AboutDialog-QD4L7BYU.js} +2 -2
- package/dist/chunks/{AboutDialog-UIDZTTTE.js.map → AboutDialog-QD4L7BYU.js.map} +1 -1
- package/dist/chunks/AnnotationFileDialog-IDJWWQDB.js +2 -0
- package/dist/chunks/{AnnotationFileDialog-TFIHQACD.js.map → AnnotationFileDialog-IDJWWQDB.js.map} +3 -3
- package/dist/chunks/ExportSVGDialog-R7ANUOII.js +2 -0
- package/dist/chunks/ExportSVGDialog-R7ANUOII.js.map +7 -0
- package/dist/chunks/FeatureDialog-A7LFBVGM.js +2 -0
- package/dist/chunks/FeatureDialog-A7LFBVGM.js.map +7 -0
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js → GapThresholdDialog-LP4UN3SB.js} +1 -1
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js.map → GapThresholdDialog-LP4UN3SB.js.map} +1 -1
- package/dist/chunks/{GoToDialog-U3TQYXIE.js → GoToDialog-3HM7K5RZ.js} +2 -2
- package/dist/chunks/{GoToDialog-U3TQYXIE.js.map → GoToDialog-3HM7K5RZ.js.map} +1 -1
- package/dist/chunks/{HelpDialog-QS4T2P3K.js → HelpDialog-GJKUU5Z6.js} +2 -2
- package/dist/chunks/{HelpDialog-QS4T2P3K.js.map → HelpDialog-GJKUU5Z6.js.map} +1 -1
- package/dist/chunks/{LaunchMsaViewDialog-CZR76VIV.js → LaunchMsaViewDialog-KQVGEMH7.js} +3 -3
- package/dist/chunks/{LaunchMsaViewDialog-CZR76VIV.js.map → LaunchMsaViewDialog-KQVGEMH7.js.map} +2 -2
- package/dist/chunks/MetadataDialog-4YUN5FJL.js +2 -0
- package/dist/chunks/MetadataDialog-4YUN5FJL.js.map +7 -0
- package/dist/chunks/{MsaViewPanel-6ETJVX27.js → MsaViewPanel-3GZG5IYS.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js → TrackInfoDialog-D423HM63.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js.map → TrackInfoDialog-D423HM63.js.map} +1 -1
- package/dist/chunks/TreeNodeInfoDialog-IXNBDQYV.js +2 -0
- package/dist/chunks/{TreeNodeInfoDialog-W6L2FDRH.js.map → TreeNodeInfoDialog-IXNBDQYV.js.map} +2 -2
- package/dist/chunks/{chunk-ECXGXFKO.js → chunk-3MNW5BKS.js} +1 -1
- package/dist/chunks/{chunk-ECXGXFKO.js.map → chunk-3MNW5BKS.js.map} +1 -1
- package/dist/chunks/chunk-7763LQXU.js +2 -0
- package/dist/chunks/chunk-7763LQXU.js.map +7 -0
- package/dist/chunks/chunk-7ZEXFLSY.js +2 -0
- package/dist/chunks/chunk-7ZEXFLSY.js.map +7 -0
- package/dist/chunks/chunk-AISU7SRE.js +2 -0
- package/dist/chunks/{chunk-BKGWP5O6.js.map → chunk-AISU7SRE.js.map} +4 -4
- package/dist/chunks/{chunk-7JFWQZNK.js → chunk-BD6Y2ERQ.js} +2 -2
- package/dist/chunks/{chunk-7JFWQZNK.js.map → chunk-BD6Y2ERQ.js.map} +1 -1
- package/dist/chunks/chunk-CKXVJK5K.js +2 -0
- package/dist/chunks/chunk-CKXVJK5K.js.map +7 -0
- package/dist/chunks/{chunk-CRESEEY4.js → chunk-CREQPIFJ.js} +2 -2
- package/dist/chunks/{chunk-KKFBYJZN.js → chunk-DW5INM5K.js} +1 -1
- package/dist/chunks/{chunk-KKFBYJZN.js.map → chunk-DW5INM5K.js.map} +1 -1
- package/dist/chunks/chunk-FLY25MTG.js +2 -0
- package/dist/chunks/{chunk-TVAJGJXO.js.map → chunk-FLY25MTG.js.map} +2 -2
- package/dist/chunks/chunk-JJ3VMN7J.js +11 -0
- package/dist/chunks/chunk-JJ3VMN7J.js.map +7 -0
- package/dist/chunks/chunk-KHRURQPK.js +2 -0
- package/dist/chunks/chunk-KHRURQPK.js.map +7 -0
- package/dist/chunks/{chunk-FYL5SHOE.js → chunk-LFBMB523.js} +1 -1
- package/dist/chunks/{chunk-FYL5SHOE.js.map → chunk-LFBMB523.js.map} +1 -1
- package/dist/chunks/chunk-LNMEYTCN.js +2 -0
- package/dist/chunks/chunk-LNMEYTCN.js.map +7 -0
- package/dist/chunks/chunk-PWNKL3ZK.js +2 -0
- package/dist/chunks/{chunk-33ER5TMH.js.map → chunk-PWNKL3ZK.js.map} +1 -1
- package/dist/chunks/{chunk-ET6J3BQX.js → chunk-SIKAYSRK.js} +2 -2
- package/dist/chunks/chunk-SM4GL27T.js +164 -0
- package/dist/chunks/chunk-SM4GL27T.js.map +7 -0
- package/dist/chunks/chunk-V47MJ4IY.js +2 -0
- package/dist/chunks/chunk-V47MJ4IY.js.map +7 -0
- package/dist/chunks/chunk-X5QA4AF6.js +2 -0
- package/dist/chunks/chunk-X5QA4AF6.js.map +7 -0
- package/dist/chunks/{chunk-UUDUJ6ZF.js → chunk-XNNIIXGD.js} +1 -1
- package/dist/chunks/{chunk-UUDUJ6ZF.js.map → chunk-XNNIIXGD.js.map} +1 -1
- package/dist/chunks/{chunk-L75R2CI3.js → chunk-ZJGFEUGM.js} +4 -4
- package/dist/chunks/{chunk-L75R2CI3.js.map → chunk-ZJGFEUGM.js.map} +1 -1
- package/dist/chunks/{chunk-MLATYHL2.js → chunk-ZWQTJTRR.js} +2 -2
- package/dist/chunks/dist-AUOG3URS.js +2 -0
- package/dist/chunks/dist-AUOG3URS.js.map +7 -0
- package/dist/chunks/dist-N36EMMBB.js +2 -0
- package/dist/chunks/{model-XMH3QSZV.js → model-M736UK5B.js} +2 -2
- package/dist/chunks/renderToSvg-KUOP36MW.js +2 -0
- package/dist/jbrowse-plugin-msaview.esm.js +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js.map +2 -2
- 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 +1 -1
- package/src/LaunchMsaViewExtensionPoint/index.ts +2 -1
- package/src/MsaViewPanel/storedData.test.ts +4 -4
- package/src/version.ts +1 -1
- package/dist/chunks/AnnotationFileDialog-TFIHQACD.js +0 -2
- package/dist/chunks/ExportSVGDialog-AYE4AXS3.js +0 -2
- package/dist/chunks/ExportSVGDialog-AYE4AXS3.js.map +0 -7
- package/dist/chunks/FeatureDialog-XHNPLPWX.js +0 -2
- package/dist/chunks/FeatureDialog-XHNPLPWX.js.map +0 -7
- package/dist/chunks/MetadataDialog-BC6EUBOJ.js +0 -2
- package/dist/chunks/MetadataDialog-BC6EUBOJ.js.map +0 -7
- package/dist/chunks/TreeNodeInfoDialog-W6L2FDRH.js +0 -2
- package/dist/chunks/chunk-27DJABXI.js +0 -2
- package/dist/chunks/chunk-27DJABXI.js.map +0 -7
- package/dist/chunks/chunk-33ER5TMH.js +0 -2
- package/dist/chunks/chunk-73KAPCJ2.js +0 -2
- package/dist/chunks/chunk-73KAPCJ2.js.map +0 -7
- package/dist/chunks/chunk-7WGSBPHS.js +0 -6
- package/dist/chunks/chunk-7WGSBPHS.js.map +0 -7
- package/dist/chunks/chunk-AOTVWTUV.js +0 -2
- package/dist/chunks/chunk-AOTVWTUV.js.map +0 -7
- package/dist/chunks/chunk-BKGWP5O6.js +0 -2
- 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-TVAJGJXO.js +0 -2
- 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/renderToSvg-VO23YN7B.js +0 -2
- /package/dist/chunks/{MsaViewPanel-6ETJVX27.js.map → MsaViewPanel-3GZG5IYS.js.map} +0 -0
- /package/dist/chunks/{chunk-CRESEEY4.js.map → chunk-CREQPIFJ.js.map} +0 -0
- /package/dist/chunks/{chunk-ET6J3BQX.js.map → chunk-SIKAYSRK.js.map} +0 -0
- /package/dist/chunks/{chunk-MLATYHL2.js.map → chunk-ZWQTJTRR.js.map} +0 -0
- /package/dist/chunks/{dist-NZDQ46PF.js.map → dist-N36EMMBB.js.map} +0 -0
- /package/dist/chunks/{model-XMH3QSZV.js.map → model-M736UK5B.js.map} +0 -0
- /package/dist/chunks/{renderToSvg-VO23YN7B.js.map → renderToSvg-KUOP36MW.js.map} +0 -0
|
@@ -69,7 +69,7 @@ describe('what a reload would lose', () => {
|
|
|
69
69
|
});
|
|
70
70
|
test('a url-loaded alignment is not, but a large local GFF on it is', () => {
|
|
71
71
|
const model = view({ msaFilehandle: URL_MSA });
|
|
72
|
-
model.setMSA(BIG_MSA);
|
|
72
|
+
model.data.setMSA(BIG_MSA);
|
|
73
73
|
model.setGFF(BIG_GFF);
|
|
74
74
|
expect(model.unsavedDocuments).toEqual({
|
|
75
75
|
msa: undefined,
|
|
@@ -87,7 +87,7 @@ describe('what a reload would lose', () => {
|
|
|
87
87
|
});
|
|
88
88
|
test('a GFF read from a url is not', () => {
|
|
89
89
|
const model = view({ gffFilehandle: URL_GFF });
|
|
90
|
-
model.setGFF(BIG_GFF);
|
|
90
|
+
model.data.setGFF(BIG_GFF);
|
|
91
91
|
expect(model.unsavedDocuments.gff).toBeUndefined();
|
|
92
92
|
});
|
|
93
93
|
});
|
|
@@ -187,7 +187,7 @@ describe('a row two views name', () => {
|
|
|
187
187
|
await settle();
|
|
188
188
|
expect(copy.data.gff).toBe(BIG_GFF);
|
|
189
189
|
copy.setGFFFilehandle(URL_GFF);
|
|
190
|
-
copy.setGFF('a\t.\tdomain\t1\t2');
|
|
190
|
+
copy.data.setGFF('a\t.\tdomain\t1\t2');
|
|
191
191
|
await settle();
|
|
192
192
|
await settle();
|
|
193
193
|
expect(rows.get('shared')).toEqual({ gff: BIG_GFF });
|
|
@@ -246,7 +246,7 @@ describe('keeping IndexedDB up to date', () => {
|
|
|
246
246
|
});
|
|
247
247
|
test('a large local GFF on a url-loaded view is written, and only it', async () => {
|
|
248
248
|
const model = view({ msaFilehandle: URL_MSA });
|
|
249
|
-
model.setMSA(BIG_MSA);
|
|
249
|
+
model.data.setMSA(BIG_MSA);
|
|
250
250
|
model.setGFF(BIG_GFF);
|
|
251
251
|
await settle();
|
|
252
252
|
expect(mockStore).toHaveBeenCalledTimes(1);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=AboutDialog-
|
|
1
|
+
import{a as n}from"./chunk-CKXVJK5K.js";import{a as l}from"./chunk-YOLY6H5C.js";import{S as r,n as o,u as t}from"./chunk-EXFKF6XR.js";import{r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";function i({onClose:a}){return e.createElement(l,{open:!0,title:"About",onClose:()=>{a()}},e.createElement(o,null,e.createElement(r,null,"MSAView ",n," (",e.createElement(t,{target:"_blank",rel:"noopener",href:"https://github.com/gmod/react-msaview"},"Github"),")"),e.createElement("ul",null,e.createElement("li",null,e.createElement(r,null,"We use some color schemes from the"," ",e.createElement(t,{target:"_blank",rel:"noopener",href:"https://github.com/biotite-dev/biotite"},"biotite")," ","project, and their license is reproduced"," ",e.createElement(t,{target:"_blank",rel:"noopener",href:"https://github.com/biotite-dev/biotite/blob/master/LICENSE.rst"},"here"))),e.createElement("li",null,e.createElement(r,null,"See this page for some information on jalview colorings"," ",e.createElement(t,{target:"_blank",rel:"noopener",href:"https://www.jalview.org/help/html/colourSchemes/"},"here"))),e.createElement("li",null,e.createElement(r,null,"See this page for some info on the clustal, cinema, maeditor, and lesk color schemes"," ",e.createElement(t,{target:"_blank",rel:"noopener",href:"http://www.bioinformatics.nl/~berndb/aacolour.html"},"here"))),e.createElement("li",null,e.createElement(r,null,"See this paper about the flower color scheme"," ",e.createElement(t,{target:"_blank",rel:"noopener",href:"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7245768/"},"here"))))))}export{i as default};
|
|
2
|
+
//# sourceMappingURL=AboutDialog-QD4L7BYU.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/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": "0MAOc,SAAPA,EAA6B,CAAE,QAAAC,CAAO,EAA2B,CACtE,OACEC,EAAA,cAACC,EAAM,CACL,KAAI,GACJ,MAAM,QACN,QAAS,IAAK,CACZF,EAAO,CACT,CAAC,EAEDC,EAAA,cAACE,EAAa,KACZF,EAAA,cAACG,EAAU,gBACAC,OACTJ,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,uCAAuC,EAAA,QAAA,OAOhDL,EAAA,cAAA,KAAA,KACEA,EAAA,cAAA,KAAA,KACEA,EAAA,cAACG,EAAU,0CAC0B,IACnCH,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,wCAAwC,EAAA,SAAA,EAGvC,+CACiC,IACzCL,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,gEAAgE,EAAA,MAAA,CAGhE,CACI,EAEfL,EAAA,cAAA,KAAA,KACEA,EAAA,cAACG,EAAU,+DAC+C,IACxDH,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,kDAAkD,EAAA,MAAA,CAGlD,CACI,EAEfL,EAAA,cAAA,KAAA,KACEA,EAAA,cAACG,EAAU,4FAEU,IACnBH,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,oDAAoD,EAAA,MAAA,CAGpD,CACI,EAEfL,EAAA,cAAA,KAAA,KACEA,EAAA,cAACG,EAAU,oDACoC,IAC7CH,EAAA,cAACK,EAAI,CACH,OAAO,SACP,IAAI,WACJ,KAAK,uDAAuD,EAAA,MAAA,CAGvD,CACI,CACV,CACF,CACS,CAGtB",
|
|
6
6
|
"names": ["AboutDialog", "onClose", "react_default", "Dialog", "DialogContent", "Typography", "version", "Link"]
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{h as b}from"./chunk-JJ3VMN7J.js";import"./chunk-7763LQXU.js";import{a as h,b as v}from"./chunk-YOLY6H5C.js";import{a as g}from"./chunk-PFO3G4CM.js";import{D as u,E as w,N as T,S as a,g as c,m as y,n as F,q as x,r as m,u as C}from"./chunk-EXFKF6XR.js";import{p as l,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";var D="https://gmod.org/JBrowseMSA/tutorials/protein_family";async function S(o){let n=await fetch(o);if(!n.ok)throw new Error(`HTTP ${n.status} fetching ${o} ${await n.text()}`);return n.text()}var G=g(function({handleClose:o,model:n}){let[r,k]=l(),[i,L]=l("file"),[s,O]=l(""),[f,p]=l(),[R,E]=l(!1);return e.createElement(h,{maxWidth:"xl",title:"Open annotation file",onClose:()=>{o()},open:!0},e.createElement(F,null,f?e.createElement(v,{error:f}):null,e.createElement(a,null,"Open a GFF3 file of annotations, such as the one `react-msaview-cli interpro` writes, or the JSON an InterProScan run returns."," ",e.createElement(C,{href:D,target:"_blank",rel:"noopener noreferrer"},"How to make one")),e.createElement("div",{style:{display:"flex",margin:30}},e.createElement(x,{component:"fieldset"},e.createElement(w,{value:i,onChange:t=>{L(t.target.value)}},e.createElement(m,{value:"url",control:e.createElement(u,null),label:"URL"}),e.createElement(m,{value:"file",control:e.createElement(u,null),label:"File"}))),i==="url"?e.createElement("div",null,e.createElement(a,null,"Open an annotation file from a URL"),e.createElement(T,{label:"URL",value:s,onChange:t=>{O(t.target.value)}})):e.createElement("div",{style:{paddingTop:20}},e.createElement(a,null,"Open an annotation file from your local drive"),e.createElement(c,{variant:"outlined",component:"label"},"Choose File",e.createElement("input",{type:"file",hidden:!0,onChange:({target:t})=>{let d=t.files?.[0];d&&k(d)}})),r?e.createElement(a,null,r.name):null))),e.createElement(y,null,e.createElement(c,{variant:"contained",color:"primary",disabled:R||(i==="file"?!r:!s.trim()),onClick:()=>{(async()=>{E(!0),p(void 0);try{let t=await(i==="file"&&r?r.text():S(s));n.setGFF(b(t)),n.setShowDomains(!0),n.setCellFill("domain"),o()}catch(t){console.error(t),p(t)}finally{E(!1)}})()}},"Open annotations"),e.createElement(c,{variant:"contained",color:"secondary",onClick:()=>{o()}},"Cancel")))}),J=G;export{J as default};
|
|
2
|
+
//# sourceMappingURL=AnnotationFileDialog-IDJWWQDB.js.map
|
package/dist/chunks/{AnnotationFileDialog-TFIHQACD.js.map → AnnotationFileDialog-IDJWWQDB.js.map}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
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
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/node_modules/react-msaview/src/components/dialogs/AnnotationFileDialog.tsx"],
|
|
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\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
|
+
"mappings": "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",
|
|
6
6
|
"names": ["domainsTutorial", "fetchText", "url", "response", "AnnotationFileDialog", "observer", "handleClose", "model", "file", "setFile", "useState", "choice", "setChoice", "setUrl", "error", "setError", "loading", "setLoading", "react_default", "Dialog", "DialogContent", "ErrorMessage", "Typography", "Link", "FormControl", "RadioGroup", "event", "FormControlLabel", "Radio", "TextField", "Button", "target", "chosen", "DialogActions", "text", "annotationTextToGFF", "e", "AnnotationFileDialog_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as h}from"./chunk-DW5INM5K.js";import{ea as z,ga as P}from"./chunk-LNMEYTCN.js";import{a as k,b as C}from"./chunk-YOLY6H5C.js";import{a as b}from"./chunk-PFO3G4CM.js";import{D as i,E as L,S as D,T as V,d as M,g as p,j as S,m as A,n as F,q as G,r as a,s as I}from"./chunk-EXFKF6XR.js";import{p as r,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";function K(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}function N(t){return t==="entire"||t==="viewport"||t==="selection"}var Q=b(function({model:t,onClose:c}){let[s,R]=r(!0),[o,q]=r(!0),[E,H]=r("viewport"),[d,W]=r(),[u,g]=r(!1),x=V(),{turnedOnTracks:B,showMsaLetters:O,resolvedSelection:y}=t,{colWidth:_,rowHeight:j}=t,f=B.length>0,n=E==="selection"&&!y?"entire":E,m=z(t,{theme:x,exportType:n,includeTracks:o}),v=P(t,m),w=O&&n!=="viewport"?Math.round(m.msaAreaWidth/_)*Math.round(m.contentHeight/j):0,J=w>1e5;return e.createElement(k,{onClose:()=>{c()},open:!0,title:"Export SVG"},e.createElement(F,null,d?e.createElement(C,{error:d}):null,e.createElement(D,null,"Settings:"),e.createElement(h,{label:"Include minimap?",disabled:n!=="viewport",checked:s,onChange:()=>{R(!s)}}),f?e.createElement(h,{label:"Include tracks?",checked:o,onChange:()=>{q(!o)}}):null,e.createElement("div",null,e.createElement(G,null,e.createElement(I,null,"Export type"),e.createElement(L,{value:n,onChange:l=>{let{value:T}=l.target;N(T)&&H(T)}},e.createElement(a,{value:"entire",control:e.createElement(i,null),label:"Entire MSA"}),e.createElement(a,{value:"viewport",control:e.createElement(i,null),label:"Current viewport only"}),y?e.createElement(a,{value:"selection",control:e.createElement(i,null),label:"Selection only"}):null))),J?e.createElement(M,{severity:"warning",style:{marginTop:8}},"The ",n==="selection"?"selection":"entire MSA"," is"," ",Math.round(v.width),"x",Math.round(v.height)," pixels and draws"," ",Math.round(w/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),e.createElement(A,null,e.createElement(p,{variant:"contained",color:"primary",disabled:u,startIcon:u?e.createElement(S,{size:16,color:"inherit"}):null,onClick:()=>{g(!0),K(()=>{t.exportSVG({theme:x,includeMinimap:s,includeTracks:f&&o,exportType:n}).then(()=>{c()}).catch(l=>{console.error(l),W(l)}).finally(()=>{g(!1)})})}},u?"Exporting\u2026":"Export"),e.createElement(p,{variant:"contained",color:"secondary",onClick:()=>{c()}},"Cancel")))}),te=Q;export{te as default};
|
|
2
|
+
//# sourceMappingURL=ExportSVGDialog-R7ANUOII.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/node_modules/react-msaview/src/components/dialogs/ExportSVGDialog.tsx"],
|
|
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 { ExportType } from '../../exportLayout.ts'\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\nfunction isExportType(value: string): value is ExportType {\n return value === 'entire' || value === 'viewport' || value === 'selection'\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 [chosenType, setExportType] = useState<ExportType>('viewport')\n const [error, setError] = useState<unknown>()\n const [exporting, setExporting] = useState(false)\n const theme = useTheme()\n const { turnedOnTracks, showMsaLetters, resolvedSelection } = model\n const { colWidth, rowHeight } = model\n const hasTracks = turnedOnTracks.length > 0\n const exportType =\n chosenType === 'selection' && !resolvedSelection ? 'entire' : chosenType\n const layout = getLayout(model, { theme, exportType, includeTracks })\n const page = exportPageSize(model, layout)\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 !== 'viewport'\n ? Math.round(layout.msaAreaWidth / colWidth) *\n Math.round(layout.contentHeight / rowHeight)\n : 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 !== 'viewport'}\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 (isExportType(value)) {\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 {resolvedSelection ? (\n <FormControlLabel\n value=\"selection\"\n control={<Radio />}\n label=\"Selection only\"\n />\n ) : null}\n </RadioGroup>\n </FormControl>\n </div>\n {isLargeExport ? (\n <Alert severity=\"warning\" style={{ marginTop: 8 }}>\n The {exportType === 'selection' ? 'selection' : 'entire MSA'} is{' '}\n {Math.round(page.width)}x{Math.round(page.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
|
+
"mappings": "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",
|
|
6
|
+
"names": ["afterPaint", "fn", "isExportType", "value", "ExportSVGDialog", "observer", "model", "onClose", "includeMinimap", "setIncludeMinimap", "useState", "includeTracks", "setIncludeTracks", "chosenType", "setExportType", "error", "setError", "exporting", "setExporting", "theme", "useTheme", "turnedOnTracks", "showMsaLetters", "resolvedSelection", "colWidth", "rowHeight", "hasTracks", "exportType", "layout", "getLayout", "page", "exportPageSize", "glyphs", "isLargeExport", "react_default", "Dialog", "DialogContent", "ErrorMessage", "Typography", "Checkbox2", "FormControl", "FormLabel", "RadioGroup", "event", "FormControlLabel", "Radio", "Alert", "DialogActions", "Button", "CircularProgress", "e", "ExportSVGDialog_default"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as b}from"./chunk-YOLY6H5C.js";import{a as c}from"./chunk-PFO3G4CM.js";import{H as k,I as F,J as n,K as w,L as E,N as x,g as f,h as T,n as C}from"./chunk-EXFKF6XR.js";import{p as h,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";function D(l,a){return[l.accession,l.name,l.description].some(o=>o.toLowerCase().includes(a))}var z=c(function({model:l,accessions:a}){let o=s=>{for(let m of a)l.setFilter(m,s)};return e.createElement("div",null,e.createElement(f,{onClick:()=>{o(!0)}},"Toggle all on"),e.createElement(f,{onClick:()=>{o(!1)}},"Toggle all off"))}),B=c(function({model:l}){let{annotationTypes:a,annotations:o,featureColors:s,fillPalette:m}=l,[g,v]=h(""),d=g.trim().toLowerCase(),p=[...a.values()].filter(t=>!d||D(t,d)),u=new Map,i=new Map;for(let t of o){let{accession:r}=t;u.set(r,(u.get(r)??0)+1),i.has(r)||i.set(r,s.get(t)?.fill??m[r])}return e.createElement(e.Fragment,null,e.createElement(x,{label:"Filter",size:"small",value:g,onChange:t=>{v(t.target.value)}}),e.createElement(z,{model:l,accessions:p.map(t=>t.accession)}),e.createElement(k,{size:"small"},e.createElement(w,null,e.createElement(E,null,e.createElement(n,{padding:"checkbox"}),e.createElement(n,null,"color"),e.createElement(n,null,"accession"),e.createElement(n,null,"name"),e.createElement(n,null,"count"),e.createElement(n,null,"description"))),e.createElement(F,null,p.map(({accession:t,name:r,description:y})=>e.createElement(E,{key:t},e.createElement(n,{padding:"checkbox"},e.createElement(T,{checked:!l.featureOff(t),onChange:()=>{l.setFilter(t,l.featureOff(t))}})),e.createElement(n,null,e.createElement("div",{style:{width:20,height:20,background:i.get(t)}})),e.createElement(n,null,t),e.createElement(n,null,r),e.createElement(n,null,u.get(t)),e.createElement(n,null,y))))))}),L=c(function({onClose:l,model:a}){return e.createElement(b,{onClose:()=>{l()},open:!0,title:"Feature filters",maxWidth:"xl"},e.createElement(C,null,e.createElement(B,{model:a})))}),A=L;export{A as default};
|
|
2
|
+
//# sourceMappingURL=FeatureDialog-A7LFBVGM.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/node_modules/react-msaview/src/components/dialogs/FeatureDialog.tsx"],
|
|
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
|
+
"mappings": "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",
|
|
6
|
+
"names": ["matches", "type", "query", "field", "Toggles", "observer", "model", "accessions", "setAll", "shown", "accession", "react_default", "Button", "FeatureTable", "annotationTypes", "annotations", "featureColors", "fillPalette", "setQuery", "useState", "needle", "types", "counts", "swatches", "annot", "TextField", "event", "Table", "TableHead", "TableRow", "TableCell", "TableBody", "name", "description", "Checkbox", "FeatureTypeDialog", "onClose", "Dialog", "DialogContent", "FeatureDialog_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import{a as p}from"./chunk-YOLY6H5C.js";import{a}from"./chunk-PFO3G4CM.js";import{F as u,S as r,g as m,m as c,n as d}from"./chunk-EXFKF6XR.js";import{p as s,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";var f=a(function({model:t}){let[h,l]=s(),i=h??t.allowedGappyness;return e.createElement("div",{style:{display:"flex",alignItems:"center",gap:8}},e.createElement(r,{style:{whiteSpace:"nowrap"}},"\u2265",i,"% gaps"),e.createElement(u,{"data-testid":"gappyness_slider",style:{width:200,marginInline:10},min:1,max:100,value:i,onChange:(y,n)=>{l(n)},onChangeCommitted:(y,n)=>{t.setAllowedGappyness(n),l(void 0)}}))}),g=f;var E=a(function({model:o,onClose:t}){return e.createElement(p,{open:!0,onClose:t,title:"Hide gappy columns"},e.createElement(d,null,e.createElement(r,{variant:"body2",sx:{mb:2}},"The viewer hides each column where at least this share of the rows has a gap."),e.createElement(g,{model:o})),e.createElement(c,null,e.createElement(m,{variant:"contained",onClick:t},"Close")))}),_=E;export{_ as default};
|
|
2
|
-
//# sourceMappingURL=GapThresholdDialog-
|
|
2
|
+
//# sourceMappingURL=GapThresholdDialog-LP4UN3SB.js.map
|
package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js.map → GapThresholdDialog-LP4UN3SB.js.map}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/node_modules/react-msaview/src/components/dialogs/GappynessSlider.tsx", "../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/node_modules/react-msaview/src/components/dialogs/GapThresholdDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["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", "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"],
|
|
5
5
|
"mappings": "0NAOA,IAAMA,EAAkBC,EAAS,SAAyB,CACxD,MAAAC,CAAK,EAGN,CACC,GAAM,CAACC,EAAWC,CAAY,EAAIC,EAAQ,EACpCC,EAAQH,GAAaD,EAAM,iBACjC,OACEK,EAAA,cAAA,MAAA,CAAK,MAAO,CAAE,QAAS,OAAQ,WAAY,SAAU,IAAK,CAAC,CAAE,EAI3DA,EAAA,cAACC,EAAU,CAAC,MAAO,CAAE,WAAY,QAAQ,CAAE,WACpCF,YAEPC,EAAA,cAACE,iBAYa,mBACZ,MAAO,CAAE,MAAO,IAAK,aAAc,EAAE,EACrC,IAAK,EACL,IAAK,IACL,MAAOH,EACP,SAAU,CAACI,EAAGC,IAAO,CACnBP,EAAaO,CAAG,CAClB,EACA,kBAAmB,CAACD,EAAGC,IAAO,CAC5BT,EAAM,oBAAoBS,CAAG,EAC7BP,EAAa,MAAS,CACxB,CAAC,CAAA,CACD,CAGR,CAAC,EAEDQ,EAAeZ,ECzCf,IAAMa,EAAqBC,EAAS,SAAU,CAC5C,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,OACEC,EAAA,cAACC,EAAM,CAAC,KAAI,GAAC,QAASF,EAAS,MAAM,oBAAoB,EACvDC,EAAA,cAACE,EAAa,KACZF,EAAA,cAACG,EAAU,CAAC,QAAQ,QAAQ,GAAI,CAAE,GAAI,CAAC,CAAE,EAAA,+EAAA,EAIzCH,EAAA,cAACI,EAAe,CAAC,MAAON,CAAK,CAAA,CAAI,EAEnCE,EAAA,cAACK,EAAa,KACZL,EAAA,cAACM,EAAM,CAAC,QAAQ,YAAY,QAASP,CAAO,EAAA,OAAA,CAEnC,CACK,CAGtB,CAAC,EAEDQ,EAAeX",
|
|
6
6
|
"names": ["GappynessSlider", "observer", "model", "dragValue", "setDragValue", "useState", "value", "react_default", "Typography", "Slider", "_", "val", "GappynessSlider_default", "GapThresholdDialog", "observer", "model", "onClose", "react_default", "Dialog", "DialogContent", "Typography", "GappynessSlider_default", "DialogActions", "Button", "GapThresholdDialog_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=GoToDialog-
|
|
1
|
+
import{b as l}from"./chunk-X5QA4AF6.js";import{a as e}from"./chunk-YOLY6H5C.js";import"./chunk-PFO3G4CM.js";import{n as r}from"./chunk-EXFKF6XR.js";import{r as o}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";function n({model:m,onClose:t}){return o.createElement(e,{open:!0,onClose:t,title:"Go to row or column",maxWidth:"xs",fullWidth:!0},o.createElement(r,null,o.createElement(l,{model:m,onFound:t})))}export{n as default};
|
|
2
|
+
//# sourceMappingURL=GoToDialog-3HM7K5RZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/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": "wNASc,SAAPA,EAA4B,CACjC,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,OACEC,EAAA,cAACC,EAAM,CACL,KAAI,GACJ,QAASF,EACT,MAAM,sBACN,SAAS,KACT,UAAS,EAAA,EAETC,EAAA,cAACE,EAAa,KACZF,EAAA,cAACG,EAAO,CAAC,MAAOL,EAAO,QAASC,CAAO,CAAA,CAAI,CAC7B,CAGtB",
|
|
6
6
|
"names": ["GoToDialog", "model", "onClose", "react_default", "Dialog", "DialogContent", "GoToBox_default"]
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f,b as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=HelpDialog-
|
|
1
|
+
import{a as f,b as g}from"./chunk-LFBMB523.js";import{a as b}from"./chunk-CKXVJK5K.js";import{a as m}from"./chunk-YOLY6H5C.js";import{H as s,I as p,J as a,L as E,S as n,g as r,m as c,n as u}from"./chunk-EXFKF6XR.js";import{g as i,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";var d=i(()=>import("./AboutDialog-QD4L7BYU.js"));function y({title:l,rows:t}){return e.createElement(e.Fragment,null,e.createElement(n,{variant:"subtitle2",sx:{mt:1}},l),e.createElement(s,{size:"small","aria-label":l},e.createElement(p,null,t.map(({label:o,action:C})=>e.createElement(E,{key:o},e.createElement(a,{sx:{whiteSpace:"nowrap",fontWeight:500}},o),e.createElement(a,null,C))))))}function k({model:l,onClose:t}){return e.createElement(m,{open:!0,title:"Mouse & keyboard",onClose:t},e.createElement(u,null,e.createElement(y,{title:"Mouse",rows:g}),e.createElement(y,{title:"Keyboard (click the alignment first)",rows:f})),e.createElement(c,null,e.createElement(n,{variant:"caption",sx:{mr:"auto",pl:1}},"MSAView ",b),e.createElement(r,{onClick:()=>{l.queueDialog(o=>[d,{onClose:o}]),t()}},"About & credits"),e.createElement(r,{variant:"contained",onClick:t},"Close")))}export{k as default};
|
|
2
|
+
//# sourceMappingURL=HelpDialog-GJKUU5Z6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@11.0.0_4d87629ce60f4a70309a0d727f3e914b/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": "mSAoBA,IAAMA,EAAcC,EAAK,IAAM,OAAO,2BAAmB,CAAC,EAE1D,SAASC,EAAa,CAAE,MAAAC,EAAO,KAAAC,CAAI,EAAsC,CACvE,OACEC,EAAA,cAAAA,EAAA,SAAA,KACEA,EAAA,cAACC,EAAU,CAAC,QAAQ,YAAY,GAAI,CAAE,GAAI,CAAC,CAAE,EAC1CH,CAAK,EAERE,EAAA,cAACE,EAAK,CAAC,KAAK,QAAO,aAAaJ,CAAK,EACnCE,EAAA,cAACG,EAAS,KACPJ,EAAK,IAAI,CAAC,CAAE,MAAAK,EAAO,OAAAC,CAAM,IACxBL,EAAA,cAACM,EAAQ,CAAC,IAAKF,CAAK,EAClBJ,EAAA,cAACO,EAAS,CAAC,GAAI,CAAE,WAAY,SAAU,WAAY,GAAG,CAAE,EACrDH,CAAK,EAERJ,EAAA,cAACO,EAAS,KAAEF,CAAM,CAAa,CAElC,CAAC,CACQ,CACN,CAGd,CAEc,SAAPG,EAA4B,CACjC,MAAAC,EACA,QAAAC,CAAO,EAIR,CACC,OACEV,EAAA,cAACW,EAAM,CAAC,KAAI,GAAC,MAAM,mBAAmB,QAASD,CAAO,EACpDV,EAAA,cAACY,EAAa,KACZZ,EAAA,cAACH,EAAY,CAAC,MAAM,QAAQ,KAAMgB,CAAa,CAAA,EAC/Cb,EAAA,cAACH,EAAY,CACX,MAAM,uCACN,KAAMiB,CAAgB,CAAA,CACtB,EAEJd,EAAA,cAACe,EAAa,KACZf,EAAA,cAACC,EAAU,CAAC,QAAQ,UAAU,GAAI,CAAE,GAAI,OAAQ,GAAI,CAAC,CAAE,aAC5Ce,CAAO,EAElBhB,EAAA,cAACiB,EAAM,CACL,QAAS,IAAK,CACZR,EAAM,YAAYS,GAAQ,CAACvB,EAAa,CAAE,QAASuB,CAAI,CAAE,CAAC,EAC1DR,EAAO,CACT,CAAC,EAAA,iBAAA,EAIHV,EAAA,cAACiB,EAAM,CAAC,QAAQ,YAAY,QAASP,CAAO,EAAA,OAAA,CAEnC,CACK,CAGtB",
|
|
6
6
|
"names": ["AboutDialog", "lazy", "ControlTable", "title", "rows", "react_default", "Typography", "Table", "TableBody", "label", "action", "TableRow", "TableCell", "HelpDialog", "model", "onClose", "Dialog", "DialogContent", "mouseControls", "keyboardControls", "DialogActions", "version", "Button", "done"]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Ct}from"./chunk-
|
|
2
|
-
${i}`:m==="missing"?"This transcript has no coding sequence, so there is nothing to translate.":m==="error"?"The sequence could not be fetched.":"Loading..."}):null)}),G=Co;var ae={drawNodeBubbles:!0,colWidth:10,rowHeight:12};function q({view:o,feature:t,placement:r,...n}){return bt(j(o),{placement:r,connectedViewId:o.id,connectedFeature:t?.toJSON(),...n})}function Q(o){let[t,r]=d(),n=ge(!1);return{launchError:t,submit:a=>{n.current||(n.current=!0,r(void 0),a().then(o,s=>{n.current=!1,console.error(s),r(s)}))}}}var Dt=o=>o==null||o===!1;function Lo(o){return Dt(o)||Array.isArray(o)&&o.some(Dt)?null:JSON.stringify(o)}function E(o,t,{onSuccess:r}={}){let n=Lo(o),[a,s]=d(0),[i,m]=d(),p=n===null?null:`${a}\0${n}`,l=i?.attempt===p,h=i?.question===n,g=ge({fetcher:t,onSuccess:r});return he(()=>{g.current={fetcher:t,onSuccess:r}}),he(()=>{if(p===null||n===null)return;let c=new AbortController;return g.current.fetcher(c.signal).then(f=>{c.signal.aborted||(m({attempt:p,question:n,data:f}),g.current.onSuccess?.(f))}).catch(f=>{c.signal.aborted||m({attempt:p,question:n,error:f})}),()=>{c.abort()}},[p,n]),{data:h?i.data:void 0,error:l?i.error:void 0,isLoading:p!==null&&!l,mutate:Ye(()=>{s(c=>c+1)},[])}}function Ee(o,t){let[r,n]=d(o);return he(()=>{let a=setTimeout(()=>{n(o)},t);return()=>{clearTimeout(a)}},[o,t]),r}function Ot({view:o,feature:t}){let r=o?.assemblyNames?.[0],{data:n,error:a,isLoading:s}=E(t&&r?[t.id(),r,"feature-sequence"]:null,async m=>{let{start:p,end:l,refName:h}=t.toJSON();return vt({start:p,end:l,refName:h,assemblyName:r,session:j(o),signal:m})});return{proteinSequence:I(()=>n&&t?yt({transcript:t,...n})?.protein??"":"",[n,t]),sequence:n,error:a,isLoading:s}}function No(o,t,r){if(!r)return o;let n=t.find(s=>Y(s)===o);if(n&&r(n))return o;let a=t.find(r);return a?Y(a):o}function ko({error:o,isLoading:t,proteinSequence:r}){return o?"error":t?"loading":r?"ready":"missing"}function H({feature:o,view:t,hasData:r,preferredTranscriptId:n}){let a=I(()=>Ae(o),[o]),[s,i]=d(()=>Y(a.find(c=>Me(c,n??""))??a[0])),m=No(s,a,r),p=a.find(c=>Y(c)===m),{proteinSequence:l,error:h,isLoading:g}=Ot({view:t,feature:p});return{options:a,selectedId:m,setSelectedId:i,selectedTranscript:p,proteinSequence:l,error:h,isLoading:g,sequenceStatus:ko({error:h,isLoading:g,proteinSequence:l}),hasData:r}}var jt=pe(fe("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var Fo=y()({header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},resultList:{maxHeight:300,overflow:"auto"}});function _t(o){let t=[o.geneName,o.transcriptName!==o.geneName?o.transcriptName:void 0].filter(r=>!!r);return t.length>0?t.join(" - "):o.geneId??o.transcriptId??"Unknown"}function Po(o){return[o.blastDatabase,o.searchProgram??o.blastProgram??"blastp",o.msaAlgorithm].filter(Boolean).join(" / ")}var Io=u(function({model:o,handleClose:t,feature:r,cached:{results:n,handleDelete:a,handleClearAll:s}}){let{classes:i}=Fo(),m=B(o),[p,l]=d(),[h]=qe(),g=c=>{let{transcriptId:f,msa:T,tree:S,treeMetadata:L}=c;q({view:m,feature:f?Ae(r).find(x=>Me(x,f)):void 0,placement:h?"splitRight":"stack",displayName:`BLAST - ${_t(c)}`,...ae,data:{msa:T,tree:S,treeMetadata:L}}).then(t,x=>{console.error(x),l(x)})};return e.createElement("div",null,p?e.createElement(Se,{error:p}):null,e.createElement("div",{className:i.header},e.createElement(M,{variant:"subtitle1"},"Cached BLAST Results (",n.length,")"),e.createElement(O,{size:"small",color:"error",onClick:async()=>{try{l(void 0),await s()}catch(c){l(c)}}},"Clear results for this gene")),e.createElement(it,{dense:!0,className:i.resultList},n.map(c=>e.createElement(lt,{key:c.id,disablePadding:!0,secondaryAction:e.createElement(re,{edge:"end",size:"small",onClick:async f=>{f.stopPropagation();try{l(void 0),await a(c.id)}catch(T){l(T)}}},e.createElement(jt,{fontSize:"small"}))},e.createElement(mt,{onClick:()=>{g(c)}},e.createElement(ct,{primary:`${_t(c)} - ${Po(c)}`,secondary:`${new Date(c.timestamp).toLocaleString()} - Seq: ${c.proteinSequence.slice(0,30)}...`}))))))}),$t=Io;var Bo=u(function({value:t,onChange:r,className:n}){return e.createElement(b,{variant:"outlined",label:"MSA Algorithm",className:n,select:!0,value:t,helperText:t==="browser"?"no EBI job; rows aligned to the query":void 0,onChange:a=>{r(a.target.value)}},Ne.map(a=>e.createElement(F,{value:a,key:a},wt[a])))}),De=Bo;var qo="msaView-blastSearch",Eo="msaView-msaAlgorithm",Vt=Fe("blastp"),Gt="clustalo";function Do(o){let{program:t,database:r}=o??{},n=ke.find(a=>a===t);return n&&Pe(n).some(a=>a===r)?{program:n,database:r}:Vt}function Oo(o){return Ne.find(t=>t===o)??Gt}function Qt(){let[o,t]=K(qo,Vt);return[Do(o),r=>{t(r)}]}function Oe(){let[o,t]=K(Eo,Gt);return[Oo(o),r=>{t(r)}]}function Ht(o){let{data:t,error:r,isLoading:n,mutate:a}=E(`cached-blast-${o.join(",")}`,async()=>(await At()).filter(i=>i.geneId&&o.includes(i.geneId)));return{results:t??[],error:r,isLoading:n,handleDelete:async s=>{await Qe(s),a()},handleClearAll:async()=>{await Promise.all((t??[]).map(s=>Qe(s.id))),a()}}}var jo=y()({selectField:{width:150},databaseField:{width:260},cachedResultsAccordion:{marginTop:20},infoText:{marginTop:20}}),_o=u(function({handleClose:o,feature:t,model:r,children:n,preferredTranscriptId:a}){let{classes:s}=jo(),i=B(r),{launchError:m,submit:p}=Q(o),[l,h]=Qt(),[g,c]=Oe(),[f,T]=d(String(Tt)),S=Number(f),L=Number.isInteger(S)&&S>=1,x=l.program==="phmmer",k=I(()=>Le(t),[t]),A=Ht(k),C=H({feature:t,view:i,preferredTranscriptId:a}),{selectedTranscript:v,proteinSequence:P,sequenceStatus:W}=C,N=C.error??m??A.error;return e.createElement(e.Fragment,null,e.createElement($,{error:N},n,e.createElement(b,{variant:"outlined",label:"Search program",className:s.selectField,select:!0,value:l.program,onChange:w=>{h(Fe(w.target.value))}},ke.map(w=>e.createElement(F,{value:w,key:w},xt[w]))),e.createElement(b,{variant:"outlined",label:"Database",className:s.databaseField,select:!0,value:l.database,onChange:w=>{h({program:l.program,database:w.target.value})}},Pe(l.program).map(w=>e.createElement(F,{value:w,key:w},Mt(w)))),x?null:e.createElement(De,{className:s.selectField,value:g,onChange:c}),e.createElement(b,{variant:"outlined",label:"Hits",className:s.selectField,type:"number",value:f,onChange:w=>{T(w.target.value)},error:!L,helperText:"best-scoring sequences to keep"}),e.createElement(G,{feature:t,...C}),e.createElement(M,{variant:"body2",className:s.infoText},x?"phmmer aligns the hits as it finds them, so nothing is realigned afterwards.":"The hits come back from EBI and are then run through the chosen aligner."," ","The EBI queue is the wait, and it runs from seconds to many minutes."),A.results.length>0?e.createElement(tt,{className:s.cachedResultsAccordion},e.createElement(rt,{expandIcon:e.createElement(pt,null)},e.createElement(M,null,"Previous BLAST Results")),e.createElement(ot,null,e.createElement($t,{model:r,handleClose:o,feature:t,cached:A}))):null),e.createElement(V,{model:r,hint:e.createElement(z,{status:W}),submitDisabled:!P||!L,onSubmit:w=>{if(v){let R=l.program==="phmmer"?{searchProgram:"phmmer",blastDatabase:l.database,maxHits:S,selectedTranscript:v.toJSON(),proteinSequence:P}:{searchProgram:"blastp",blastDatabase:l.database,msaAlgorithm:g,maxHits:S,selectedTranscript:v.toJSON(),proteinSequence:P};p(()=>q({view:i,feature:v,placement:w,displayName:ht(t,v),...ae,blastParams:R}))}},onCancel:o}))}),Wt=_o;function Ut(o){return Ce(o).toUpperCase()}function $o(o,t){let r=Math.min(o.length,t.length);if(r===0)return 0;let n=0;for(let a=0;a<r;a++)o[a]===t[a]&&n++;return n/r}var Vo=.9,Go=.5;function zt(o,t,r){if(!o.trim())return{names:[]};let n;try{n=Lt(o)}catch{return{names:[]}}let a=n.getNames(),s=Ut(t);return{names:a,match:s?Ho(n,a,s,r):void 0}}function Qo(o,t,r){let n=Ut(Nt(o.getRow(t)));if(n){if(n===r)return{name:t,quality:"exact",identity:1,offset:0};{let a=r.indexOf(n),s=n.indexOf(r);if(a!==-1||s!==-1){let i=Math.min(n.length,r.length)/Math.max(n.length,r.length);return i>=Go?{name:t,quality:"partial",identity:i,offset:a===-1?-s:a}:void 0}else{let i=$o(n,r);return i>=Vo?{name:t,quality:"similar",identity:i,offset:0}:void 0}}}else return}var Jt=["exact","partial","similar"];function Ho(o,t,r,n){return t.map(a=>Qo(o,a,r)).filter(a=>a!==void 0).sort((a,s)=>Jt.indexOf(a.quality)-Jt.indexOf(s.quality)||s.identity-a.identity||+(s.name===n)-+(a.name===n))[0]}function Kt(o,t){return o.querySeqName||(o.names.includes(t)?t:"")}function se(o,t,r){let[n,a]=d(),{names:s,match:i}=I(()=>zt(o,t,r),[o,t,r]),m=n!==void 0&&(s.length===0||s.includes(n))?n:void 0,p=m??i?.name??"";return{detected:i,names:s,querySeqName:p,querySeqOffset:p===i?.name?i.offset:0,setQuerySeqName:a,isAutoDetected:m===void 0&&!!i}}var Wo=y()({field:{marginTop:20},alert:{marginTop:10}});function Jo({identity:o,offset:t}){let r=`, covering ${Math.round(o*100)}% of it`;return t>0?`${r} from residue ${t+1}`:t<0?`${r} and running ${-t} residues past its start`:r}var Uo=u(function({names:t,detected:r,querySeqName:n,setQuerySeqName:a,isAutoDetected:s}){let{classes:i}=Wo();return e.createElement(e.Fragment,null,t.length>0?e.createElement(b,{variant:"outlined",label:"MSA row matching the selected transcript",select:!0,fullWidth:!0,className:i.field,value:t.includes(n)?n:"",onChange:m=>{a(m.target.value)}},t.map(m=>e.createElement(F,{value:m,key:m},m,r?.name===m?" \u2014 matches your protein":""))):e.createElement(b,{variant:"outlined",label:"MSA row matching the selected transcript",fullWidth:!0,className:i.field,helperText:"Paste an alignment above and this fills in on its own",value:n,onChange:m=>{a(m.target.value)}}),s&&r?r.quality==="similar"?e.createElement(oe,{severity:"warning",className:i.alert},e.createElement("strong",null,r.name)," is"," ",Math.round(r.identity*100),"% identical to your protein but is not the same sequence. Clicking the alignment navigates the genome view, approximately: wherever the two differ by an insertion or a deletion, every residue after it lands one codon off."):e.createElement(oe,{severity:"success",className:i.alert},"Matched ",e.createElement("strong",null,r.name)," to your protein sequence",r.quality==="exact"?"":Jo(r),". Clicking the alignment will navigate the genome view."):t.length>0&&!n?e.createElement(oe,{severity:"warning",className:i.alert},"No row matched your protein sequence \u2014 pick the one for your gene above. Without it the alignment still renders, but clicking it will not navigate the genome view."):null)}),ie=Uo;var zo=y()({ncbiLink:{wordBreak:"break-all"},textAreaFont:{fontFamily:"Courier New"},msaInput:{marginBottom:20},step:{marginTop:20},stepBody:{marginLeft:20,marginTop:8}}),Ko=u(function({handleClose:o,feature:t,model:r,children:n,preferredTranscriptId:a}){let{classes:s}=zo(),i=B(r),{launchError:m,submit:p}=Q(o),[l,h]=d(""),[g,c]=d(""),f=H({feature:t,view:i,preferredTranscriptId:a}),{proteinSequence:T,selectedTranscript:S,error:L}=f,x=se(l,T),k=Ce(T),A=`${Ge}?PAGE_TYPE=BlastSearch&PAGE=Proteins&PROGRAM=blastp&QUERY=${k}`,C=`${Ge}?PAGE_TYPE=BlastSearch&PAGE=Proteins&PROGRAM=blastp&QUERY=${Je(k,10)}`;return e.createElement(e.Fragment,null,e.createElement($,{error:m??L},n,e.createElement(G,{feature:t,...f}),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"1. Run the search at NCBI"),e.createElement("div",{className:s.stepBody},T?e.createElement("div",{className:s.ncbiLink},e.createElement(Ct,{href:A},C)):e.createElement(oe,{severity:"info"},"Pick a transcript above to get a link carrying its protein sequence."))),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"2. Align the hits"),e.createElement("div",{className:s.stepBody},e.createElement(M,null,`On the results page click "Multiple Alignment" to run COBALT, NCBI's aligner. Download the alignment (.aln) and, if you want the tree drawn, the Newick tree (.nh).`))),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"3. Paste the results back here"),e.createElement("div",{className:s.stepBody},e.createElement(b,{variant:"outlined",label:"Alignment",multiline:!0,minRows:5,maxRows:10,fullWidth:!0,className:s.msaInput,slotProps:{input:{className:s.textAreaFont}},placeholder:"Paste the .aln contents here",value:l,onChange:v=>{h(v.target.value)}}),e.createElement(b,{variant:"outlined",label:"Tree (optional)",multiline:!0,minRows:3,maxRows:10,fullWidth:!0,slotProps:{input:{className:s.textAreaFont}},placeholder:"Paste the .nh Newick tree here",value:g,onChange:v=>{c(v.target.value)}}),e.createElement(ie,{...x})))),e.createElement(V,{model:r,submitDisabled:!S||!l.trim(),onSubmit:v=>{S&&p(()=>q({view:i,feature:S,placement:v,displayName:_(S),querySeqName:x.querySeqName,querySeqOffset:x.querySeqOffset,data:{msa:l,tree:g}}))},onCancel:o}))}),Yt=Ko;var Yo=u(function({lookupMethod:t,setLookupMethod:r}){return e.createElement(ve,{component:"fieldset"},e.createElement(we,{row:!0,value:t,onChange:n=>{r(n.target.value)}},e.createElement(U,{value:"automatic",control:e.createElement(ne,null),label:"Automatic"}),e.createElement(U,{value:"manual",control:e.createElement(ne,null),label:"Manual"})))}),Xt=Yo;var Xo=y()({field:{minWidth:300},help:{marginBottom:8}}),Zo=u(function({handleClose:t,ebiEmail:r}){let{classes:n}=Xo(),[a,s]=d(r);return e.createElement(at,{open:!0,maxWidth:"lg",onClose:()=>{t()}},e.createElement(st,null,"EBI settings"),e.createElement(ye,null,e.createElement(M,{variant:"subtitle2",className:n.help},"Every search this tab runs is submitted to EBI with this address, which is how they reach whoever is generating the load. If your site sends real volume, use your own."),e.createElement(b,{autoFocus:!0,margin:"dense",label:"EBI contact email",fullWidth:!0,variant:"outlined",value:a,className:n.field,onChange:i=>{s(i.target.value)}}),e.createElement(O,{variant:"contained",onClick:()=>{s(me)}},"Reset")),e.createElement(be,null,e.createElement(O,{variant:"contained",color:"secondary",onClick:()=>{t()}},"Cancel"),e.createElement(O,{color:"primary",variant:"contained",onClick:()=>{t({ebiEmail:a})}},"Save")))}),Zt=Zo;var Ro=y()({settingsButton:{float:"right"}}),er={automatic:Wt,manual:Yt},tr=u(function({handleClose:t,model:r,feature:n,preferredTranscriptId:a}){let[s,i]=d("automatic"),[m,p]=K(dt,me),[l,h]=d(!1),{classes:g}=Ro(),c=er[s];return e.createElement(e.Fragment,null,e.createElement(Te,{title:`EBI settings \u2014 jobs are submitted with ${m.trim()||me}`},e.createElement(re,{className:g.settingsButton,"aria-label":"EBI settings",size:"small",onClick:()=>{h(!0)}},e.createElement(It,null))),e.createElement(c,{model:r,feature:n,handleClose:t,preferredTranscriptId:a},e.createElement(Xt,{lookupMethod:s,setLookupMethod:i})),l?e.createElement(Zt,{ebiEmail:m,handleClose:f=>{f&&p(f.ebiEmail),h(!1)}}):null)}),Rt=tr;var or=Ke(()=>import("./HelpDialog-3IR65NL3.js")),rr=u(function(){let[t,r]=d(!1);return e.createElement(e.Fragment,null,e.createElement(Te,{title:"What each tab does"},e.createElement(re,{"aria-label":"Help",onClick:()=>{r(!0)}},e.createElement(kt,null))),t?e.createElement(Ue,{fallback:null},e.createElement(or,{handleClose:()=>{r(!1)}})):null)}),eo=rr;function nr(o){let t=Ee(o,500),{data:r,error:n,isLoading:a}=E(t?[JSON.stringify(t),"msa-file-text"]:null,()=>Ze(t).readFile("utf8"));return{text:r??"",error:n,isLoading:a||t!==o}}var ar=y()({inputContainer:{marginBottom:30},fileContainer:{maxWidth:500},msaInput:{marginBottom:20}}),sr=u(function({model:t,feature:r,handleClose:n,preferredTranscriptId:a}){let s=B(t),{classes:i}=ar(),{launchError:m,submit:p}=Q(n),[l,h]=d("file"),[g,c]=d(""),[f,T]=d(""),[S,L]=d(),[x,k]=d(),A=H({feature:r,view:s,preferredTranscriptId:a}),{selectedTranscript:C,proteinSequence:v,error:P,sequenceStatus:W}=A,N=nr(l==="file"?S:void 0),w=se(l==="file"?N.text:g,v),R=m??P??N.error;return e.createElement(e.Fragment,null,e.createElement($,{error:R},e.createElement(ve,{component:"fieldset"},e.createElement(we,{row:!0,value:l,onChange:J=>{h(J.target.value)}},e.createElement(U,{value:"file",control:e.createElement(ne,null),label:"Open files"}),e.createElement(U,{value:"text",control:e.createElement(ne,null),label:"Paste text"}))),e.createElement("div",{className:i.inputContainer},l==="file"?e.createElement("div",{className:i.fileContainer},e.createElement($e,{name:"MSA File .aln (Clustal), .fa/.mfa (aligned FASTA), .stock (Stockholm), etc)",inline:!0,location:S,setLocation:L}),e.createElement($e,{name:"Tree file .nh (Newick) or .asn (NCBI COBALT ASN.1)",inline:!0,location:x,setLocation:k})):e.createElement(e.Fragment,null,e.createElement(b,{variant:"outlined",name:"MSA",multiline:!0,minRows:5,className:i.msaInput,maxRows:10,fullWidth:!0,placeholder:"Paste MSA here",value:g,onChange:J=>{c(J.target.value)}}),e.createElement(b,{variant:"outlined",name:"Tree",multiline:!0,minRows:5,maxRows:10,fullWidth:!0,placeholder:"Paste newick tree (optional)",value:f,onChange:J=>{T(J.target.value)}}))),e.createElement(G,{feature:r,...A}),e.createElement(ie,{...w})),e.createElement(V,{model:t,hint:e.createElement(z,{status:W}),submitDisabled:!C||l==="file"&&(!S||N.isLoading)||l==="text"&&!g.trim(),onSubmit:J=>{C&&p(()=>q({view:s,feature:C,placement:J,displayName:_(C),querySeqName:w.querySeqName,querySeqOffset:w.querySeqOffset,...l==="file"?{msaFilehandle:S,treeFilehandle:x}:{data:{msa:g,tree:f}}}))},onCancel:n}))}),to=sr;var ir="msaview-ortholog-source",oo={ncbi:"NCBI orthologs",panther:"PANTHER",uniref:"UniRef cluster"},ro=Object.keys(oo);function lr(o){return ro.find(t=>t===o)??"ncbi"}function no(){let[o,t]=K(ir,"ncbi");return[lr(o),r=>{t(r)}]}var mr={ncbi:"vertebrates and insects",panther:"also yeast, worm, fly and plants",uniref:"all of UniProtKB within 50% identity"},cr=u(function({value:t,onChange:r,className:n}){return e.createElement(b,{variant:"outlined",label:"Source",className:n,select:!0,value:t,helperText:mr[t],onChange:a=>{r(a.target.value)}},ro.map(a=>e.createElement(F,{value:a,key:a},oo[a])))}),ao=cr;async function so(o,t){let r=o.trim();if(!r)return;if(/^\d+$/.test(r))return Number(r);let a=(await Be(Ie("esearch",{db:"taxonomy",term:r,retmax:"1",retmode:"json"}),{signal:t})).esearchresult?.idlist?.[0];return a?Number(a):void 0}async function io(o,t){let r=o.trim();if(!r)return;let a=(await Be(Ie("esearch",{db:"assembly",term:r,retmax:"1",retmode:"json"}),{signal:t})).esearchresult?.idlist?.[0];if(!a)return;let i=(await Be(Ie("esummary",{db:"assembly",id:a,retmode:"json"}),{signal:t})).result?.[a],m=Number(i?.speciestaxid);return i?.speciesname&&m?{taxId:m,speciesName:i.speciesname}:void 0}async function ur(o,t){let r=await so(o,t);if(!r)throw new Error(`No NCBI taxon matches "${o}"`);let n=[],a=(await Pt([r],t,i=>{n.push(i)})).get(r);if(!a&&n.length>0)throw new Error(`NCBI did not answer for the name of taxon ${r}`,{cause:n[0]});let s=[a?.sciname,a?.commonName&&`(${a.commonName})`].filter(Boolean).join(" ");return{taxId:r,label:s||`taxon ${r}`}}var dr=u(function({value:t,assemblyName:r,onChange:n,className:a}){let[s,i]=d(),m=Ee(s,400),{data:p}=E(r&&s===void 0?[r,"assembly-species"]:null,f=>io(r,f),{onSuccess:f=>{f&&n(f.taxId)}}),{data:l,error:h}=E(m?.trim()?[m.trim(),"taxon"]:null,f=>ur(m,f),{onSuccess:({taxId:f})=>{n(f)}}),g=s??p?.speciesName??"human",c=s===void 0?p?.speciesName:l?.label;return e.createElement(b,{variant:"outlined",label:"Query species",className:a,value:g,onChange:f=>{i(f.target.value)},error:!!h,helperText:h?`${h}`:c??`the species this gene is from (taxon ${t})`})}),lo=dr;var pr=y()({selectField:{width:180}}),fr={ncbi:o=>`the ${o} closest species NCBI has`,panther:o=>`the ${o} closest species PANTHER has`,uniref:o=>`${o} rows, one per species, reviewed entries first`},hr=u(function({handleClose:o,feature:t,model:r,preferredTranscriptId:n}){let{classes:a}=pr(),s=B(r),{launchError:i,submit:m}=Q(o),[p,l]=d(9606),[h,g]=no(),[c,f]=Oe(),[T,S]=d(String(Ft)),L=I(()=>Le(t),[t]),x=H({feature:t,view:s,preferredTranscriptId:n}),{selectedTranscript:k,proteinSequence:A,sequenceStatus:C}=x,v=x.error??i,P=Number(T),W=Number.isInteger(P)&&P>=2;return e.createElement(e.Fragment,null,e.createElement($,{error:v},e.createElement(M,{variant:"body2"},"Precomputed orthologs, one gene per species, looked up rather than searched for. No BLAST job to queue, and with the in-browser aligner no job at all."),e.createElement("div",null,e.createElement(ao,{className:a.selectField,value:h,onChange:g}),e.createElement(lo,{className:a.selectField,value:p,assemblyName:s.assemblyNames[0],onChange:l}),e.createElement(De,{className:a.selectField,value:c,onChange:f}),e.createElement(b,{variant:"outlined",label:"Rows to align",className:a.selectField,type:"number",value:T,onChange:N=>{S(N.target.value)},error:!W,helperText:W?fr[h](P):"a whole number, 2 or more"})),e.createElement(G,{feature:t,...x})),e.createElement(V,{model:r,hint:e.createElement(z,{status:C}),submitDisabled:!A||!W,onSubmit:N=>{k&&m(()=>q({view:s,feature:k,placement:N,displayName:`Orthologs - ${_(t)} - ${X(k)}`,...ae,orthologParams:{taxId:p,source:h,maxSpecies:P,geneCandidates:L,msaAlgorithm:c,selectedTranscript:k.toJSON(),proteinSequence:A}}))},onCancel:o}))}),mo=hr;var Z=JBrowseExports["@jbrowse/core/data_adapters/dataAdapterCache"],gr=o=>Z!=null&&o in Object(Z)?Z[o]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+o+"' from '@jbrowse/core/data_adapters/dataAdapterCache' to plugins: MsaView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:o});var co=gr("getAdapter");var hi=Z&&Z.__esModule?Z.default:Z;async function uo(o,t){return(await co(o,"msa",t)).dataAdapter}async function po({config:o,pluginManager:t,assemblyName:r}){return(await uo(t,o)).getMSAList(r)}async function fo({config:o,pluginManager:t,msaId:r,assemblyName:n}){return(await uo(t,o)).getMSA(r,n)}function je(o){return o.msa?He(o.msa,"datasets"):void 0}var Sr=y()({selectedContainer:{marginTop:50}}),br=u(function({model:o,feature:t,handleClose:r,preferredTranscriptId:n}){let a=j(o),s=B(o),{classes:i}=Sr(),{pluginManager:m}=We(o),{assemblyNames:p}=s,l=p[0],{launchError:h,submit:g}=Q(r),c=je(a.jbrowse),[f,T]=d(c?.[0]?.datasetId),S=c?.find(D=>D.datasetId===f),{data:L,isLoading:x,error:k}=E(S?`${S.datasetId}-${l}-msa-list`:null,()=>po({config:S.adapter,pluginManager:m,assemblyName:l})),A=I(()=>L&&new Set(L),[L]),C=H({feature:t,view:s,hasData:A?D=>!!Ve(D,t,A):void 0,preferredTranscriptId:n}),{selectedTranscript:v,proteinSequence:P,sequenceStatus:W}=C,N=v&&A?Ve(v,t,A):void 0,{data:w,isLoading:R,error:J}=E(N&&S?`${S.datasetId}-${l}-${N}-msa`:null,()=>fo({msaId:N,assemblyName:l,config:S.adapter,pluginManager:m})),ee=w?.msa??"",_e=se(ee,P,w?.queryRowName),de=Kt(_e,`${N??""}_${l??""}`),go=k??J??C.error??h;return e.createElement(e.Fragment,null,e.createElement($,{error:go},e.createElement(b,{select:!0,label:"Select MSA dataset",value:f,onChange:D=>{T(D.target.value)}},c?.map(D=>e.createElement(F,{key:D.datasetId,value:D.datasetId},D.name))),S?e.createElement("div",{className:i.selectedContainer},!x&&R?e.createElement(te,{variant:"h6",message:`Loading MSA for ${X(v)||N}`}):null,x?e.createElement(te,{variant:"h6",message:`Loading available MSAs for (${S.name})`}):null,L?e.createElement("div",null,e.createElement(et,{html:S.description}),e.createElement(G,{feature:t,...C}),ee?e.createElement(ie,{..._e,querySeqName:de}):null):null):null),e.createElement(V,{model:o,hint:R?e.createElement(te,{message:"Loading alignment"}):ee&&!de?e.createElement(M,{color:"textSecondary",variant:"body2"},"no row matches this transcript"):e.createElement(z,{status:W}),submitDisabled:!v||!ee||!de,onSubmit:D=>{v&&ee&&g(()=>q({view:s,feature:v,placement:D,displayName:_(v),drawNodeBubbles:!1,labelsAlignRight:!0,showBranchLen:!1,colWidth:10,rowHeight:12,colorSchemeName:"percent_identity_dynamic",querySeqName:de,querySeqOffset:_e.querySeqOffset,data:{msa:ee,tree:w?.tree}}))},onCancel:r}))}),ho=br;var yr=u(function({children:t,value:r,index:n}){let a=r===n,[s,i]=d(a);return a&&!s&&i(!0),e.createElement("div",{role:"tabpanel",hidden:!a},s||a?t:null)}),ue=yr;var vr=u(function({handleClose:t,feature:r,model:n,preferredTranscriptId:a}){let s=j(n),m=!!je(s.jbrowse)?.length,[p,l]=d("orthologs");return e.createElement(Re,{maxWidth:"xl",title:"Launch MSA view",open:!0,onClose:t},e.createElement(qt,null,e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement(ut,{value:p,onChange:(h,g)=>{l(g)}},e.createElement(le,{label:"Orthologs",value:"orthologs"}),e.createElement(le,{label:"BLAST query",value:"ncbi_blast"}),m?e.createElement(le,{label:"Pre-loaded MSA datasets",value:"preloaded_msa"}):null,e.createElement(le,{label:"Manual upload",value:"manual_msa"})),e.createElement(eo,null)),e.createElement(ue,{value:p,index:"orthologs"},e.createElement(mo,{handleClose:t,feature:r,model:n,preferredTranscriptId:a})),e.createElement(ue,{value:p,index:"ncbi_blast"},e.createElement(Rt,{handleClose:t,feature:r,model:n,preferredTranscriptId:a})),m?e.createElement(ue,{value:p,index:"preloaded_msa"},e.createElement(ho,{model:n,feature:r,handleClose:t,preferredTranscriptId:a})):null,e.createElement(ue,{value:p,index:"manual_msa"},e.createElement(to,{model:n,feature:r,handleClose:t,preferredTranscriptId:a}))))}),rl=vr;export{rl as default};
|
|
3
|
-
//# sourceMappingURL=LaunchMsaViewDialog-
|
|
1
|
+
import{a as Ct}from"./chunk-ZWQTJTRR.js";import{F as Pt,a as B,c as ft,d as Y,e as Me,f as Ve,g as X,h as _,i as ht,j as Ae,k as Ce,l as Le,m as yt,n as vt,s as At,t as Qe,u as Ie,x as Be,z as Ft}from"./chunk-SIKAYSRK.js";import{g as K,h as dt,i as me,k as Ge,l as Ne,m as wt,n as ke,o as xt,p as Tt,r as Fe,s as Pe,t as Mt}from"./chunk-KHRURQPK.js";import{a as pt,b as kt}from"./chunk-CREQPIFJ.js";import{d as Lt,e as Nt}from"./chunk-JJ3VMN7J.js";import{a as gt,b as ce,c as St,d as bt}from"./chunk-DECSTFAT.js";import{a as y}from"./chunk-3KTCIF2L.js";import{a as pe,b as fe}from"./chunk-7ZEXFLSY.js";import{a as Ze}from"./chunk-YN7VVNZR.js";import{c as He}from"./chunk-QBRNXRNU.js";import"./chunk-7763LQXU.js";import{e as We,f as j,n as Je}from"./chunk-AISU7SRE.js";import{a as Re,b as Se,c as $e,d as te,e as et}from"./chunk-YOLY6H5C.js";import{a as u}from"./chunk-PFO3G4CM.js";import{B as F,D as ne,E as we,G as le,M as ut,N as xe,R as Te,S as M,a as tt,b as ot,c as rt,d as oe,g as O,h as nt,l as at,m as be,n as ye,o as st,q as ve,r as U,t as re,v as it,w as lt,x as mt,z as ct}from"./chunk-EXFKF6XR.js";import{b as Ue,c as ze,g as Ke,h as Ye,i as Xe,j as he,n as I,o as ge,p as d,r as e}from"./chunk-TEYYBCMF.js";import"./chunk-KVMUXFPB.js";var It=pe(fe("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var So=u(function({children:t,...r}){return e.createElement("div",null,e.createElement(xe,{...r},t))}),b=So;var bo=y()({dialogContent:{width:"80em"}}),yo=u(function({error:t,children:r}){let{classes:n}=bo();return e.createElement(ye,{className:n.dialogContent},t?e.createElement(Se,{error:t}):null,r)}),$=yo;var vo=u(function({status:t}){return t==="loading"?e.createElement(te,{message:"Translating transcript"}):t==="missing"?e.createElement(M,{color:"textSecondary",variant:"body2"},"no coding sequence to align"):null}),z=vo;var Bt=ze(void 0),qt=u(function({children:t}){let r=d(()=>ce()==="splitRight");return e.createElement(Bt.Provider,{value:r},t)});function qe(){let o=Xe(Bt),t=d(()=>ce()==="splitRight");return o??t}var wo=u(function({checked:t,onChange:r}){return e.createElement(U,{label:"Open beside the genome view",control:e.createElement(nt,{checked:t,onChange:n=>{r(n.target.checked)}})})}),xo=u(function({onSubmit:t,onCancel:r,submitDisabled:n,hint:a,submitLabel:s="Submit",model:i}){let[m,p]=qe(),l=!!i&>(j(i));return e.createElement(be,{sx:{flexWrap:"wrap",rowGap:1}},l?e.createElement(wo,{checked:m,onChange:p}):null,e.createElement("div",{style:{display:"flex",alignItems:"center",gap:8,marginLeft:"auto"}},a,e.createElement(O,{sx:{flexShrink:0},color:"primary",variant:"contained",disabled:n,onClick:()=>{if(l){let h=m?"splitRight":"stack";St(h),t(h)}else t(ce())}},s),e.createElement(O,{sx:{flexShrink:0},color:"secondary",variant:"contained",onClick:()=>{r()}},"Cancel")))}),V=xo;var To=y()({textAreaFont:{fontFamily:"Courier New"}}),Mo=u(function({value:t}){let{classes:r}=To();return e.createElement(b,{variant:"outlined",multiline:!0,minRows:5,maxRows:10,fullWidth:!0,value:t,slotProps:{input:{readOnly:!0,classes:{input:r.textAreaFont}}}})}),Et=Mo;var Ao=y()({flex:{display:"flex"},minWidth:{minWidth:300},centered:{alignContent:"center",marginLeft:20}}),Co=u(function({feature:t,options:r,selectedId:n,selectedTranscript:a,setSelectedId:s,proteinSequence:i,sequenceStatus:m="ready",hasData:p}){let{classes:l}=Ao(),[h,g]=d(!1);return e.createElement(e.Fragment,null,e.createElement("div",{className:l.flex},e.createElement(xe,{variant:"outlined",label:`Choose isoform of ${_(t)}`,helperText:"the query row, so the alignment stays linked to the genome view",select:!0,className:l.minWidth,value:n,onChange:c=>{s(c.target.value)}},r.map(c=>{let f=p?p(c):!0,{len:T,mod:S}=ft(c);return e.createElement(F,{value:Y(c),key:c.id(),disabled:!f},X(c)," (",T," aa)"," ",S?" (possible fragment)":"",p?f?" (has data)":" (no data)":"")})),e.createElement("div",{className:l.centered},e.createElement(O,{variant:"contained",color:"primary",onClick:()=>{g(!h)}},h?"Hide sequence":"Show sequence"))),h?e.createElement(Et,{value:i?`>${X(a)}
|
|
2
|
+
${i}`:m==="missing"?"This transcript has no coding sequence, so there is nothing to translate.":m==="error"?"The sequence could not be fetched.":"Loading..."}):null)}),G=Co;var ae={drawNodeBubbles:!0,colWidth:10,rowHeight:12};function q({view:o,feature:t,placement:r,...n}){return bt(j(o),{placement:r,connectedViewId:o.id,connectedFeature:t?.toJSON(),...n})}function Q(o){let[t,r]=d(),n=ge(!1);return{launchError:t,submit:a=>{n.current||(n.current=!0,r(void 0),a().then(o,s=>{n.current=!1,console.error(s),r(s)}))}}}var Dt=o=>o==null||o===!1;function Lo(o){return Dt(o)||Array.isArray(o)&&o.some(Dt)?null:JSON.stringify(o)}function E(o,t,{onSuccess:r}={}){let n=Lo(o),[a,s]=d(0),[i,m]=d(),p=n===null?null:`${a}\0${n}`,l=i?.attempt===p,h=i?.question===n,g=ge({fetcher:t,onSuccess:r});return he(()=>{g.current={fetcher:t,onSuccess:r}}),he(()=>{if(p===null||n===null)return;let c=new AbortController;return g.current.fetcher(c.signal).then(f=>{c.signal.aborted||(m({attempt:p,question:n,data:f}),g.current.onSuccess?.(f))}).catch(f=>{c.signal.aborted||m({attempt:p,question:n,error:f})}),()=>{c.abort()}},[p,n]),{data:h?i.data:void 0,error:l?i.error:void 0,isLoading:p!==null&&!l,mutate:Ye(()=>{s(c=>c+1)},[])}}function Ee(o,t){let[r,n]=d(o);return he(()=>{let a=setTimeout(()=>{n(o)},t);return()=>{clearTimeout(a)}},[o,t]),r}function Ot({view:o,feature:t}){let r=o?.assemblyNames?.[0],{data:n,error:a,isLoading:s}=E(t&&r?[t.id(),r,"feature-sequence"]:null,async m=>{let{start:p,end:l,refName:h}=t.toJSON();return vt({start:p,end:l,refName:h,assemblyName:r,session:j(o),signal:m})});return{proteinSequence:I(()=>n&&t?yt({transcript:t,...n})?.protein??"":"",[n,t]),sequence:n,error:a,isLoading:s}}function No(o,t,r){if(!r)return o;let n=t.find(s=>Y(s)===o);if(n&&r(n))return o;let a=t.find(r);return a?Y(a):o}function ko({error:o,isLoading:t,proteinSequence:r}){return o?"error":t?"loading":r?"ready":"missing"}function H({feature:o,view:t,hasData:r,preferredTranscriptId:n}){let a=I(()=>Ae(o),[o]),[s,i]=d(()=>Y(a.find(c=>Me(c,n??""))??a[0])),m=No(s,a,r),p=a.find(c=>Y(c)===m),{proteinSequence:l,error:h,isLoading:g}=Ot({view:t,feature:p});return{options:a,selectedId:m,setSelectedId:i,selectedTranscript:p,proteinSequence:l,error:h,isLoading:g,sequenceStatus:ko({error:h,isLoading:g,proteinSequence:l}),hasData:r}}var jt=pe(fe("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var Fo=y()({header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},resultList:{maxHeight:300,overflow:"auto"}});function _t(o){let t=[o.geneName,o.transcriptName!==o.geneName?o.transcriptName:void 0].filter(r=>!!r);return t.length>0?t.join(" - "):o.geneId??o.transcriptId??"Unknown"}function Po(o){return[o.blastDatabase,o.searchProgram??o.blastProgram??"blastp",o.msaAlgorithm].filter(Boolean).join(" / ")}var Io=u(function({model:o,handleClose:t,feature:r,cached:{results:n,handleDelete:a,handleClearAll:s}}){let{classes:i}=Fo(),m=B(o),[p,l]=d(),[h]=qe(),g=c=>{let{transcriptId:f,msa:T,tree:S,treeMetadata:L}=c;q({view:m,feature:f?Ae(r).find(x=>Me(x,f)):void 0,placement:h?"splitRight":"stack",displayName:`BLAST - ${_t(c)}`,...ae,data:{msa:T,tree:S,treeMetadata:L}}).then(t,x=>{console.error(x),l(x)})};return e.createElement("div",null,p?e.createElement(Se,{error:p}):null,e.createElement("div",{className:i.header},e.createElement(M,{variant:"subtitle1"},"Cached BLAST Results (",n.length,")"),e.createElement(O,{size:"small",color:"error",onClick:async()=>{try{l(void 0),await s()}catch(c){l(c)}}},"Clear results for this gene")),e.createElement(it,{dense:!0,className:i.resultList},n.map(c=>e.createElement(lt,{key:c.id,disablePadding:!0,secondaryAction:e.createElement(re,{edge:"end",size:"small",onClick:async f=>{f.stopPropagation();try{l(void 0),await a(c.id)}catch(T){l(T)}}},e.createElement(jt,{fontSize:"small"}))},e.createElement(mt,{onClick:()=>{g(c)}},e.createElement(ct,{primary:`${_t(c)} - ${Po(c)}`,secondary:`${new Date(c.timestamp).toLocaleString()} - Seq: ${c.proteinSequence.slice(0,30)}...`}))))))}),$t=Io;var Bo=u(function({value:t,onChange:r,className:n}){return e.createElement(b,{variant:"outlined",label:"MSA Algorithm",className:n,select:!0,value:t,helperText:t==="browser"?"no EBI job; rows aligned to the query":void 0,onChange:a=>{r(a.target.value)}},Ne.map(a=>e.createElement(F,{value:a,key:a},wt[a])))}),De=Bo;var qo="msaView-blastSearch",Eo="msaView-msaAlgorithm",Vt=Fe("blastp"),Gt="clustalo";function Do(o){let{program:t,database:r}=o??{},n=ke.find(a=>a===t);return n&&Pe(n).some(a=>a===r)?{program:n,database:r}:Vt}function Oo(o){return Ne.find(t=>t===o)??Gt}function Qt(){let[o,t]=K(qo,Vt);return[Do(o),r=>{t(r)}]}function Oe(){let[o,t]=K(Eo,Gt);return[Oo(o),r=>{t(r)}]}function Ht(o){let{data:t,error:r,isLoading:n,mutate:a}=E(`cached-blast-${o.join(",")}`,async()=>(await At()).filter(i=>i.geneId&&o.includes(i.geneId)));return{results:t??[],error:r,isLoading:n,handleDelete:async s=>{await Qe(s),a()},handleClearAll:async()=>{await Promise.all((t??[]).map(s=>Qe(s.id))),a()}}}var jo=y()({selectField:{width:150},databaseField:{width:260},cachedResultsAccordion:{marginTop:20},infoText:{marginTop:20}}),_o=u(function({handleClose:o,feature:t,model:r,children:n,preferredTranscriptId:a}){let{classes:s}=jo(),i=B(r),{launchError:m,submit:p}=Q(o),[l,h]=Qt(),[g,c]=Oe(),[f,T]=d(String(Tt)),S=Number(f),L=Number.isInteger(S)&&S>=1,x=l.program==="phmmer",k=I(()=>Le(t),[t]),A=Ht(k),C=H({feature:t,view:i,preferredTranscriptId:a}),{selectedTranscript:v,proteinSequence:P,sequenceStatus:W}=C,N=C.error??m??A.error;return e.createElement(e.Fragment,null,e.createElement($,{error:N},n,e.createElement(b,{variant:"outlined",label:"Search program",className:s.selectField,select:!0,value:l.program,onChange:w=>{h(Fe(w.target.value))}},ke.map(w=>e.createElement(F,{value:w,key:w},xt[w]))),e.createElement(b,{variant:"outlined",label:"Database",className:s.databaseField,select:!0,value:l.database,onChange:w=>{h({program:l.program,database:w.target.value})}},Pe(l.program).map(w=>e.createElement(F,{value:w,key:w},Mt(w)))),x?null:e.createElement(De,{className:s.selectField,value:g,onChange:c}),e.createElement(b,{variant:"outlined",label:"Hits",className:s.selectField,type:"number",value:f,onChange:w=>{T(w.target.value)},error:!L,helperText:"best-scoring sequences to keep"}),e.createElement(G,{feature:t,...C}),e.createElement(M,{variant:"body2",className:s.infoText},x?"phmmer aligns the hits as it finds them, so nothing is realigned afterwards.":"The hits come back from EBI and are then run through the chosen aligner."," ","The EBI queue is the wait, and it runs from seconds to many minutes."),A.results.length>0?e.createElement(tt,{className:s.cachedResultsAccordion},e.createElement(rt,{expandIcon:e.createElement(pt,null)},e.createElement(M,null,"Previous BLAST Results")),e.createElement(ot,null,e.createElement($t,{model:r,handleClose:o,feature:t,cached:A}))):null),e.createElement(V,{model:r,hint:e.createElement(z,{status:W}),submitDisabled:!P||!L,onSubmit:w=>{if(v){let R=l.program==="phmmer"?{searchProgram:"phmmer",blastDatabase:l.database,maxHits:S,selectedTranscript:v.toJSON(),proteinSequence:P}:{searchProgram:"blastp",blastDatabase:l.database,msaAlgorithm:g,maxHits:S,selectedTranscript:v.toJSON(),proteinSequence:P};p(()=>q({view:i,feature:v,placement:w,displayName:ht(t,v),...ae,blastParams:R}))}},onCancel:o}))}),Wt=_o;function Ut(o){return Ce(o).toUpperCase()}function $o(o,t){let r=Math.min(o.length,t.length);if(r===0)return 0;let n=0;for(let a=0;a<r;a++)o[a]===t[a]&&n++;return n/r}var Vo=.9,Go=.5;function zt(o,t,r){if(!o.trim())return{names:[]};let n;try{n=Lt(o)}catch{return{names:[]}}let a=n.getNames(),s=Ut(t);return{names:a,match:s?Ho(n,a,s,r):void 0}}function Qo(o,t,r){let n=Ut(Nt(o.getRow(t)));if(n){if(n===r)return{name:t,quality:"exact",identity:1,offset:0};{let a=r.indexOf(n),s=n.indexOf(r);if(a!==-1||s!==-1){let i=Math.min(n.length,r.length)/Math.max(n.length,r.length);return i>=Go?{name:t,quality:"partial",identity:i,offset:a===-1?-s:a}:void 0}else{let i=$o(n,r);return i>=Vo?{name:t,quality:"similar",identity:i,offset:0}:void 0}}}else return}var Jt=["exact","partial","similar"];function Ho(o,t,r,n){return t.map(a=>Qo(o,a,r)).filter(a=>a!==void 0).sort((a,s)=>Jt.indexOf(a.quality)-Jt.indexOf(s.quality)||s.identity-a.identity||+(s.name===n)-+(a.name===n))[0]}function Kt(o,t){return o.querySeqName||(o.names.includes(t)?t:"")}function se(o,t,r){let[n,a]=d(),{names:s,match:i}=I(()=>zt(o,t,r),[o,t,r]),m=n!==void 0&&(s.length===0||s.includes(n))?n:void 0,p=m??i?.name??"";return{detected:i,names:s,querySeqName:p,querySeqOffset:p===i?.name?i.offset:0,setQuerySeqName:a,isAutoDetected:m===void 0&&!!i}}var Wo=y()({field:{marginTop:20},alert:{marginTop:10}});function Jo({identity:o,offset:t}){let r=`, covering ${Math.round(o*100)}% of it`;return t>0?`${r} from residue ${t+1}`:t<0?`${r} and running ${-t} residues past its start`:r}var Uo=u(function({names:t,detected:r,querySeqName:n,setQuerySeqName:a,isAutoDetected:s}){let{classes:i}=Wo();return e.createElement(e.Fragment,null,t.length>0?e.createElement(b,{variant:"outlined",label:"MSA row matching the selected transcript",select:!0,fullWidth:!0,className:i.field,value:t.includes(n)?n:"",onChange:m=>{a(m.target.value)}},t.map(m=>e.createElement(F,{value:m,key:m},m,r?.name===m?" \u2014 matches your protein":""))):e.createElement(b,{variant:"outlined",label:"MSA row matching the selected transcript",fullWidth:!0,className:i.field,helperText:"Paste an alignment above and this fills in on its own",value:n,onChange:m=>{a(m.target.value)}}),s&&r?r.quality==="similar"?e.createElement(oe,{severity:"warning",className:i.alert},e.createElement("strong",null,r.name)," is"," ",Math.round(r.identity*100),"% identical to your protein but is not the same sequence. Clicking the alignment navigates the genome view, approximately: wherever the two differ by an insertion or a deletion, every residue after it lands one codon off."):e.createElement(oe,{severity:"success",className:i.alert},"Matched ",e.createElement("strong",null,r.name)," to your protein sequence",r.quality==="exact"?"":Jo(r),". Clicking the alignment will navigate the genome view."):t.length>0&&!n?e.createElement(oe,{severity:"warning",className:i.alert},"No row matched your protein sequence \u2014 pick the one for your gene above. Without it the alignment still renders, but clicking it will not navigate the genome view."):null)}),ie=Uo;var zo=y()({ncbiLink:{wordBreak:"break-all"},textAreaFont:{fontFamily:"Courier New"},msaInput:{marginBottom:20},step:{marginTop:20},stepBody:{marginLeft:20,marginTop:8}}),Ko=u(function({handleClose:o,feature:t,model:r,children:n,preferredTranscriptId:a}){let{classes:s}=zo(),i=B(r),{launchError:m,submit:p}=Q(o),[l,h]=d(""),[g,c]=d(""),f=H({feature:t,view:i,preferredTranscriptId:a}),{proteinSequence:T,selectedTranscript:S,error:L}=f,x=se(l,T),k=Ce(T),A=`${Ge}?PAGE_TYPE=BlastSearch&PAGE=Proteins&PROGRAM=blastp&QUERY=${k}`,C=`${Ge}?PAGE_TYPE=BlastSearch&PAGE=Proteins&PROGRAM=blastp&QUERY=${Je(k,10)}`;return e.createElement(e.Fragment,null,e.createElement($,{error:m??L},n,e.createElement(G,{feature:t,...f}),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"1. Run the search at NCBI"),e.createElement("div",{className:s.stepBody},T?e.createElement("div",{className:s.ncbiLink},e.createElement(Ct,{href:A},C)):e.createElement(oe,{severity:"info"},"Pick a transcript above to get a link carrying its protein sequence."))),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"2. Align the hits"),e.createElement("div",{className:s.stepBody},e.createElement(M,null,`On the results page click "Multiple Alignment" to run COBALT, NCBI's aligner. Download the alignment (.aln) and, if you want the tree drawn, the Newick tree (.nh).`))),e.createElement("div",{className:s.step},e.createElement(M,{variant:"subtitle2"},"3. Paste the results back here"),e.createElement("div",{className:s.stepBody},e.createElement(b,{variant:"outlined",label:"Alignment",multiline:!0,minRows:5,maxRows:10,fullWidth:!0,className:s.msaInput,slotProps:{input:{className:s.textAreaFont}},placeholder:"Paste the .aln contents here",value:l,onChange:v=>{h(v.target.value)}}),e.createElement(b,{variant:"outlined",label:"Tree (optional)",multiline:!0,minRows:3,maxRows:10,fullWidth:!0,slotProps:{input:{className:s.textAreaFont}},placeholder:"Paste the .nh Newick tree here",value:g,onChange:v=>{c(v.target.value)}}),e.createElement(ie,{...x})))),e.createElement(V,{model:r,submitDisabled:!S||!l.trim(),onSubmit:v=>{S&&p(()=>q({view:i,feature:S,placement:v,displayName:_(S),querySeqName:x.querySeqName,querySeqOffset:x.querySeqOffset,data:{msa:l,tree:g}}))},onCancel:o}))}),Yt=Ko;var Yo=u(function({lookupMethod:t,setLookupMethod:r}){return e.createElement(ve,{component:"fieldset"},e.createElement(we,{row:!0,value:t,onChange:n=>{r(n.target.value)}},e.createElement(U,{value:"automatic",control:e.createElement(ne,null),label:"Automatic"}),e.createElement(U,{value:"manual",control:e.createElement(ne,null),label:"Manual"})))}),Xt=Yo;var Xo=y()({field:{minWidth:300},help:{marginBottom:8}}),Zo=u(function({handleClose:t,ebiEmail:r}){let{classes:n}=Xo(),[a,s]=d(r);return e.createElement(at,{open:!0,maxWidth:"lg",onClose:()=>{t()}},e.createElement(st,null,"EBI settings"),e.createElement(ye,null,e.createElement(M,{variant:"subtitle2",className:n.help},"Every search this tab runs is submitted to EBI with this address, which is how they reach whoever is generating the load. If your site sends real volume, use your own."),e.createElement(b,{autoFocus:!0,margin:"dense",label:"EBI contact email",fullWidth:!0,variant:"outlined",value:a,className:n.field,onChange:i=>{s(i.target.value)}}),e.createElement(O,{variant:"contained",onClick:()=>{s(me)}},"Reset")),e.createElement(be,null,e.createElement(O,{variant:"contained",color:"secondary",onClick:()=>{t()}},"Cancel"),e.createElement(O,{color:"primary",variant:"contained",onClick:()=>{t({ebiEmail:a})}},"Save")))}),Zt=Zo;var Ro=y()({settingsButton:{float:"right"}}),er={automatic:Wt,manual:Yt},tr=u(function({handleClose:t,model:r,feature:n,preferredTranscriptId:a}){let[s,i]=d("automatic"),[m,p]=K(dt,me),[l,h]=d(!1),{classes:g}=Ro(),c=er[s];return e.createElement(e.Fragment,null,e.createElement(Te,{title:`EBI settings \u2014 jobs are submitted with ${m.trim()||me}`},e.createElement(re,{className:g.settingsButton,"aria-label":"EBI settings",size:"small",onClick:()=>{h(!0)}},e.createElement(It,null))),e.createElement(c,{model:r,feature:n,handleClose:t,preferredTranscriptId:a},e.createElement(Xt,{lookupMethod:s,setLookupMethod:i})),l?e.createElement(Zt,{ebiEmail:m,handleClose:f=>{f&&p(f.ebiEmail),h(!1)}}):null)}),Rt=tr;var or=Ke(()=>import("./HelpDialog-3IR65NL3.js")),rr=u(function(){let[t,r]=d(!1);return e.createElement(e.Fragment,null,e.createElement(Te,{title:"What each tab does"},e.createElement(re,{"aria-label":"Help",onClick:()=>{r(!0)}},e.createElement(kt,null))),t?e.createElement(Ue,{fallback:null},e.createElement(or,{handleClose:()=>{r(!1)}})):null)}),eo=rr;function nr(o){let t=Ee(o,500),{data:r,error:n,isLoading:a}=E(t?[JSON.stringify(t),"msa-file-text"]:null,()=>Ze(t).readFile("utf8"));return{text:r??"",error:n,isLoading:a||t!==o}}var ar=y()({inputContainer:{marginBottom:30},fileContainer:{maxWidth:500},msaInput:{marginBottom:20}}),sr=u(function({model:t,feature:r,handleClose:n,preferredTranscriptId:a}){let s=B(t),{classes:i}=ar(),{launchError:m,submit:p}=Q(n),[l,h]=d("file"),[g,c]=d(""),[f,T]=d(""),[S,L]=d(),[x,k]=d(),A=H({feature:r,view:s,preferredTranscriptId:a}),{selectedTranscript:C,proteinSequence:v,error:P,sequenceStatus:W}=A,N=nr(l==="file"?S:void 0),w=se(l==="file"?N.text:g,v),R=m??P??N.error;return e.createElement(e.Fragment,null,e.createElement($,{error:R},e.createElement(ve,{component:"fieldset"},e.createElement(we,{row:!0,value:l,onChange:J=>{h(J.target.value)}},e.createElement(U,{value:"file",control:e.createElement(ne,null),label:"Open files"}),e.createElement(U,{value:"text",control:e.createElement(ne,null),label:"Paste text"}))),e.createElement("div",{className:i.inputContainer},l==="file"?e.createElement("div",{className:i.fileContainer},e.createElement($e,{name:"MSA File .aln (Clustal), .fa/.mfa (aligned FASTA), .stock (Stockholm), etc)",inline:!0,location:S,setLocation:L}),e.createElement($e,{name:"Tree file .nh (Newick) or .asn (NCBI COBALT ASN.1)",inline:!0,location:x,setLocation:k})):e.createElement(e.Fragment,null,e.createElement(b,{variant:"outlined",name:"MSA",multiline:!0,minRows:5,className:i.msaInput,maxRows:10,fullWidth:!0,placeholder:"Paste MSA here",value:g,onChange:J=>{c(J.target.value)}}),e.createElement(b,{variant:"outlined",name:"Tree",multiline:!0,minRows:5,maxRows:10,fullWidth:!0,placeholder:"Paste newick tree (optional)",value:f,onChange:J=>{T(J.target.value)}}))),e.createElement(G,{feature:r,...A}),e.createElement(ie,{...w})),e.createElement(V,{model:t,hint:e.createElement(z,{status:W}),submitDisabled:!C||l==="file"&&(!S||N.isLoading)||l==="text"&&!g.trim(),onSubmit:J=>{C&&p(()=>q({view:s,feature:C,placement:J,displayName:_(C),querySeqName:w.querySeqName,querySeqOffset:w.querySeqOffset,...l==="file"?{msaFilehandle:S,treeFilehandle:x}:{data:{msa:g,tree:f}}}))},onCancel:n}))}),to=sr;var ir="msaview-ortholog-source",oo={ncbi:"NCBI orthologs",panther:"PANTHER",uniref:"UniRef cluster"},ro=Object.keys(oo);function lr(o){return ro.find(t=>t===o)??"ncbi"}function no(){let[o,t]=K(ir,"ncbi");return[lr(o),r=>{t(r)}]}var mr={ncbi:"vertebrates and insects",panther:"also yeast, worm, fly and plants",uniref:"all of UniProtKB within 50% identity"},cr=u(function({value:t,onChange:r,className:n}){return e.createElement(b,{variant:"outlined",label:"Source",className:n,select:!0,value:t,helperText:mr[t],onChange:a=>{r(a.target.value)}},ro.map(a=>e.createElement(F,{value:a,key:a},oo[a])))}),ao=cr;async function so(o,t){let r=o.trim();if(!r)return;if(/^\d+$/.test(r))return Number(r);let a=(await Be(Ie("esearch",{db:"taxonomy",term:r,retmax:"1",retmode:"json"}),{signal:t})).esearchresult?.idlist?.[0];return a?Number(a):void 0}async function io(o,t){let r=o.trim();if(!r)return;let a=(await Be(Ie("esearch",{db:"assembly",term:r,retmax:"1",retmode:"json"}),{signal:t})).esearchresult?.idlist?.[0];if(!a)return;let i=(await Be(Ie("esummary",{db:"assembly",id:a,retmode:"json"}),{signal:t})).result?.[a],m=Number(i?.speciestaxid);return i?.speciesname&&m?{taxId:m,speciesName:i.speciesname}:void 0}async function ur(o,t){let r=await so(o,t);if(!r)throw new Error(`No NCBI taxon matches "${o}"`);let n=[],a=(await Pt([r],t,i=>{n.push(i)})).get(r);if(!a&&n.length>0)throw new Error(`NCBI did not answer for the name of taxon ${r}`,{cause:n[0]});let s=[a?.sciname,a?.commonName&&`(${a.commonName})`].filter(Boolean).join(" ");return{taxId:r,label:s||`taxon ${r}`}}var dr=u(function({value:t,assemblyName:r,onChange:n,className:a}){let[s,i]=d(),m=Ee(s,400),{data:p}=E(r&&s===void 0?[r,"assembly-species"]:null,f=>io(r,f),{onSuccess:f=>{f&&n(f.taxId)}}),{data:l,error:h}=E(m?.trim()?[m.trim(),"taxon"]:null,f=>ur(m,f),{onSuccess:({taxId:f})=>{n(f)}}),g=s??p?.speciesName??"human",c=s===void 0?p?.speciesName:l?.label;return e.createElement(b,{variant:"outlined",label:"Query species",className:a,value:g,onChange:f=>{i(f.target.value)},error:!!h,helperText:h?`${h}`:c??`the species this gene is from (taxon ${t})`})}),lo=dr;var pr=y()({selectField:{width:180}}),fr={ncbi:o=>`the ${o} closest species NCBI has`,panther:o=>`the ${o} closest species PANTHER has`,uniref:o=>`${o} rows, one per species, reviewed entries first`},hr=u(function({handleClose:o,feature:t,model:r,preferredTranscriptId:n}){let{classes:a}=pr(),s=B(r),{launchError:i,submit:m}=Q(o),[p,l]=d(9606),[h,g]=no(),[c,f]=Oe(),[T,S]=d(String(Ft)),L=I(()=>Le(t),[t]),x=H({feature:t,view:s,preferredTranscriptId:n}),{selectedTranscript:k,proteinSequence:A,sequenceStatus:C}=x,v=x.error??i,P=Number(T),W=Number.isInteger(P)&&P>=2;return e.createElement(e.Fragment,null,e.createElement($,{error:v},e.createElement(M,{variant:"body2"},"Precomputed orthologs, one gene per species, looked up rather than searched for. No BLAST job to queue, and with the in-browser aligner no job at all."),e.createElement("div",null,e.createElement(ao,{className:a.selectField,value:h,onChange:g}),e.createElement(lo,{className:a.selectField,value:p,assemblyName:s.assemblyNames[0],onChange:l}),e.createElement(De,{className:a.selectField,value:c,onChange:f}),e.createElement(b,{variant:"outlined",label:"Rows to align",className:a.selectField,type:"number",value:T,onChange:N=>{S(N.target.value)},error:!W,helperText:W?fr[h](P):"a whole number, 2 or more"})),e.createElement(G,{feature:t,...x})),e.createElement(V,{model:r,hint:e.createElement(z,{status:C}),submitDisabled:!A||!W,onSubmit:N=>{k&&m(()=>q({view:s,feature:k,placement:N,displayName:`Orthologs - ${_(t)} - ${X(k)}`,...ae,orthologParams:{taxId:p,source:h,maxSpecies:P,geneCandidates:L,msaAlgorithm:c,selectedTranscript:k.toJSON(),proteinSequence:A}}))},onCancel:o}))}),mo=hr;var Z=JBrowseExports["@jbrowse/core/data_adapters/dataAdapterCache"],gr=o=>Z!=null&&o in Object(Z)?Z[o]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+o+"' from '@jbrowse/core/data_adapters/dataAdapterCache' to plugins: MsaView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:o});var co=gr("getAdapter");var hi=Z&&Z.__esModule?Z.default:Z;async function uo(o,t){return(await co(o,"msa",t)).dataAdapter}async function po({config:o,pluginManager:t,assemblyName:r}){return(await uo(t,o)).getMSAList(r)}async function fo({config:o,pluginManager:t,msaId:r,assemblyName:n}){return(await uo(t,o)).getMSA(r,n)}function je(o){return o.msa?He(o.msa,"datasets"):void 0}var Sr=y()({selectedContainer:{marginTop:50}}),br=u(function({model:o,feature:t,handleClose:r,preferredTranscriptId:n}){let a=j(o),s=B(o),{classes:i}=Sr(),{pluginManager:m}=We(o),{assemblyNames:p}=s,l=p[0],{launchError:h,submit:g}=Q(r),c=je(a.jbrowse),[f,T]=d(c?.[0]?.datasetId),S=c?.find(D=>D.datasetId===f),{data:L,isLoading:x,error:k}=E(S?`${S.datasetId}-${l}-msa-list`:null,()=>po({config:S.adapter,pluginManager:m,assemblyName:l})),A=I(()=>L&&new Set(L),[L]),C=H({feature:t,view:s,hasData:A?D=>!!Ve(D,t,A):void 0,preferredTranscriptId:n}),{selectedTranscript:v,proteinSequence:P,sequenceStatus:W}=C,N=v&&A?Ve(v,t,A):void 0,{data:w,isLoading:R,error:J}=E(N&&S?`${S.datasetId}-${l}-${N}-msa`:null,()=>fo({msaId:N,assemblyName:l,config:S.adapter,pluginManager:m})),ee=w?.msa??"",_e=se(ee,P,w?.queryRowName),de=Kt(_e,`${N??""}_${l??""}`),go=k??J??C.error??h;return e.createElement(e.Fragment,null,e.createElement($,{error:go},e.createElement(b,{select:!0,label:"Select MSA dataset",value:f,onChange:D=>{T(D.target.value)}},c?.map(D=>e.createElement(F,{key:D.datasetId,value:D.datasetId},D.name))),S?e.createElement("div",{className:i.selectedContainer},!x&&R?e.createElement(te,{variant:"h6",message:`Loading MSA for ${X(v)||N}`}):null,x?e.createElement(te,{variant:"h6",message:`Loading available MSAs for (${S.name})`}):null,L?e.createElement("div",null,e.createElement(et,{html:S.description}),e.createElement(G,{feature:t,...C}),ee?e.createElement(ie,{..._e,querySeqName:de}):null):null):null),e.createElement(V,{model:o,hint:R?e.createElement(te,{message:"Loading alignment"}):ee&&!de?e.createElement(M,{color:"textSecondary",variant:"body2"},"no row matches this transcript"):e.createElement(z,{status:W}),submitDisabled:!v||!ee||!de,onSubmit:D=>{v&&ee&&g(()=>q({view:s,feature:v,placement:D,displayName:_(v),drawNodeBubbles:!1,labelsAlignRight:!0,showBranchLen:!1,colWidth:10,rowHeight:12,residueColor:{scale:{scheme:"percent_identity_dynamic"}},querySeqName:de,querySeqOffset:_e.querySeqOffset,data:{msa:ee,tree:w?.tree}}))},onCancel:r}))}),ho=br;var yr=u(function({children:t,value:r,index:n}){let a=r===n,[s,i]=d(a);return a&&!s&&i(!0),e.createElement("div",{role:"tabpanel",hidden:!a},s||a?t:null)}),ue=yr;var vr=u(function({handleClose:t,feature:r,model:n,preferredTranscriptId:a}){let s=j(n),m=!!je(s.jbrowse)?.length,[p,l]=d("orthologs");return e.createElement(Re,{maxWidth:"xl",title:"Launch MSA view",open:!0,onClose:t},e.createElement(qt,null,e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement(ut,{value:p,onChange:(h,g)=>{l(g)}},e.createElement(le,{label:"Orthologs",value:"orthologs"}),e.createElement(le,{label:"BLAST query",value:"ncbi_blast"}),m?e.createElement(le,{label:"Pre-loaded MSA datasets",value:"preloaded_msa"}):null,e.createElement(le,{label:"Manual upload",value:"manual_msa"})),e.createElement(eo,null)),e.createElement(ue,{value:p,index:"orthologs"},e.createElement(mo,{handleClose:t,feature:r,model:n,preferredTranscriptId:a})),e.createElement(ue,{value:p,index:"ncbi_blast"},e.createElement(Rt,{handleClose:t,feature:r,model:n,preferredTranscriptId:a})),m?e.createElement(ue,{value:p,index:"preloaded_msa"},e.createElement(ho,{model:n,feature:r,handleClose:t,preferredTranscriptId:a})):null,e.createElement(ue,{value:p,index:"manual_msa"},e.createElement(to,{model:n,feature:r,handleClose:t,preferredTranscriptId:a}))))}),rl=vr;export{rl as default};
|
|
3
|
+
//# sourceMappingURL=LaunchMsaViewDialog-KQVGEMH7.js.map
|