From 1d6ae39a6442c455d362b933f1da89b0a481e5f5 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 8 Jun 2005 16:23:11 +0000 Subject: [PATCH] if missing forward slash --- src/jalview/io/BLCFile.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/jalview/io/BLCFile.java b/src/jalview/io/BLCFile.java index 687eef9..e0750d5 100755 --- a/src/jalview/io/BLCFile.java +++ b/src/jalview/io/BLCFile.java @@ -99,11 +99,20 @@ public class BLCFile extends AlignFile { ends.addElement("0"); } } else { - ids.addElement(line.substring(abracket + 1, - line.indexOf("/"))); - line = line.substring(line.indexOf("/") + 1); - starts.addElement(line.substring(0, line.indexOf("-"))); - ends.addElement(line.substring(line.indexOf("-") + 1)); + if(line.indexOf("/")>-1) + { + ids.addElement(line.substring(abracket + 1, + line.indexOf("/"))); + line = line.substring(line.indexOf("/") + 1); + starts.addElement(line.substring(0, line.indexOf("-"))); + ends.addElement(line.substring(line.indexOf("-") + 1)); + } + else{ + ids.addElement(line.substring(abracket+1)); + starts.addElement("0"); + ends.addElement("0"); + } + } } } while (!idsFound); -- 1.7.10.2