"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[6548],{86548:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c});var a=s(56798),r=s(24201),n=s(16979),o=s(90872),i=s(26138);class c extends a.BaseFeatureDataAdapter{constructor(){super(...arguments),this.gcMode="content"}async configure(){var e;const t=await(null===(e=this.getSubAdapter)||void 0===e?void 0:e.call(this,this.getConf("sequenceAdapter")));if(!t)throw new Error("Error getting subadapter");return t.dataAdapter}async getRefNames(){return(await this.configure()).getRefNames()}getFeatures(e,t){return(0,n.ObservableCreate)((async s=>{var a;const n=await this.configure(),c=this.getConf("windowSize"),u=this.getConf("windowDelta"),d=1===c?1:c/2,l=1===c;let{start:g,end:h}=e;if(g=Math.max(0,g-d),h+=d,h<0||g>h)return void s.complete();const w=n.getFeatures({...e,start:g,end:h},t),f=(null===(a=(await(0,r.z)(w.pipe((0,i.q)())))[0])||void 0===a?void 0:a.get("seq"))||"";for(let e=d;e<f.length-d;e+=u){const t=l?f[e]:f.slice(e-d,e+d);let a=0,r=0,n=0;for(const e of t)"c"===e||"C"===e?a++:"g"!==e&&"G"!==e||r++,"N"!==e&&n++;const i=g;let c;"content"===this.gcMode?c=(r+a)/(n||1):"skew"===this.gcMode&&(c=(r-a)/(r+a||1)),s.next(new o.SimpleFeature({uniqueId:"".concat(this.id,"_").concat(i+e),start:i+e,end:i+e+u,score:c}))}s.complete()}))}freeResources(){}}c.capabilities=["hasLocalStats"]}}]);
//# sourceMappingURL=6548.a357306f.chunk.js.map