From bf137b6f217be9b0ffa1d6e8a71fdc563f17ef89 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 26 Apr 2007 11:24:42 +0000 Subject: [PATCH] quick fix for verbose fortranesque comments in preamble of AMPS BLC files (lines were being recognised as JPred concise files) --- src/jalview/io/IdentifyFile.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 7f3db40..a8d93d5 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -66,6 +66,7 @@ public class IdentifyFile public String Identify(FileParse source, boolean closeSource) { String reply = "PFAM"; String data; + boolean lineswereskipped=false; try { while ( (data = source.nextLine()) != null) { @@ -78,8 +79,9 @@ public class IdentifyFile break; } - if ( (data.indexOf("#") == 0) || (data.length() < 1)) + if ((data.length() < 1) || (data.indexOf("#") == 0)) { + lineswereskipped=true; continue; } @@ -146,7 +148,10 @@ public class IdentifyFile reply = "PDB"; break; } - else if (data.indexOf(":") < data.indexOf(",")) // && data.indexOf(",")