From: jprocter Date: Thu, 26 Apr 2007 11:24:42 +0000 (+0000) Subject: quick fix for verbose fortranesque comments in preamble of AMPS BLC files (lines... X-Git-Tag: Release_2_3~165 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bf137b6f217be9b0ffa1d6e8a71fdc563f17ef89;p=jalview.git quick fix for verbose fortranesque comments in preamble of AMPS BLC files (lines were being recognised as JPred concise files) --- 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(",")