(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[44,13],{2307:function(e,n,t){"use strict";t.r(n),t.d(n,"parseSTARFusionBuffer",(function(){return i}));var r=t(86),a=t(83),u=t.n(a),s=t(370);function o(e){var n=e.split(":");return{refName:n[0],pos:parseInt(n[1],10),strand:"-"===n[2]?-1:1}}var c={SpanningFragCount:!0,FFPM:!0,LeftBreakEntropy:!0,RightBreakEntropy:!0,JunctionReadCount:!0};function i(e,n){return f.apply(this,arguments)}function f(){return(f=Object(r.a)(u.a.mark((function e(n,t){var r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(s.parseTsvBuffer)(n,{hasColumnNameLine:!0,columnNameLineNumber:1,selectedAssemblyName:t.selectedAssemblyName,isValidRefName:function(){return!1}});case 2:return(r=e.sent).columns[0].name=r.columns[0].name.replace("#",""),r.columns.forEach((function(e){c[e.name]&&(e.dataType={type:"Number"})})),r.rowSet.rows.forEach((function(e,n){var t={};e.cells.forEach((function(e,n){var a=e.text,u=r.columns[n];if("LeftBreakpoint"===u.name&&a){var s=o(a),i=s.refName,f=s.pos,m=s.strand;t.refName=i,t.start=f,t.end=f,t.strand=m}else if("RightBreakpoint"===u.name&&a){var l=o(a),p=l.refName,d=l.pos,h=l.strand;t.mate={refName:p,start:d,end:d,strand:h}}else a&&c[u.name]?t[u.name]=parseFloat(a):t[u.name]=a})),t.uniqueId="sf-".concat(n+1),e.extendedData={feature:t}})),e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},370:function(e,n,t){"use strict";t.r(n),t.d(n,"bufferToString",(function(){return i})),t.d(n,"parseCsvBuffer",(function(){return d})),t.d(n,"parseTsvBuffer",(function(){return N}));var r=t(89),a=t(29),u=t(86),s=t(83),o=t.n(s),c=t(85);function i(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}function f(e){return m.apply(this,arguments)}function m(){return m=Object(u.a)(o.a.mark((function e(n){var a,u,s=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=s.length>1&&void 0!==s[1]?s[1]:{},e.next=3,t.e(51).then(t.t.bind(null,602,7)).then((function(e){return e.default}));case 3:return u=e.sent,e.abrupt("return",u(Object(r.a)({noheader:!0,output:"csv"},a)).fromString(i(n)));case 5:case"end":return e.stop()}}),e)}))),m.apply(this,arguments)}function l(e,n,t){var r,a=e.rows[0].cells[n].text||"",u="Text";try{r=Object(c.parseLocString)(a,t)}catch(s){}return r&&r.refName&&"number"===typeof r.start?u="LocString":/^\d+(\.\d+)?$/.test(a)&&(u="Number"),u}function p(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},t=0,r={isLoaded:!0,rows:e.map((function(e,r){var a=r+(n.hasColumnNameLine?0:1);return e.length>t&&(t=e.length),{id:String(a),cells:e.map((function(e,n){return{columnNumber:n,text:e}}))}}))},u={};if(n.hasColumnNameLine&&void 0!==n.columnNameLineNumber){var s=r.rows.splice(n.columnNameLineNumber-1,1),o=Object(a.a)(s,1),i=o[0];i&&i.cells.forEach((function(e,n){u[n]=e.text||""}))}for(var f=[],m=[],p=function(e){m.push(e);var t=l(r,e,n.isValidRefName);"LocString"===t&&r.rows.forEach((function(t){var r=t.cells[e];r.extendedData=Object(c.parseLocString)(r.text,n.isValidRefName)})),f[e]={name:u[e],dataType:{type:t}}},d=0;d<t;d+=1)p(d);return{rowSet:r,columnDisplayOrder:m,hasColumnNames:!!n.hasColumnNameLine,columns:f,assemblyName:n.selectedAssemblyName}}function d(e){return h.apply(this,arguments)}function h(){return h=Object(u.a)(o.a.mark((function e(n){var t,r,a=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,f(n);case 3:return r=e.sent,e.abrupt("return",p(r,t));case 5:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function N(e){return b.apply(this,arguments)}function b(){return b=Object(u.a)(o.a.mark((function e(n){var t,r,a=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>1&&void 0!==a[1]?a[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,f(n,{delimiter:"\t"});case 3:return r=e.sent,e.abrupt("return",p(r,t));case 5:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}}}]);
//# sourceMappingURL=44.e3fad5be.chunk.js.map