X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FIdentifyFile.java;h=01282ea1f353930f03d92ed64d728c30b8f7c401;hb=2202f8ba9f000c811358937a571c5cd4a017a403;hp=5d39383e193daf20e14fd9ce33da722210e468e2;hpb=e5e719a4db6db7d165261151d4638547923fa5d2;p=jalview.git diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 5d39383..01282ea 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -1,6 +1,6 @@ /* * Jalview - A Sequence Alignment Editor and Viewer -* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle +* Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -122,19 +122,31 @@ public class IdentifyFile // could be BLC file, read next line to confirm data = reader.readLine(); - if (data.indexOf(">") > -1 || data.indexOf("*") >-1 ) + if (data.indexOf(">") > -1) { reply = "BLC"; } else { + //Is this a single line BLC file? + reader.readLine(); + String data2 = reader.readLine(); + if ( data2 != null + && data.indexOf("*")>-1 + && data.indexOf("*")==data2.indexOf("*")) + { + reply = "BLC"; + } + else + { reply = "FASTA"; + } } break; } - else if (data.indexOf("HEADER") > -1 || - data.indexOf("ATOM") > -1) + else if (data.indexOf("HEADER") == 0 || + data.indexOf("ATOM") == 0) { reply = "PDB"; break;