From 27dd1da7020151be9358fce67cbe2c10801c348d Mon Sep 17 00:00:00 2001 From: Imran Haque Date: Sat, 7 Apr 2018 07:47:32 +0000 Subject: [PATCH] Exclude empty SAM lines in bounds check for ALT postprocessor --- bwakit/bwa-postalt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bwakit/bwa-postalt.js b/bwakit/bwa-postalt.js index bfc4190..e00d3dc 100644 --- a/bwakit/bwa-postalt.js +++ b/bwakit/bwa-postalt.js @@ -283,7 +283,7 @@ function bwa_postalt(args) // process SAM var buf2 = [], hla = {}; file = args.length - getopt.ind >= 2? new File(args[getopt.ind+1]) : new File(); - while (file.readline(buf) >= 0) { + while (file.readline(buf) > 0) { var m, line = buf.toString(); if (line.charAt(0) == '@') { // print and then skip the header line