X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FIdentifyFile.java;h=9a248e5abe40694c229844e40d6ec84c9e00889a;hb=fbb18baad3919cbf94fcb5159bbd5269d6af18b4;hp=20407692fa7c61711d0fce987fda49fd935448e8;hpb=1c472d54a12783c4be933b83d47217b7d56b167f;p=jalview.git diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 2040769..9a248e5 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 @@ -76,6 +76,13 @@ public class IdentifyFile { data = data.toUpperCase(); + if ( (data.indexOf("# STOCKHOLM") > -1)) + { + reply = "STH"; + + break; + } + if ((data.indexOf("#") == 0) || (data.length() < 1)) { continue; @@ -125,7 +132,19 @@ public class IdentifyFile } break; - } + } + else if (data.indexOf("HEADER") > -1 || + data.indexOf("ATOM") > -1) + { + reply = "PDB"; + break; + } + else if (data.indexOf(":") < data.indexOf(",")) // && data.indexOf(",")