Merge branch 'JAL-1447' into develop
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 20 Feb 2014 15:27:53 +0000 (15:27 +0000)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 20 Feb 2014 15:27:53 +0000 (15:27 +0000)
1  2 
src/jalview/io/IdentifyFile.java

@@@ -132,13 -132,6 +132,13 @@@ public class IdentifyFil
  
            break;
          }
 +        
 +        if ((data.indexOf("<") > -1))
 +        {
 +          reply = "RNAML";
 +          
 +          break;
 +        }
  
          if ((data.length() < 1) || (data.indexOf("#") == 0))
          {
  
            break;
          }
 +        
 +        
          else if (data.indexOf(">") > -1)
          {
            // FASTA, PIR file or BLC file
              // Is this a single line BLC file?
              String data1 = source.nextLine();
              String data2 = source.nextLine();
+             int c1;
              if (checkPIR)
              {
                starterm = (data1 != null && data1.indexOf("*") > -1)
                        || (data2 != null && data2.indexOf("*") > -1);
              }
-             if (data2 != null && data.indexOf("*") > -1)
+             if (data2 != null && (c1=data.indexOf("*")) > -1)
              {
-               if (data.indexOf("*") == data2.indexOf("*"))
+               if (c1==0 && c1 == data2.indexOf("*"))
                {
                  reply = "BLC";
+               } else {
+                 reply = "FASTA"; // possibly a bad choice - may be recognised as PIR 
                }
                // otherwise can still possibly be a PIR file
              }