Mercurial > repos > fubar > jbrowse2
comparison x/static/js/6999.3486cca0.chunk.js @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
124:137e08517410 | 125:49f3d3878413 |
---|---|
1 "use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[6999],{66999:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var n=r(7552),o=r(68446),s=r(99546),a=r(373);const c="rgb(220,220,180)",l="rgba(250,200,200)";function d({str:e,charactersPerRow:t,showCoordinates:r,currRemainder:n=0,splitSize:o=10}){const s=Math.ceil(e.length/t),a=new Array(s);let c=n%10,l=0,d=0;for(;l<s+1;++l){const s=0===l?t-n:t,m=e.slice(d,d+s);if(!m)break;if(r){let e="";for(let t=0,r=c;t<m.length;t++,r++)r%o==0&&(e+=" ",r=0),e+=m[t];e&&(a[l]=e)}else a[l]=m;c=0,d+=s}return{segments:a,remainder:((a.at(-1)?.replaceAll(" ","").length||0)+(l<2?n:0))%t}}const m=(0,o.observer)((function({chunks:e,start:t,color:r,strand:o=1,coordStart:s=t,model:a}){const{charactersPerRow:c,showCoordinates:l}=a;return e.map(((a,d)=>{const m=0===d&&t%c==0||d>0?`${(""+(s-t%c+d*o*c)).padStart(4)} `:"",u=d===e.length-1&&(e.at(-1)?.replaceAll(" ","").length||0)+(0===d?t%c:0)!==c?null:l?" \n":"";return n.createElement(n.Fragment,{key:`${a}-${d}`},l?m:null,n.createElement("span",{style:{background:r}},a),u)}))})),u=(0,o.observer)((function({utr:e,cds:t,exons:r,sequence:o,upstream:s,downstream:a,feature:u,includeIntrons:i,collapseIntron:h,model:g}){const{upperCaseCDS:w,intronBp:p,charactersPerRow:f,showCoordinates:C,showCoordinatesSetting:b}=g,E=t.length>0,k=(t.length?[...t,...e].sort(((e,t)=>e.start-t.start)):r).filter((e=>e.start!==e.end)),R=e=>w?e.toLowerCase():e,S=e=>w?e.toUpperCase():e,q=-1===u.strand?-1:1,y="genomic"===b&&i&&!h,v=y?q:1;let P=y?q>0?u.start+1-(s?.length||0):u.end+(s?.length||0):0,$=0,_=0,x=null;if(s){const{segments:e,remainder:t}=d({str:R(s),charactersPerRow:f,showCoordinates:C});x=n.createElement(m,{model:g,color:l,strand:v,start:$,coordStart:P,chunks:e}),_=t,$+=s.length*v,P+=s.length*v}const I=[];for(let e=0;e<k.length;e++){const t=k[e],r=o.slice(t.end,k[e+1]?.start),s=o.slice(t.start,t.end),{segments:a,remainder:l}=d({str:E?"CDS"===t.type?S(s):R(s):S(s),charactersPerRow:f,currRemainder:_,showCoordinates:C});if(I.push(n.createElement(m,{key:`${JSON.stringify(t)}-mid`,model:g,color:"CDS"===t.type?c:"rgb(200,240,240)",strand:v,start:$,coordStart:P,chunks:a})),_=l,$+=s.length*v,P+=s.length*v,r&&i&&e<k.length-1){const e=R(h&&r.length>2*p?`${r.slice(0,p)}...${r.slice(-p)}`:r),{segments:o,remainder:s}=d({str:e,charactersPerRow:f,currRemainder:_,showCoordinates:C});o.length&&(I.push(n.createElement(m,{key:`${JSON.stringify(t)}-intron`,model:g,strand:v,coordStart:P,start:$,chunks:o})),_=s,$+=e.length*v,P+=e.length*v)}}let T=null;if(a){const{segments:e}=d({str:R(a),charactersPerRow:f,currRemainder:_,showCoordinates:C});T=n.createElement(m,{start:$,model:g,strand:v,chunks:e,coordStart:P,color:l})}return n.createElement(n.Fragment,null,x,I,T)})),i=(0,o.observer)((function({cds:e,sequence:t,codonTable:r,model:o}){const{charactersPerRow:s,showCoordinates:c}=o,l=(0,a.o9)(e,t);let u="";for(let e=0;e<l.length;e+=3)u+=r[l.slice(e,e+3)]||"&";const{segments:i}=d({str:u,charactersPerRow:s,showCoordinates:c});return n.createElement(m,{model:o,color:"rgb(220,160,220)",chunks:i,start:0})})),h=(0,o.observer)((function({sequence:e,upstream:t,feature:r,downstream:o,model:s}){const{charactersPerRow:a,showCoordinatesSetting:c,showCoordinates:u}=s;let i=0,h=null,g=0;const w=-1===r.strand?-1:1,p="genomic"===c,f=p?w:1;let C=p?w>0?r.start+1-(t?.length||0):r.end+(t?.length||0):0;if(t){const{segments:e,remainder:r}=d({str:t,charactersPerRow:a,showCoordinates:u});h=n.createElement(m,{model:s,color:l,start:i,coordStart:C,chunks:e}),g=r,i+=t.length*f,C+=t.length*f}const{segments:b,remainder:E}=d({str:e,charactersPerRow:a,showCoordinates:u,currRemainder:g}),k=n.createElement(m,{model:s,color:"rgb(200,280,200)",start:i,coordStart:C,chunks:b});g=E,i+=e.length*f,C+=e.length*f;let R=null;if(o){const{segments:e}=d({str:o,charactersPerRow:a,currRemainder:g,showCoordinates:u});R=n.createElement(m,{start:i,model:s,chunks:e,coordStart:C,color:l})}return n.createElement(n.Fragment,null,h,k,R)})),g=(0,o.observer)((function({cds:e,sequence:t,model:r}){const{charactersPerRow:o,showCoordinates:s}=r,{segments:l}=d({str:(0,a.o9)(e,t),charactersPerRow:o,showCoordinates:s});return n.createElement(m,{model:r,color:c,chunks:l,start:0})}));function w({children:e}){return n.createElement("pre",{style:{fontFamily:"monospace",color:"black",fontSize:11}},e)}function p({children:e}){return n.createElement("div",{style:{fontFamily:"monospace",color:"black",fontSize:11,maxWidth:600,whiteSpace:"wrap",wordBreak:"break-all"}},e)}const f=(0,o.observer)(n.forwardRef((function(e,t){const{model:r,feature:o}=e,{showCoordinates:c,mode:l}=r;let{sequence:{seq:d,upstream:m="",downstream:f=""}}=e;const{subfeatures:C=[]}=o,b=C.sort(((e,t)=>e.start-t.start)).map((e=>({...e,start:e.start-o.start,end:e.end-o.start})));let E=(0,a.Qq)(b.filter((e=>"CDS"===e.type))),k=(0,a.Qq)(b.filter((e=>e.type?.match(/utr/i)))),R=(0,a.Qq)(b.filter((e=>"exon"===e.type)));!k.length&&E.length&&R.length&&(k=(0,a.h8)(E,R)),k.length||!E.length||R.length||(k=(0,a.V4)(E,{start:0,end:o.end-o.start,type:"gene"})),-1===o.strand&&([d,m,f]=[(0,s.revcom)(d),(0,s.revcom)(f),(0,s.revcom)(m)],E=(0,a.YC)(E,d.length),R=(0,a.YC)(R,d.length),k=(0,a.YC)(k,d.length));const S=(0,s.generateCodonTable)(s.defaultCodonTable),q=c?w:p;return n.createElement("div",{"data-testid":"sequence_panel",ref:t,style:{maxHeight:300,overflow:"auto"}},n.createElement(q,null,n.createElement("div",{style:{background:"white"}},`>${[`${o.name||o.id}-${l}`,`${o.refName}:${(0,s.toLocale)(o.start+1)}-${(0,s.toLocale)(o.end)}${y=o.strand,-1===y?"(-)":1===y?"(+)":""}`,l.endsWith("updownstream")?`+/- ${(0,s.toLocale)(r.upDownBp)} up/downstream bp`:""].filter((e=>!!e)).join(" ")}\n`),"genomic"===l?n.createElement(h,{feature:o,model:r,sequence:d}):"genomic_sequence_updownstream"===l?n.createElement(h,{model:r,feature:o,sequence:d,upstream:m,downstream:f}):"cds"===l?n.createElement(g,{model:r,cds:E,sequence:d}):"cdna"===l?n.createElement(u,{model:r,exons:R,feature:o,cds:E,utr:k,sequence:d}):"protein"===l?n.createElement(i,{model:r,cds:E,codonTable:S,sequence:d}):"gene"===l?n.createElement(u,{model:r,exons:R,feature:o,cds:E,utr:k,sequence:d,includeIntrons:!0}):"gene_collapsed_intron"===l?n.createElement(u,{model:r,exons:R,feature:o,cds:E,sequence:d,utr:k,includeIntrons:!0,collapseIntron:!0}):"gene_updownstream"===l?n.createElement(u,{model:r,exons:R,feature:o,cds:E,sequence:d,utr:k,upstream:m,downstream:f,includeIntrons:!0}):"gene_updownstream_collapsed_intron"===l?n.createElement(u,{model:r,exons:R,feature:o,cds:E,sequence:d,utr:k,upstream:m,downstream:f,includeIntrons:!0,collapseIntron:!0}):n.createElement("div",null,"Unknown type")));var y})))}}]); | |
2 //# sourceMappingURL=6999.3486cca0.chunk.js.map |