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