1"use strict";(self.webpackChunkuniprot_website=self.webpackChunkuniprot_website||[]).push([[8404],{77906(e,s,r){r.r(s),r.d(s,{default:()=>x}),r(29690),r(74495),r(67622),r(80746),r(34059),r(38660),r(85528);var o=r(36371),i=r(71763),t=r(85399),n=r(87912),l=r(61151),d=r(99049),a=r(49946),c=r(4500),u=r(69429),h=r(43594),m=r(37666);var p=r(91987);const f="PDB",b="AlphaFold DB",g=[2.5,4,6,10],w=[{id:"pdb",title:"PDB",belongs:e=>e.source===f,hiddenColumns:["source","isoform","oligomeric_state"]},{id:"alphafolddb",title:"AlphaFoldDB",belongs:e=>e.source===b,hiddenColumns:["source","method","resolution"]},{id:"others",title:"Others",belongs:e=>e.source!==f&&e.source!==b,hiddenColumns:["isoform","method","resolution","oligomeric_state"]}],x=({primaryAccession:e,sequence:s,isoforms:x,checksum:j,viewerOnly:k=!1,isUniProtKBAccession:v=!0})=>{const C=(0,a.A)(()=>r.e(4607).then(r.bind(r,74226)).then(e=>({default:e.ProtvistaUniprotStructure})),"protvista-uniprot-structure"),[A,B]=(0,i.useState)(null),[D,I]=(0,i.useState)([]),[$,y]=(0,i.useState)(void 0),[S,F]=(0,i.useState)(!0);(0,i.useEffect)(()=>{A&&x?.length&&(A.isoforms=x)},[A,x]),(0,i.useEffect)(()=>{if(!A)return;const e=e=>{I(e.map((e,s)=>({...e,rowKey:`${e.id}:${s}`})));const s=A.selectedId,r=s&&e.some(e=>e.id===s)?s:e[0]?.id;r&&r!==s&&(A.selectedId=r),y(r),F(!1)};A.data?.length&&e(A.data);const s=s=>{const{detail:r}=s;e(r)};return A.addEventListener("structures-loaded",s),()=>A.removeEventListener("structures-loaded",s)},[A]);const N=(0,i.useCallback)(e=>{y(e.id),A&&(A.selectedId=e.id)},[A]),P=(0,i.useMemo)(()=>w.map(e=>({...e,rows:D.filter(e.belongs)})).filter(e=>e.rows.length>0),[D]),_=D.find(e=>e.id===$),E=P.find(e=>_&&e.belongs(_))??P[0],U=(0,i.useCallback)(e=>{const[s]=e;s&&N(s)},[N]),V=(0,i.useMemo)(()=>{const s=[{id:"id",label:"Identifier",render:e=>e.source===f?(0,p.jsx)(l.A,{url:`https://www.ebi.ac.uk/pdbe/entry/pdb/${e.id}`,children:e.id}):e.source===b?(0,p.jsx)(l.A,{url:`https://alphafold.ebi.ac.uk/entry/${e.id}`,children:e.id}):e.sourceDBLink?(0,p.jsx)(l.A,{url:e.sourceDBLink,children:e.id}):e.id},{id:"source",label:"Source",render:e=>(0,p.jsx)("strong",{children:e.source}),getValue:e=>e.source}];return x?.length&&s.push({id:"isoform",label:"Isoform",render:e=>e.isoformId?(0,p.jsxs)(t.N_,{to:(0,n.u3)(u.g$.uniprotkb,e.isoformId,h.l.Entry),children:[e.isoformId,e.isoformIsCanonical&&" (Canonical)"]}):null}),s.push({id:"method",label:"Method",render:e=>e.method??null,getValue:e=>e.method},{id:"resolution",label:"Resolution",render:e=>e.resolution?.replace(/ A\b/g," Ã
")??null,filterOptions:g.map(e=>({label:`Below ${e} Ã
`,predicate:s=>{const r=(e=>{const s=e?.match(/[\d.]+/);return s?parseFloat(s[0]):void 0})(s.resolution);return void 0!==r&&r<e}}))},{id:"chain",label:"Chain",render:e=>e.chain?(0,p.jsx)(p.Fragment,{children:e.chain.length>10?(0,p.jsxs)("span",{className:c.A["no-wrap"],children:[e.chain.slice(0,10),(0,p.jsx)(o.hn,{children:e.chain.slice(10)})]}):e.chain}):null},{id:"positions",label:"Positions",render:e=>e.positions??null},{id:"oligomeric_state",label:"Oligomeric State",render:e=>e.oligomericState??null,getValue:e=>e.oligomericState},{id:"links",label:"Links",render:s=>{const r=s.downloadUrl?(0,p.jsx)("a",{href:s.downloadUrl,target:"_blank",rel:"noopener noreferrer","aria-label":"Download structure file",children:(0,p.jsx)(o.s3,{width:"1em"})}):null,i=s.source===f?s.id:e;if(s.source===f||s.source===b&&!0===s.isoformIsCanonical&&Boolean(i)){const e=s.source===f?"PDB":"AlphaFoldDB";return(0,p.jsxs)("span",{className:c.A["no-wrap"],children:[r," · ",(0,p.jsx)(l.A,{url:`https://search.foldseek.com/search?accession=${i}&source=${e}`,children:"Foldseek"})]})}return r}}),s},[x,e]);return C.defined||C.errored?(0,p.jsxs)("div",{className:"CDGmY",children:[e&&v&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(o.QB,{level:"info",children:["View UniProt features on this structure in the"," ",(0,p.jsx)(t.N_,{to:{pathname:(0,n.u3)(u.g$.uniprotkb,e,h.l.FeatureViewer),hash:"structure"},children:"Feature Viewer"}),"."]}),(0,p.jsx)(m.U,{modal:!0})]}),_&&(0,p.jsxs)("p",{className:"hENYc",children:["Selected structure: ",(0,p.jsx)("strong",{children:_.id})," (",_.source,")"," ",_.positions?`| Positions: ${_.positions}`:null]}),(0,p.jsx)("protvista-uniprot-structure",{ref:B,accession:e,checksum:j,sequence:s,noTable:!0}),!k&&S&&(0,p.jsx)(o.aH,{}),!k&&!S&&0===D.length&&(0,p.jsxs)(o.QB,{level:"info",children:["No structure information available",e?` for ${e}`:"","."]}),!k&&!S&&D.length>0&&E&&(0,p.jsx)(o.tU,{bordered:!0,active:E.id,children:P.map(e=>(0,p.jsx)(o.oz,{id:e.id,title:e.title,tabIndex:0,onClick:()=>U(e.rows),onKeyDown:s=>{"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),U(e.rows))},children:(0,p.jsx)(d.A,{data:e.rows,columns:V.filter(s=>
1!e.hiddenColumns.includes(s.id)),getRowId:e=>e.rowKey,onRowClick:N,markBackground:e=>e.id===$},e.id)},e.id))})]}):(0,p.jsx)(o.aH,{})}}}]); 2//# sourceMappingURL=modern.structure-view.37e412.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.