jbrowse-plugin-msaview 5.16.2 → 5.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MsaViewPanel/model.d.ts +49 -36
- package/dist/MsaViewPanel/storedData.test.js +4 -4
- package/dist/chunks/{AboutDialog-UIDZTTTE.js → AboutDialog-CFANNPHL.js} +2 -2
- package/dist/chunks/{AboutDialog-UIDZTTTE.js.map → AboutDialog-CFANNPHL.js.map} +1 -1
- package/dist/chunks/AnnotationFileDialog-27HTSCJC.js +2 -0
- package/dist/chunks/{AnnotationFileDialog-TFIHQACD.js.map → AnnotationFileDialog-27HTSCJC.js.map} +3 -3
- package/dist/chunks/{ExportSVGDialog-AYE4AXS3.js → ExportSVGDialog-P4ICAFJQ.js} +2 -2
- package/dist/chunks/{ExportSVGDialog-AYE4AXS3.js.map → ExportSVGDialog-P4ICAFJQ.js.map} +1 -1
- package/dist/chunks/{FeatureDialog-XHNPLPWX.js → FeatureDialog-Z5SUYFEB.js} +1 -1
- package/dist/chunks/{FeatureDialog-XHNPLPWX.js.map → FeatureDialog-Z5SUYFEB.js.map} +1 -1
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js → GapThresholdDialog-B5NC7QTB.js} +1 -1
- package/dist/chunks/{GapThresholdDialog-MNNNXRMM.js.map → GapThresholdDialog-B5NC7QTB.js.map} +1 -1
- package/dist/chunks/{GoToDialog-U3TQYXIE.js → GoToDialog-WWXYDZPR.js} +2 -2
- package/dist/chunks/{GoToDialog-U3TQYXIE.js.map → GoToDialog-WWXYDZPR.js.map} +1 -1
- package/dist/chunks/{HelpDialog-QS4T2P3K.js → HelpDialog-57HMNKIZ.js} +2 -2
- package/dist/chunks/{HelpDialog-QS4T2P3K.js.map → HelpDialog-57HMNKIZ.js.map} +1 -1
- package/dist/chunks/{LaunchMsaViewDialog-CZR76VIV.js → LaunchMsaViewDialog-KKO7NN7P.js} +2 -2
- package/dist/chunks/{LaunchMsaViewDialog-CZR76VIV.js.map → LaunchMsaViewDialog-KKO7NN7P.js.map} +1 -1
- package/dist/chunks/MetadataDialog-SFIPDR72.js +2 -0
- package/dist/chunks/{MetadataDialog-BC6EUBOJ.js.map → MetadataDialog-SFIPDR72.js.map} +2 -2
- package/dist/chunks/MsaViewPanel-SVYEMEJP.js +2 -0
- package/dist/chunks/{MsaViewPanel-6ETJVX27.js.map → MsaViewPanel-SVYEMEJP.js.map} +1 -1
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js → TrackInfoDialog-J4XUXUQH.js} +2 -2
- package/dist/chunks/{TrackInfoDialog-UCAJUIKI.js.map → TrackInfoDialog-J4XUXUQH.js.map} +1 -1
- package/dist/chunks/TreeNodeInfoDialog-QIUEVP45.js +2 -0
- package/dist/chunks/{TreeNodeInfoDialog-W6L2FDRH.js.map → TreeNodeInfoDialog-QIUEVP45.js.map} +2 -2
- package/dist/chunks/chunk-22YOVDVE.js +2 -0
- package/dist/chunks/{chunk-33ER5TMH.js.map → chunk-22YOVDVE.js.map} +1 -1
- package/dist/chunks/{chunk-27DJABXI.js → chunk-7FQ6JH7S.js} +1 -1
- package/dist/chunks/{chunk-27DJABXI.js.map → chunk-7FQ6JH7S.js.map} +3 -3
- package/dist/chunks/chunk-BABZZGON.js +11 -0
- package/dist/chunks/chunk-BABZZGON.js.map +7 -0
- package/dist/chunks/chunk-BLG5QXPZ.js +164 -0
- package/dist/chunks/chunk-BLG5QXPZ.js.map +7 -0
- package/dist/chunks/{chunk-AOTVWTUV.js → chunk-E3VABHAF.js} +1 -1
- package/dist/chunks/{chunk-AOTVWTUV.js.map → chunk-E3VABHAF.js.map} +1 -1
- package/dist/chunks/chunk-FDAPTOY5.js +2 -0
- package/dist/chunks/chunk-FDAPTOY5.js.map +7 -0
- package/dist/chunks/{chunk-ECXGXFKO.js → chunk-GPYMJZZF.js} +1 -1
- package/dist/chunks/{chunk-ECXGXFKO.js.map → chunk-GPYMJZZF.js.map} +1 -1
- package/dist/chunks/chunk-KHRURQPK.js +2 -0
- package/dist/chunks/chunk-KHRURQPK.js.map +7 -0
- package/dist/chunks/{chunk-KKFBYJZN.js → chunk-LGW6EKNG.js} +1 -1
- package/dist/chunks/{chunk-KKFBYJZN.js.map → chunk-LGW6EKNG.js.map} +1 -1
- package/dist/chunks/{chunk-ET6J3BQX.js → chunk-LVLHKLUU.js} +2 -2
- package/dist/chunks/{chunk-L75R2CI3.js → chunk-NFZIT4K6.js} +4 -4
- package/dist/chunks/{chunk-L75R2CI3.js.map → chunk-NFZIT4K6.js.map} +1 -1
- package/dist/chunks/{chunk-FYL5SHOE.js → chunk-OU67QSXA.js} +1 -1
- package/dist/chunks/{chunk-FYL5SHOE.js.map → chunk-OU67QSXA.js.map} +1 -1
- package/dist/chunks/{chunk-UUDUJ6ZF.js → chunk-RE52WXM7.js} +1 -1
- package/dist/chunks/{chunk-UUDUJ6ZF.js.map → chunk-RE52WXM7.js.map} +1 -1
- package/dist/chunks/chunk-TF47C6NI.js +2 -0
- package/dist/chunks/chunk-TF47C6NI.js.map +7 -0
- package/dist/chunks/{chunk-7JFWQZNK.js → chunk-WKZK7ZZ4.js} +2 -2
- package/dist/chunks/{chunk-7JFWQZNK.js.map → chunk-WKZK7ZZ4.js.map} +1 -1
- package/dist/chunks/dist-DTCYS6P4.js +2 -0
- package/dist/chunks/dist-DTCYS6P4.js.map +7 -0
- package/dist/chunks/dist-E47QTFWN.js +2 -0
- package/dist/chunks/{model-XMH3QSZV.js → model-S32FGNSJ.js} +2 -2
- package/dist/chunks/{model-XMH3QSZV.js.map → model-S32FGNSJ.js.map} +1 -1
- package/dist/chunks/{renderToSvg-VO23YN7B.js → renderToSvg-W5UFFKE3.js} +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js +2 -2
- package/dist/jbrowse-plugin-msaview.esm.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/src/MsaViewPanel/storedData.test.ts +4 -4
- package/src/version.ts +1 -1
- package/dist/chunks/AnnotationFileDialog-TFIHQACD.js +0 -2
- package/dist/chunks/MetadataDialog-BC6EUBOJ.js +0 -2
- package/dist/chunks/MsaViewPanel-6ETJVX27.js +0 -2
- package/dist/chunks/TreeNodeInfoDialog-W6L2FDRH.js +0 -2
- package/dist/chunks/chunk-33ER5TMH.js +0 -2
- package/dist/chunks/chunk-7WGSBPHS.js +0 -6
- package/dist/chunks/chunk-7WGSBPHS.js.map +0 -7
- package/dist/chunks/chunk-K55ZVN73.js +0 -5
- package/dist/chunks/chunk-K55ZVN73.js.map +0 -7
- package/dist/chunks/chunk-NDUZUXDJ.js +0 -2
- package/dist/chunks/chunk-NDUZUXDJ.js.map +0 -7
- package/dist/chunks/chunk-TEQX6FF3.js +0 -164
- package/dist/chunks/chunk-TEQX6FF3.js.map +0 -7
- package/dist/chunks/chunk-TVOPZHTJ.js +0 -2
- package/dist/chunks/chunk-TVOPZHTJ.js.map +0 -7
- package/dist/chunks/chunk-YXL36I7H.js +0 -8
- package/dist/chunks/chunk-YXL36I7H.js.map +0 -7
- package/dist/chunks/dist-34WACJJR.js +0 -2
- package/dist/chunks/dist-34WACJJR.js.map +0 -7
- package/dist/chunks/dist-NZDQ46PF.js +0 -2
- /package/dist/chunks/{chunk-ET6J3BQX.js.map → chunk-LVLHKLUU.js.map} +0 -0
- /package/dist/chunks/{dist-NZDQ46PF.js.map → dist-E47QTFWN.js.map} +0 -0
- /package/dist/chunks/{renderToSvg-VO23YN7B.js.map → renderToSvg-W5UFFKE3.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/react-msaview@
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/react-msaview@10.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-OU67QSXA.js";import{a as b}from"./chunk-FDAPTOY5.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-CFANNPHL.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-57HMNKIZ.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@10.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-MLATYHL2.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-
|
|
1
|
+
import{a as Ct}from"./chunk-MLATYHL2.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-LVLHKLUU.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-CRESEEY4.js";import{f as Lt,g as Nt}from"./chunk-BABZZGON.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{e as We,f as j,n as Je,q as pe,r as fe}from"./chunk-BKGWP5O6.js";import{a as Ze}from"./chunk-YN7VVNZR.js";import{c as He}from"./chunk-QBRNXRNU.js";import"./chunk-73KAPCJ2.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
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-
|
|
3
|
+
//# sourceMappingURL=LaunchMsaViewDialog-KKO7NN7P.js.map
|