"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[6556],{36556:function(e,t,r){r.r(t),r.d(t,{default:function(){return h}});var n=r(41361),a=r(33028),u=r(32723),c=r(34795),i=r(9249),s=r(87371),o=r(45754),f=r(13820),l=r(20783),p=r(81450),d=r(26131),w=r(81073),v=r(95915),h=function(e){(0,o.Z)(r,e);var t=(0,f.Z)(r);function r(){var e;(0,i.Z)(this,r);for(var n=arguments.length,a=new Array(n),u=0;u<n;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,s.Z)(r,[{key:"configure",value:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(){var t,r;return(0,u.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(t=this.getSubAdapter)||void 0===t?void 0:t.call(this,this.getConf("sequenceAdapter"));case 2:if(r=e.sent){e.next=5;break}throw new Error("Error getting subadapter");case 5:return e.abrupt("return",r.dataAdapter);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getRefNames",value:function(){var e=(0,c.Z)((0,u.Z)().mark((function e(){var t;return(0,u.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 r=this;return(0,d.ObservableCreate)(function(){var i=(0,c.Z)((0,u.Z)().mark((function c(i){var s,o,f,l,d,h,g,b,Z,k,x,y,m,S,z,A,C,_,q;return(0,u.Z)().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,r.configure();case 2:if(o=u.sent,f=1===r.windowSize?1:r.windowSize/2,l=1===r.windowSize,d=e.start,h=e.end,d=Math.max(0,d-f),!((h+=f)<0||d>h)){u.next=11;break}return i.complete(),u.abrupt("return");case 11:return g=o.getFeatures((0,a.Z)((0,a.Z)({},e),{},{start:d,end:h}),t),u.next=14,(0,p.z)(g.pipe((0,v.q)()));case 14:for(b=u.sent,Z=(null===(s=b[0])||void 0===s?void 0:s.get("seq"))||"",k=f;k<Z.length-f;k+=r.windowDelta){x=l?Z[k]:Z.slice(k-f,k+f),y=0,m=0,S=0,z=(0,n.Z)(x);try{for(z.s();!(A=z.n()).done;)"c"===(C=A.value)||"C"===C?y++:"g"!==C&&"G"!==C||m++,"N"!==C&&S++}catch(c){z.e(c)}finally{z.f()}_=d,q=void 0,"content"===r.gcMode?q=(m+y)/(S||1):"skew"===r.gcMode&&(q=(m-y)/(m+y||1)),i.next(new w.SimpleFeature({uniqueId:"".concat(r.id,"_").concat(_+k),start:_+k,end:_+k+r.windowDelta,score:q}))}i.complete();case 18:case"end":return u.stop()}}),c)})));return function(e){return i.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}]),r}(l.BaseFeatureDataAdapter);h.capabilities=["hasLocalStats"]}}]);
//# sourceMappingURL=6556.a9c4003a.chunk.js.map