Merge branch 'Jalview-JS/develop' into merge_js_develop
[jalview.git] / src / jalview / io / IdentifyFile.java
index 384797e..b8a4d6a 100755 (executable)
@@ -165,8 +165,8 @@ public class IdentifyFile
           if (source.inFile != null)
           {
             String fileStr = source.inFile.getName();
-            if (fileStr.contains(".jar") || fileStr.contains(".zip")
-                    || fileStr.contains(".jvp"))
+            if (fileStr.contains(".jar")
+                    || fileStr.contains(".zip") || fileStr.contains(".jvp"))
             {
               // possibly a Jalview archive (but check further)
               reply = FileFormat.Jalview;
@@ -185,6 +185,11 @@ public class IdentifyFile
           reply = FileFormat.ScoreMatrix;
           break;
         }
+        if (data.startsWith("HMMER3"))
+        {
+          reply = FileFormat.HMMER3;
+          break;
+        }
         if (data.startsWith("H ") && !aaIndexHeaderRead)
         {
           aaIndexHeaderRead = true;
@@ -319,11 +324,6 @@ public class IdentifyFile
         if ((lessThan > -1)) // possible Markup Language data i.e HTML,
                              // RNAML, XML
         {
-          if (data.startsWith("<BSML>"))
-          {
-            reply = FileFormat.BSML;
-            break;
-          }
           String upper = data.toUpperCase();
           if (upper.substring(lessThan).startsWith("<HTML"))
           {
@@ -335,6 +335,11 @@ public class IdentifyFile
             reply = FileFormat.Rnaml;
             break;
           }
+          if (upper.substring(lessThan).startsWith("<BSML"))
+          {
+            reply = FileFormat.BSML;
+            break;
+          }
         }
 
         if ((data.length() < 1) || (data.indexOf("#") == 0))