GPL license added
[jalview.git] / src / jalview / datamodel / AlignmentI.java
1 /*\r
2 * Jalview - A Sequence Alignment Editor and Viewer\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
4 *\r
5 * This program is free software; you can redistribute it and/or\r
6 * modify it under the terms of the GNU General Public License\r
7 * as published by the Free Software Foundation; either version 2\r
8 * of the License, or (at your option) any later version.\r
9 *\r
10 * This program is distributed in the hope that it will be useful,\r
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13 * GNU General Public License for more details.\r
14 *\r
15 * You should have received a copy of the GNU General Public License\r
16 * along with this program; if not, write to the Free Software\r
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
18 */\r
19 \r
20 package jalview.datamodel;\r
21 \r
22 import java.util.*;\r
23 \r
24 /** Data structure to hold and manipulate a multiple sequence alignment\r
25  */\r
26 public interface AlignmentI {\r
27 \r
28   public int         getHeight() ;\r
29   public int         getWidth() ;\r
30   public int         getMaxIdLength() ;\r
31 \r
32   public boolean isAligned();\r
33 \r
34   public Vector      getSequences();\r
35   public SequenceI   getSequenceAt(int i);\r
36 \r
37   public void        addSequence(SequenceI seq) ;\r
38   public void        setSequenceAt(int i,SequenceI seq);\r
39 \r
40   public void        deleteSequence(SequenceI s) ;\r
41   public void        deleteSequence(int i) ;\r
42 \r
43   public SequenceI[] getColumns(int start, int end) ;\r
44   public SequenceI[] getColumns(int seq1, int seq2, int start, int end) ;\r
45 \r
46   public void        deleteColumns(int start, int end) ;\r
47   public void        deleteColumns(int seq1, int seq2, int start, int end) ;\r
48 \r
49   public void        insertColumns(SequenceI[] seqs, int pos) ;\r
50 \r
51   public SequenceI   findName(String name) ;\r
52   public SequenceI   findbyDisplayId(String name);\r
53 \r
54   public int         findIndex(SequenceI s) ;\r
55 \r
56   // Modifying\r
57   public void        trimLeft(int i) ;\r
58   public void        trimRight(int i) ;\r
59 \r
60   public void        removeGaps() ;\r
61   public Vector      removeRedundancy(float threshold, Vector sel) ;\r
62 \r
63 \r
64   // Grouping methods\r
65   public SequenceGroup findGroup(int i) ;\r
66   public SequenceGroup findGroup(SequenceI s) ;\r
67   public SequenceGroup [] findAllGroups(SequenceI s);\r
68   public void          addToGroup(SequenceGroup g, SequenceI s) ;\r
69   public void          removeFromGroup(SequenceGroup g,SequenceI s) ;\r
70   public void          addGroup(SequenceGroup sg) ;\r
71   public void          deleteGroup(SequenceGroup g) ;\r
72   public Vector        getGroups();\r
73   public void deleteAllGroups();\r
74 \r
75   public void          addSuperGroup(SuperGroup sg);\r
76   public void          removeSuperGroup(SuperGroup sg);\r
77   public SuperGroup    getSuperGroup(SequenceGroup sg);\r
78 \r
79   // Sorting\r
80   public void          sortGroups() ;\r
81   public void          sortByPID(SequenceI s) ;\r
82   public void          sortByID() ;\r
83 \r
84   //Annotations\r
85   public void addAnnotation(AlignmentAnnotation aa);\r
86   public void deleteAnnotation(AlignmentAnnotation aa);\r
87   public AlignmentAnnotation [] getAlignmentAnnotation();\r
88 \r
89   public void          setGapCharacter(char gc);\r
90   public char          getGapCharacter();\r
91 \r
92   public Vector        getAAFrequency();\r
93 }\r
94 \r
95 \r
96 \r