From 29f67a1666f99ec87b0262bc15852e1e9dd8c097 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 14 Apr 2020 16:18:53 -0400 Subject: [PATCH] r982: more accurate sum; output errors --- misc/paftools.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/paftools.js b/misc/paftools.js index f864946..f15cfde 100755 --- a/misc/paftools.js +++ b/misc/paftools.js @@ -1,6 +1,6 @@ #!/usr/bin/env k8 -var paftools_version = '2.17-r981-dirty'; +var paftools_version = '2.17-r982-dirty'; /***************************** ***** Library functions ***** @@ -941,13 +941,15 @@ function paf_asmgene(args) } } for (var g in gene) { // count multi-copy genes - if (gene[g][0] == null || gene[g][0][0] == 1) continue; + if (gene[g][0] == null || gene[g][0][0] <= 1) continue; if (gene_nr[g] == null) continue; if (auto_only && /^(chr)?[XY]$/.test(refpos[g][2])) continue; for (var i = 0; i < n_fn; ++i) { + if (gene[g][i] != null) rst[7][i] += gene[g][i][0]; if (gene[g][i] != null && gene[g][i][0] > 1) { rst[6][i]++; - rst[7][i] += gene[g][i][0]; + } else if (print_err) { + print('d', header[i], gene[g][0][0], refpos[g].join("\t")); } } }