1"use strict";(self.webpackChunkuniprot_website=self.webpackChunkuniprot_website||[]).push([[9631],{68373(e,t,r){r.r(t),r.d(t,{default:()=>k}),r(67622),r(38660);var n=r(36371),s=r(51960),i=r(71763),a=r(34821),o=r(52871),l=r(69429),c=r(64502),u=r(54835),d=(r(74495),r(81159)),m=r(85399),p=r(87912),h=r(59173),f=r(33348),y=r(94935),b=r(91987);const j=e=>`(uniref_cluster_${e.entryType.replace("UniRef","")}:${e.id})`,g=async(e,t)=>{const r=e.map(e=>(0,h.A)(a.A.search.search({namespace:l.g$.uniprotkb,query:j(e),columns:f.YB,size:10}),void 0,{signal:t})),n=await Promise.all(r),s=[];for(const[t,r]of(0,d.A)(e,n)){const e=+(r?.headers?.["x-total-results"]||0);e&&r?.data.results&&t&&s.push({total:e,cluster:t,uniprotkbResults:r.data.results,uniprotkbQuery:j(t)})}return{hasSimilar:s}},x=({clusterType:e,clusters:t,initialPartition:r,onLoaded:s})=>{const a=(0,i.useCallback)(e=>g(t,e),[t]),{error:o,retry:l}=(0,y.A)({clusterType:e,initialPartition:r,fetcher:a,onLoaded:s});if(!r)return o?(0,b.jsx)(c.A,{onRetry:l}):(0,b.jsx)(n.aH,{});const{hasSimilar:d}=r;return 0===d.length?(0,b.jsx)("section",{className:"text-block",children:`No similar proteins at ${u.c[e]} identity.`}):(0,b.jsxs)(b.Fragment,{children:[d.map(({total:e,cluster:t,uniprotkbResults:r,uniprotkbQuery:n})=>(0,b.jsxs)("section",{className:"text-block",children:[(0,b.jsx)(f.Ay,{cluster:t,total:e,uniprotkbResults:r,uniprotkbQuery:n}),(0,b.jsx)("hr",{})]},t.id)),(0,b.jsx)(m.N_,{className:"button primary",to:{pathname:p.qg[p.aZ.UniProtKBResults],search:`query=${t.map(t=>`uniref_cluster_${e.replace("UniRef","")}:${t.id}`).sort().join(" OR ")}`},children:"View all"})]})},A=[],k=({uniparcId:e})=>{const t=(0,o.A)(`${a.A.search.searchPrefix(l.g$.uniref)}?query=(upi:${e})`),r=t.data?.results,[d,m]=(0,i.useState)(null),[p,h]=(0,i.useState)(!0),[f,y]=(0,i.useState)(!1),[j,k]=(0,i.useState)(0);(0,i.useEffect)(()=>{if(!r)return;const e=new AbortController,t=(0,s.A)(r,"entryType");return(async()=>{const r={};let n;for(const s of Object.keys(u.c)){const i=await g(t[s]||A,e.signal);
1if(r[s]=i,i.hasSimilar.length>0){n=s;break}}m({mapping:t,partitions:r,defaultLevel:n}),h(!1)})().catch(()=>{e.signal.aborted||(y(!0),h(!1))}),()=>e.abort()},[r,j]);const v=(0,i.useCallback)((e,t)=>{m(r=>r&&{...r,partitions:{...r.partitions,[e]:t}})},[]);return f?(0,b.jsx)(c.A,{onRetry:()=>{y(!1),h(!0),k(e=>e+1)}}):p||!d?(0,b.jsx)(n.aH,{}):0===Object.keys(d.mapping).length?(0,b.jsx)("div",{children:(0,b.jsx)("em",{children:"No similar UniProtKB entry found."})}):(0,b.jsx)(n.tU,{bordered:!0,children:Object.entries(u.c).map(([e,t])=>(0,b.jsx)(n.oz,{id:e,title:`${t} identity`,defaultSelected:e===d.defaultLevel,children:(0,b.jsx)(x,{clusterType:e,clusters:d.mapping[e]||A,initialPartition:d.partitions[e],onLoaded:v})},e))})}},84715(e,t,r){r.r(t),r.d(t,{default:()=>S,getClusterMapping:()=>R}),r(74495),r(67622),r(38660);var n=r(36371),s=r(81159),i=r(67502),a=r(71763),o=r(34821),l=r(69429),c=r(59173),u=r(54835),d=r(74875),m=r(64502),p=r(85399),h=r(87912),f=r(39014),y=r(61540),b=r(44032),j=r(33348),g=r(94935),x=r(91987);const A=(e,t,r)=>`(uniref_cluster_${e.entryType.replace("UniRef","")}:${e.id})${t.map(e=>` NOT (accession:${e===r?e.replace(/-\d+$/,""):e})`).join("")}`,k=async(e,t,r)=>{const n=e.map(({isoforms:e,cluster:n})=>{if(e.length<=1&&n.memberCount<=1)return null;const s=o.A.search.search({namespace:l.g$.uniprotkb,query:A(n,e,t),facets:null,columns:j.YB,size:10});return(0,c.A)(s,void 0,{signal:r})}),i=await Promise.all(n),a=[],u=[];for(const[r,n]of(0,s.A)(e,i)){if(!r)break;const{isoforms:e,cluster:s}=r,i=+(n?.headers?.["x-total-results"]||0);i&&n?.data.results&&e&&s?a.push({total:i,isoforms:e,cluster:s,uniprotkbResults:n.data.results,uniprotkbQuery:A(s,e,t)}):e&&u.push(...e)}return{noSimilar:u,hasSimilar:a}},v=({canonical:e,clusterType:t,isoformsAndClusters:r,initialPartition:s,onLoaded:i})=>{const o=(0,a.useCallback)(t=>k(r,e,t),[r,e]),{error:l,retry:c}=(0,g.A)({clusterType:t,initialPartition:s,fetcher:o,onLoaded:i});if(!s)return l?(0,x.jsx)(m.A,{onRetry:c}):(0,x.jsx)(n.aH,{});
1const{noSimilar:d,hasSimilar:A}=s;return(0,x.jsxs)(x.Fragment,{children:[A.map(({total:e,isoforms:t,cluster:r,uniprotkbResults:n,uniprotkbQuery:s})=>(0,x.jsxs)("section",{className:"text-block",children:[(0,x.jsx)("h4",{children:t.map((e,r)=>(0,x.jsxs)("span",{children:[(0,f.A)(r,t),e]},e))}),(0,x.jsx)(j.Ay,{cluster:r,total:e,uniprotkbResults:n,uniprotkbQuery:s}),(0,x.jsx)("hr",{})]},r.id)),!!d.length&&(0,x.jsxs)("section",{className:"text-block",children:[(0,x.jsx)("h4",{children:d.map((e,t)=>(0,x.jsxs)("span",{children:[(0,f.A)(t,d),e]},e))}),`No similar proteins at ${u.c[t]} identity for ${(0,b.aX)("this isoform.",d.length,"these isoforms.")}`,(0,x.jsx)("hr",{})]},"no-similar-proteins"),(0,x.jsx)(p.N_,{className:"button primary",to:{pathname:h.qg[h.aZ.UniProtKBResults],search:(0,y._b)({query:r.map(({cluster:e})=>`uniref_cluster_${t.replace("UniRef","")}:${e.id}`).sort().join(" OR ")})},children:"View all"})]})},R=(e,t)=>{const r={UniRef100:{},UniRef90:{},UniRef50:{}};for(const[n,i]of(0,s.A)(e,t)){if(!n||!i)break;for(const e of i){const t=r[e.entryType][e.id]||{isoforms:[],cluster:e};t.isoforms.push(n),r[e.entryType][e.id]=t}}return r},$=({canonical:e,isoforms:t})=>{const[r,s]=(0,a.useState)(null),[i,p]=(0,a.useState)(!0),[h,f]=(0,a.useState)(!1),[y,b]=(0,a.useState)(0);(0,a.useEffect)(()=>{const r=new AbortController,n=t.map(t=>(0,c.A)(o.A.search.search({namespace:l.g$.uniref,query:`uniprotkb:${t===e?t.replace(/-\d+$/,""):t}`,columns:[d.cF.id,d.cF.identity],facets:null}),void 0,{signal:r.signal}));return(async()=>{const i=(await Promise.all(n)).map(e=>e.data.results),a=R(t,i),o={};let l;for(const t of Object.keys(u.c)){const n=await k(Object.values(a[t]),e,r.signal);if(o[t]=n,n.hasSimilar.length>0){l=t;break}}s({mapping:a,partitions:o,defaultLevel:l}),p(!1)})().catch(()=>{r.signal.aborted||(f(!0),p(!1))}),()=>r.abort()},[e,t,y]);const j=(0,a.useCallback)((e,t)=>{s(r=>r&&{...r,partitions:{...r.partitions,[e]:t}})},[]),g=r?.mapping,A=(0,a.useMemo)(()=>g?Object.fromEntries(Object.keys(g).map(e=>[e,Object.values(g[e])])):{},[g]);return i?(0,x.jsx)(n.aH,{}):h?(0,x.jsx)(m.A,{onRetry:()=>{f(!1),p(!0),b(e=>e+1)}}):r?(0,x.jsx)(n.tU,{bordered:!0,children:Object.entries(u.c).map(([t,s])=>(0,x.jsx)(n.oz,{id:t,title:`${s} identity`,defaultSelected:t===r.defaultLevel,children:(0,x.jsx)(v,{canonical:e,clusterType:t,isoformsAndClusters:A[t],initialPartition:r.partitions[t],onLoaded:j})},t))}):(0,x.jsx)("div",{children:(0,x.jsx)("em",{children:"No similar UniProtKB entry found."})})},S=(0,a.memo)($,(e,t)=>e.canonical===t.canonical&&(0,i.A)(e.isoforms,t.isoforms))},64502(e,t,r){var n=r(36371),s=r(91987);r.d(t,["A",0,({onRetry:e})=>(0,s.jsxs)(n.QB,{level:"failure",noShadow:!0,children:["Something went wrong loading similar proteins."," ",(0,s.jsx)(n.$n,{variant:"secondary",onClick:e,children:"Try again"})]})])},33348(e,t,r){var n=r(36371),s=r(85399),i=r(87912),a=r(13197),o=r(65297),l=r(4500),c=r(69429),u=r(61540),d=r(5077),m=r(43594),p=r(91987);const h=[d.P.id,d.P.reviewed,d.P.organismName,d.P.proteinName,d.P.length],f=[{label:"",name:"reviewed",render:e=>(0,p.jsx)(a.Ay,{entryType:e.entryType})},{label:"Protein name",name:"protein_name",render:e=>(0,p.jsx)(s.N_,{to:(0,i.u3)(c.g$.uniprotkb,e.primaryAccession,m.l.Entry),children:e.proteinDescription?.recommendedName?.fullName.value||e.proteinDescription?.submissionNames?.[0].fullName.value})},{label:"Organism",name:"organism",render:e=>e.organism&&(0,p.jsx)(o.Ay,{data:e.organism})},{label:"Length",name:"length",render:e=>e.sequence?.length}];r.d(t,["Ay",0,({cluster:e,total:t,uniprotkbResults:r,uniprotkbQuery:a})=>{const o=(0,i.u3)(c.g$.uniref,e.id);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.N_,{to:o,children:e.id}),(0,p.jsx)("div",{className:l.A["overflow-y-container"],children:(0,p.jsx)(n.bQ,{data:r,columns:f,getIdKey:e=>e.primaryAccession,density:"compact"})}),(0,p.jsxs)(s.N_,{to:{pathname:i.qg[i.aZ.UniProtKBResults],search:(0,u._b)({query:a})},children:["View ",1===t?"this entry":(0,p.jsxs)(p.Fragment,{children:[(t===r.length?"these":"all")+" ",(0,p.jsx)(n.Ig,{children:t})," entries"]})," in UniProtKB"]})]})},"Jc",0,f,"YB",0,h])},94935(e,t,r){var n=r(71763);r.d(t,["A",0,({clusterType:e,initialPartition:t,fetcher:r,onLoaded:s})=>
1{const[i,a]=(0,n.useState)(null),[o,l]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(t)return;const n=new AbortController;return r(n.signal).then(t=>s(e,t),()=>{n.signal.aborted||a(e)}),()=>n.abort()},[t,r,e,s,o]),{error:i===e,retry:()=>{a(null),l(e=>e+1)}}}])},54835(e,t,r){var n=r(3796);r.d(t,["A",0,e=>({...e,identity:+e.entryType.replace("UniRef",""),[n.A.Sequence]:{sequence:e.representativeMember.sequence}}),"c",0,{UniRef100:"100%",UniRef90:"90%",UniRef50:"50%"}])},3796(e,t,r){var n=function(e){return e.Sequence="sequence",e.Members="members",e}(n||{});const s=n;r.d(t,["A",0,s])},81159(e,t,r){r.d(t,{A:()=>u});var n=r(45376),s=r(36088),i=r(98094),a=r(60483),o=r(37538),l=r(23963),c=Math.max;const u=(0,n.A)(function(e){if(!e||!e.length)return[];var t=0;return e=(0,s.A)(e,function(e){if((0,l.A)(e))return t=c(e.length,t),!0}),(0,o.A)(t,function(t){return(0,i.A)(e,(0,a.A)(t))})})}}]); 2//# sourceMappingURL=modern.similar-proteins.fd1f8f.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.