"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[2734],{82734:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var r=n(33028),a=n(32723),i=n(34795),u=n(9249),c=n(87371),o=n(45754),s=n(86906),f=n(29598),d=n(26131),w=n(14956),p=n(9077),l=n(26080),h=function(e){(0,o.Z)(n,e);var t=(0,s.Z)(n);function n(){var e;(0,u.Z)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).windowSize=1e3,e.windowDelta=1e3,e.gcMode="content",e}return(0,c.Z)(n,[{key:"configure",value:function(){var e=(0,i.Z)((0,a.Z)().mark((function e(){var t,n,r;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(0,p.readConfObject)(this.config,"sequenceAdapter"),e.next=3,null===(t=this.getSubAdapter)||void 0===t?void 0:t.call(this,n);case 3:if(r=e.sent){e.next=6;break}throw new Error("Error getting subadapter");case 6:return e.abrupt("return",r.dataAdapter);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,i.Z)((0,a.Z)().mark((function e(){var t;return(0,a.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,e.abrupt("return",t.getRefNames());case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatures",value:function(e,t){var n=this;return this.windowSize=1e3,this.windowDelta=1e3,this.gcMode="content",(0,d.ObservableCreate)(function(){var t=(0,i.Z)((0,a.Z)().mark((function t(i){var u,c,o,s,f,d,p,h,v,g,b,Z,k,x,m,y,S;return(0,a.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.configure();case 2:if(c=t.sent,o=1===n.windowSize?1:n.windowSize/2,s=1===n.windowSize,f=e.start,d=e.end,f=Math.max(0,f-o),!((d+=o)<0||f>d)){t.next=11;break}return i.complete(),t.abrupt("return");case 11:return p=c.getFeatures((0,r.Z)((0,r.Z)({},e),{},{start:f,end:d})),t.next=14,p.pipe((0,l.q)()).toPromise();case 14:for(h=t.sent,v=(null===(u=h[0])||void 0===u?void 0:u.get("seq"))||"",g=o;g<v.length-o;g+=n.windowDelta){for(b=s?v[g]:v.slice(g-o,g+o),Z=0,k=0,x=0,m=0;m<b.length;m++)"c"===b[m]||"C"===b[m]?Z++:"g"!==b[m]&&"G"!==b[m]||k++,"N"!==b[m]&&x++;y=f,S=void 0,"content"===n.gcMode?S=(k+Z)/(x||1):"skew"===n.gcMode&&(S=(k-Z)/(k+Z||1)),i.next(new w.Z({uniqueId:"".concat(n.id,"_").concat(y+g),start:y+g,end:y+g+n.windowDelta,score:S}))}i.complete();case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),n}(f.BaseFeatureDataAdapter);h.capabilities=["hasLocalStats"]}}]);
//# sourceMappingURL=2734.2734bf79.chunk.js.map