GPL license added
[jalview.git] / src / jalview / analysis / AlignmentUtil.java
index 5a773a0..b992f4a 100755 (executable)
@@ -1,9 +1,26 @@
+/*\r
+* Jalview - A Sequence Alignment Editor and Viewer\r
+* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+*\r
+* This program is free software; you can redistribute it and/or\r
+* modify it under the terms of the GNU General Public License\r
+* as published by the Free Software Foundation; either version 2\r
+* of the License, or (at your option) any later version.\r
+*\r
+* This program is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with this program; if not, write to the Free Software\r
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
+*/\r
+\r
 package jalview.analysis;\r
 \r
 import jalview.datamodel.*;\r
-import jalview.io.*;\r
 import jalview.util.*;\r
-\r
 import java.util.*;\r
 \r
 public class AlignmentUtil {\r
@@ -196,34 +213,5 @@ public class AlignmentUtil {
        }\r
     }\r
 \r
-    public static Hashtable findKmers(SequenceI seq, int start, int end, Vector kmers) {\r
-\r
-         Hashtable pos = new Hashtable();\r
-\r
-         for (int j = 0; j < kmers.size(); j++) {\r
-\r
-           String   kmer    = ((Sequence)kmers.elementAt(j)).getSequence();\r
-           Sequence kmerseq = (Sequence)kmers.elementAt(j);\r
-\r
-           if (end < seq.getLength()) {\r
-\r
-              String str = seq.getSequence(start,end);\r
-\r
-              int i = 0;\r
-\r
-              while (str.indexOf(kmer,i) != -1) {\r
-\r
-              //               System.out.println("STring " + str + " " + i);\r
-                  int coord = str.indexOf(kmer,i);\r
-\r
-                  pos.put(new Integer(coord),new Integer(kmerseq.getLength()));\r
-\r
-                  i  = coord + 1;\r
-\r
-              }\r
-          }\r
-         }\r
-         return pos;\r
-    }\r
 \r
 }\r