JAL-2416 order score models by order of addition rather than name
[jalview.git] / src / jalview / io / IdentifyFile.java
index 72a1155..4b6f8e4 100755 (executable)
@@ -72,7 +72,7 @@ public class IdentifyFile
     // preserves original behaviour prior to version 2.3
   }
 
-  public FileFormatI identify(AlignmentFileI file, boolean closeSource)
+  public FileFormatI identify(AlignmentFileReaderI file, boolean closeSource)
           throws IOException
   {
     FileParse fp = new FileParse(file.getInFile(), file.getDataSourceType());
@@ -141,6 +141,11 @@ public class IdentifyFile
         }
         data = data.toUpperCase();
 
+        if (data.startsWith(ScoreMatrixFile.SCOREMATRIX))
+        {
+          reply = FileFormat.ScoreMatrix;
+          break;
+        }
         if (data.startsWith("##GFF-VERSION"))
         {
           // GFF - possibly embedded in a Jalview features file!