Mercurial > repos > fubar > jbrowse2
view x/static/js/937.4f610bdf.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([[937],{90937:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l,openFilehandleWrapper:()=>u});var a=s(46377),n=s(66885),r=s(99834),o=s(6514),c=s(35451);class i{constructor(e){this.filehandle=e}async read(e,t){const{buffer:s}=await this.filehandle.read(c.hp.alloc(t),0,t,e);return s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}}function u(e,t){return new i((0,r.openLocation)(e,t))}class l extends a.BaseFeatureDataAdapter{constructor(e,t,s){super(e,t,s);const a=this.getConf("hicLocation");this.hic=new o.A({file:u(a,this.pluginManager)})}async setup(e){const{statusCallback:t=()=>{}}=e||{};t("Downloading .hic header");const s=await this.hic.getMetaData();return t(""),s}async getHeader(e){const t=await this.setup(e),{chromosomes:s,...a}=t;return a}async getRefNames(e){return(await this.setup(e)).chromosomes.map((e=>e.name))}async getResolution(e,t){const{resolutions:s}=await this.setup(t);let a=s.at(-1);for(let t=s.length-1;t>=0;t-=1){const n=s[t];n<=2*e&&(a=n)}return a}getFeatures(e,t={}){return(0,n.ObservableCreate)((async s=>{const{refName:a,start:n,end:r}=e,{resolution:o,bpPerPx:c=1,statusCallback:i=()=>{}}=t,u=await this.getResolution(c/(o||1e3),t);i("Downloading .hic data");const l=await this.hic.getContactRecords("KR",{start:n,chr:a,end:r},{start:n,chr:a,end:r},"BP",u);for(const e of l)s.next(e);i(""),s.complete()}),t.signal)}async getMultiRegionFeatureDensityStats(e){return{featureDensity:0}}freeResources(){}}}}]); //# sourceMappingURL=937.4f610bdf.chunk.js.map