PageSourceSearch

https://zfin.org/dist/3163.be13c93741f887e68560.js

js zfin.org collected 2026-09-24 09:02:34 UTC 2,571 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3163],{13163(e,t,n){n.r(t),n.d(t,{default:()=>p});var a=n(14041),i=n(26219),r=n(21093),o=n(62526),l=n(13758),c=n(66913),s=n(14538),d=n(69710),y=n(54184),m=n(28730),u=n(28244);const{parseCigar:g}=u.aF;function h(e){return Math.floor(e)}function f(e,t){let n=0,a=0;for(let i=0;i<e.length;i++){const r=+e[i],o=e[i+1],l=Math.min(r,t-n);if(n>=t)break;"I"===o?a+=r:"D"===o?n+=l:"M"!==o&&"="!==o&&"X"!==o||(a+=l,n+=l)}return[n,a]}const w=(0,m.makeStyles)()({padding:{margin:10,border:"1px solid #ccc"}});function p({model:e,feature:t,trackId:n,handleClose:m}){const{classes:u}=w(),p=-1===t.get("strand"),[k,v]=(0,a.useState)(p),[S,C]=(0,a.useState)("1000");return a.createElement(i.Dialog,{open:!0,title:"Launch synteny view",onClose:m},a.createElement(o.A,null,p?a.createElement(l.A,{className:u.padding,control:a.createElement(c.A,{checked:k,onChange:e=>{v(e.target.checked)}}),label:"Note: The feature is inverted in orientation on the target\n            sequence. This will result in the lower panel having genomic\n            coordinates decreasing left to right. Horizontally flip?"}):null,a.createElement(s.A,{label:"Add window size in bp",value:S,onChange:e=>{C(e.target.value)}})),a.createElement(d.A,null,a.createElement(y.A,{variant:"contained",onClick:()=>{(async()=>{try{await async function({feature:e,windowSize:t,model:n,trackId:a,view:i,horizontallyFlip:o}){const l=(0,r.getSession)(n),c=null==i?void 0:i.dynamicBlocks.contentBlocks[0],s=e.get("CIGAR"),d=e.get("strand"),y=e.get("refName"),m=e.get("assemblyName"),u=e.get("start"),w=e.get("end"),p=e.get("mate"),k=p.start,v=p.end,S=p.assemblyName,C=p.refName;let b,A,E,L;if(c&&s){const e=c.start,t=c.end,n=g(s),[a,i]=f(n,e-u),[r,o]=f(n,t-u),l=-1===d?-1:1;E=u+a,L=u+r,b=(-1===d?v:k)+i*l,A=(-1===d?v:k)+o*l}else E=u,L=w,b=k,A=v;const $=l.addView("LinearSyntenyView",{type:"LinearSyntenyView",views:[{type:"LinearGenomeView",hideHeader:!0},{type:"LinearGenomeView",hideHeader:!0}],tracks:[{configuration:a,type:"SyntenyTrack",displays:[{type:"LinearSyntenyDisplay",configuration:`${a}-LinearSyntenyDisplay`}]}]}),z=`${y}:${h(E-t)}-${h(L+t)}`,N=Math.min(b,A),I=Math.max(b,A),M=`${C}:${h(N-t)}-${h(I+t)}${o?"[rev]":""}`;await Promise.all([$.views[0].navToLocString(z,m),$.views[1].navToLocString(M,S)])}({feature:t,windowSize:+S,horizontallyFlip:k,trackId:n,model:e})}catch(t){console.error(t),(0,r.getSession)(e).notifyError(`${t}`,t)}})(),m()}},"Submit"),a.createElement(y.A,{variant:"contained",color:"secondary",onClick:()=>{m()}},"Cancel")))}}}]);

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.