Thomas 4 年之前
父節點
當前提交
e8a617b578
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      index.js

+ 1 - 1
index.js

@@ -87,7 +87,7 @@ const clusterSam = (input_sam, threshold, minReads) => {
             byClusters[tmpClusterName] = Array.isArray(byClusters[tmpClusterName]) ? [...new Set([...byClusters[tmpClusterName], rname])] : [rname];
         });
         Object.keys(byClusters).map(e => byClusters[e].length < minReads ? delete byClusters[e] : null);
-        resolve((Object.keys(byClusters).map(clusterName => ({ clusterName, rnames: byClusters[clusterName] })).sort((a, b) => b.rname.length - a.rname.length)));
+        resolve((Object.keys(byClusters).map(clusterName => ({ clusterName, rnames: byClusters[clusterName] })).sort((a, b) => b.rnames.length - a.rnames.length)));
     }));
 };
 exports.clusterSam = clusterSam;