PageSourceSearch

https://www.uniprot.org/modern.align-pim.bddcd4.js

js uniprot.org collected 2026-09-24 08:33:02 UTC 3,708 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkuniprot_website=self.webpackChunkuniprot_website||[]).push([[1443],{3896(e,n,t){t.d(n,{A:()=>h});var s=t(97500),a=t.n(s),l=t(62388),i=t(71763),r=t(85399),o=t(87912),c=t(13197),d=t(31133),u=t(91987);const h=({accession:e,info:n,loading:t,children:s,style:h,checked:m,onSequenceChecked:p,onIdClick:g,active:x=!1})=>{const v=e&&!t&&!n,b=v?"Even though this looks like a valid accession, the sequence appears to have been edited and does not match our data":void 0,f=a()("align-label",{"align-label--invalid":v,"align-label--loading":t,"align-label--active":x,"align-label--selectable":g}),j=(0,i.useCallback)(()=>e&&p?.(e),[p,e]),k=(0,i.useCallback)(e=>{e.stopPropagation()},[]);if(!e||t||v)return(0,u.jsx)("span",{className:f,title:b,children:s});const[_,...y]=s.split(e);return(0,u.jsxs)("button",{type:"button",className:f,style:h,onClick:g||l.A,tabIndex:g?0:-1,children:[p&&e&&(0,u.jsx)("input",{type:"checkbox",onChange:j,onClick:k,checked:m}),(0,u.jsx)(c.Ay,{entryType:_}),_,(0,u.jsx)(r.N_,{to:(0,o.u3)((0,d.A)(e),e),children:e}),y.join(e)]})}},22228(e,n,t){t.r(n),t.d(n,{default:()=>v}),t(29690),t(67622),t(38660);var s=t(97500),a=t.n(s),l=t(36371),i=t(71763),r=t(78375),o=t(52871),c=t(42239),d=t(98510),u=(t(74495),t(80746),t(27923));const h=/\s+/,m=e=>{const n=[],t=e.split("\n").map(e=>e.trim()).filter(e=>Boolean(e)&&!e.startsWith("#")),s=t.length,a=new RegExp(`^\\d+: (\\S(?:.*\\S)?)\\s+(((\\d{1,3}\\.\\d{2}|(-?nan))\\s*){${s}})$`);for(const e of t){const t=e.match(a);if(!t)throw new Error("Unexpected format in PIM values");const s=t[2].split(h).map(e=>parseFloat(e));n.push({name:t[1],accession:(0,u.A)(t[1])?.accession,values:s})}if(n.some(e=>e.values.length!==s))throw new Error("Found inconsistent number of values");return n};t.dn(m);var p=t(3896),g=t(91987);const x=(0,c.A)(d.j.ALIGN),v=({id:e,sequenceInfo:n,selectedEntries:t,handleEntrySelection:s})=>{const[c,d]=(0,i.useState)([]),[u,h]=(0,i.useState)(2),{loading:v,data:b,error:f,status:j}=(0,o.A)(x.resultUrl(e,{format:"pim"}));if(v)return(0,g.jsx)(l.aH,{});if(f||!b)return(0,g.jsx)(r.A,{status:j,error:f});const k=m(b);return k.length?(0,g.jsxs)("section",{className:"align-result-pim",children:[(0,g.jsx)("h5",{children:"Percent Identity Matrix"}),(0,g.jsx)("div",{className:"align-result-pim__matrix",style:{gridTemplateColumns:`max-content repeat(${k[0].values.length},fit-content(8ch))`},children:k.map(({name:e,accession:l,values:r},o)=>(0,g.jsxs)(i.Fragment,{children:[(0,g.jsx)("span",{className:a()("align-result-pim__name",{"align-result-pim__name--hovered":c.includes(o)}),children:(0,g.jsx)(p.A,{accession:l,info:n.data.get(l||""),loading:n.loading,checked:Boolean(l&&t?.includes(l)),onSequenceChecked:s,children:e})}),r.map((n,t)=>{const s=k[t];let i,r=0;Number.isNaN(n)?i="Not a Number":(i=`${n.toFixed(2)}%`,r=((e,n)=>{if(e<0||e>1||n<1)throw new Error(`Invalid values. value: ${e}, factor: ${n}`);return 1===n?e:((n**n)**e-1)/(n**n-1)})(n/100,u));const h=c[0]===o&&c[1]===t||c[1]===o&&c[0]===t,m=250*(t+o)/(k.length+k.length-2);return(0,g.jsx)("span",{className:a()("align-result-pim__cell",{"align-result-pim__cell--hovered":h,"align-result-pim__cell--dark":r<.5}),title:`${l||e} vs ${s.accession||s.name}: ${i}`,onPointerEnter:()=>d([o,t]),onPointerLeave:()=>d([]),style:{animationDelay:`${m}ms`,transitionDelay:250-m+"ms",backgroundColor:`rgba(1,67,113,${r})`},children:(0,g.jsx)("span",{children:i})},t)})]},o))}),(0,g.jsx)("fieldset",{children:(0,g.jsxs)("label",{children:["Contrast:"," ",(0,g.jsx)("input",{type:"range",min:1,max:50,step:.1,value:u,onChange:e=>h(+e.target.value)})]})})]}):(0,g.jsx)(r.A,{status:404,error:f})}}}]);
2//# sourceMappingURL=modern.align-pim.bddcd4.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.