@@ -82,6 +82,8 @@ const clusterSam = (input_sam, threshold, minReads) => {
firstPos = e.position;
}
if (Math.abs(e.position - ((_a = a[i - 1]) === null || _a === void 0 ? void 0 : _a.position)) > threshold) {
+ if (typeof posAll[name] === 'undefined')
+ posAll[name] = {};
posAll[name][String(cluster)] = firstPos + '-' + ((_b = a[i - 1]) === null || _b === void 0 ? void 0 : _b.position);
cluster = cluster + 1;
@@ -96,6 +96,7 @@ const clusterSam = (
firstPos = e.position
if (Math.abs(e.position - a[i-1]?.position) > threshold) {
+ if(typeof posAll[name] === 'undefined') posAll[name] = {}
posAll[name][String(cluster)] = firstPos + '-' + a[i-1]?.position
cluster = cluster + 1