Formatted source
[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 package jalview.datamodel;\r
20 \r
21 import java.util.*;\r
22 \r
23 \r
24 /** Data structure to hold and manipulate a multiple sequence alignment\r
25  */\r
26 public interface AlignmentI {\r
27     public int getHeight();\r
28 \r
29     public int getWidth();\r
30 \r
31     public int getMaxIdLength();\r
32 \r
33     public boolean isAligned();\r
34 \r
35     public Vector getSequences();\r
36 \r
37     public SequenceI getSequenceAt(int i);\r
38 \r
39     public void addSequence(SequenceI seq);\r
40 \r
41     public void setSequenceAt(int i, SequenceI seq);\r
42 \r
43     public void deleteSequence(SequenceI s);\r
44 \r
45     public void deleteSequence(int i);\r
46 \r
47     public SequenceI[] getColumns(int start, int end);\r
48 \r
49     public SequenceI[] getColumns(int seq1, int seq2, int start, int end);\r
50 \r
51     public void deleteColumns(int start, int end);\r
52 \r
53     public void deleteColumns(int seq1, int seq2, int start, int end);\r
54 \r
55     public void insertColumns(SequenceI[] seqs, int pos);\r
56 \r
57     public SequenceI findName(String name);\r
58 \r
59     public SequenceI findbyDisplayId(String name);\r
60 \r
61     public int findIndex(SequenceI s);\r
62 \r
63     // Modifying\r
64     public void trimLeft(int i);\r
65 \r
66     public void trimRight(int i);\r
67 \r
68     public void removeGaps();\r
69 \r
70     public Vector removeRedundancy(float threshold, Vector sel);\r
71 \r
72     // Grouping methods\r
73     public SequenceGroup findGroup(int i);\r
74 \r
75     public SequenceGroup findGroup(SequenceI s);\r
76 \r
77     public SequenceGroup[] findAllGroups(SequenceI s);\r
78 \r
79     public void addToGroup(SequenceGroup g, SequenceI s);\r
80 \r
81     public void removeFromGroup(SequenceGroup g, SequenceI s);\r
82 \r
83     public void addGroup(SequenceGroup sg);\r
84 \r
85     public void deleteGroup(SequenceGroup g);\r
86 \r
87     public Vector getGroups();\r
88 \r
89     public void deleteAllGroups();\r
90 \r
91     public void addSuperGroup(SuperGroup sg);\r
92 \r
93     public void removeSuperGroup(SuperGroup sg);\r
94 \r
95     public SuperGroup getSuperGroup(SequenceGroup sg);\r
96 \r
97     // Sorting\r
98     public void sortGroups();\r
99 \r
100     public void sortByPID(SequenceI s);\r
101 \r
102     public void sortByID();\r
103 \r
104     //Annotations\r
105     public void addAnnotation(AlignmentAnnotation aa);\r
106 \r
107     public void deleteAnnotation(AlignmentAnnotation aa);\r
108 \r
109     public AlignmentAnnotation[] getAlignmentAnnotation();\r
110 \r
111     public void setGapCharacter(char gc);\r
112 \r
113     public char getGapCharacter();\r
114 \r
115     public Vector getAAFrequency();\r
116 }\r