r767: don't crash when there is no "cg" (#153)

This commit is contained in:
Heng Li 2018-04-24 12:32:37 -04:00
parent cbeb86dad6
commit 39f836eac8
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env k8
var paftools_version = 'r755';
var paftools_version = 'r767';
/*****************************
***** Library functions *****
@ -676,8 +676,10 @@ function paf_stat(args)
last_qlen = ori_qlen;
}
}
l_tot += last_qlen;
l_cov += cov_len(regs);
if (regs.length) {
l_tot += last_qlen;
l_cov += cov_len(regs);
}
file.close();
buf.destroy();