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