identifies more varied blc files
authoramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:48:58 +0000 (18:48 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:48:58 +0000 (18:48 +0000)
src/jalview/io/IdentifyFile.java

index 2baf323..c457b58 100755 (executable)
@@ -15,7 +15,7 @@ public class IdentifyFile
 {\r
   public static String Identify(String file, String protocol)\r
   {\r
-    String reply = "error";\r
+    String reply = "PFAM";\r
     try{\r
 \r
       BufferedReader reader = null;\r
@@ -56,23 +56,17 @@ public class IdentifyFile
           reply = "PIR";\r
           break;\r
         }\r
-        else if(data.indexOf(">")==0)\r
+        else if(data.indexOf(">")>-1)\r
         {\r
           // could be BLC file\r
           data = reader.readLine();\r
-          if(data.indexOf(">")==0)\r
+          if(data.indexOf(">")>-1)\r
             reply = "BLC";\r
           else\r
             reply = "FASTA";\r
 \r
             break;\r
         }\r
-        else\r
-        {\r
-           reply = "PFAM";\r
-           break;\r
-         }\r
-\r
       }\r
       reader.close();\r
     }\r