Mercurial > repos > fubar > jbrowse2
view x/static/js/9206.bbf34514.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 |
line wrap: on
line source
"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[9206,7489],{79206:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var s=a(71616),n=a(99834),i=a(69870);class o extends i.default{async setupPre(){const e=this.getConf("fastaLocation"),t=this.getConf("faiLocation"),a=this.getConf("gziLocation"),i={fasta:(0,n.openLocation)(e,this.pluginManager),fai:(0,n.openLocation)(t,this.pluginManager),gzi:(0,n.openLocation)(a,this.pluginManager)};return{fasta:new s.tP(i)}}}},69870:(e,t,a)=>{a.r(t),a.d(t,{default:()=>f});var s=a(71616),n=a(46377),i=a(99834),o=a(66885),r=a(99546),c=a(47046),u=a(43334);class f extends n.BaseSequenceAdapter{seqCache=new c.A({cache:new u.A({maxSize:200}),fill:async(e,t)=>{const{refName:a,start:s,end:n,fasta:i}=e;return i.getSequence(a,s,n,{...e,signal:t})}});async getRefNames(e){const{fasta:t}=await this.setup();return t.getSequenceNames(e)}async getRegions(e){const{fasta:t}=await this.setup(),a=await t.getSequenceSizes(e);return Object.keys(a).map((e=>({refName:e,start:0,end:a[e]})))}async setupPre(){const e=this.getConf("fastaLocation"),t=this.getConf("faiLocation");return{fasta:new s.BL({fasta:(0,i.openLocation)(e,this.pluginManager),fai:(0,i.openLocation)(t,this.pluginManager)})}}async getHeader(){const e=this.getConf("metadataLocation");return""===e.uri||"/path/to/fa.metadata.yaml"===e.uri?null:(0,i.openLocation)(e,this.pluginManager).readFile("utf8")}async setup(){return this.setupP||(this.setupP=this.setupPre().catch((e=>{throw this.setupP=void 0,e}))),this.setupP}getFeatures(e,t){const{refName:a,start:s,end:n}=e;return(0,o.ObservableCreate)((async e=>{const{fasta:i}=await this.setup(),o=await i.getSequenceSize(a,t),c=Math.min(o,n),u=[],f=128e3,g=s-s%f,h=n+(f-n%f);for(let e=g;e<h;e+=f){const s={refName:a,start:e,end:e+f};u.push(this.seqCache.get(JSON.stringify(s),{...s,fasta:i},t?.signal))}const p=(await Promise.all(u)).join("").slice(s-g).slice(0,n-s);p&&e.next(new r.SimpleFeature({id:`${a} ${s}-${c}`,data:{refName:a,start:s,end:c,seq:p}})),e.complete()}))}freeResources(){}}}}]); //# sourceMappingURL=9206.bbf34514.chunk.js.map