2 * Jalview - A Sequence Alignment Editor and Viewer
\r
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\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
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
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
19 package jalview.datamodel;
\r
24 /** Data structure to hold and manipulate a multiple sequence alignment
\r
26 public interface AlignmentI {
\r
27 public int getHeight();
\r
29 public int getWidth();
\r
31 public int getMaxIdLength();
\r
33 public boolean isAligned();
\r
35 public Vector getSequences();
\r
37 public SequenceI getSequenceAt(int i);
\r
39 public void addSequence(SequenceI seq);
\r
41 public void setSequenceAt(int i, SequenceI seq);
\r
43 public void deleteSequence(SequenceI s);
\r
45 public void deleteSequence(int i);
\r
47 public SequenceI[] getColumns(int start, int end);
\r
49 public SequenceI[] getColumns(int seq1, int seq2, int start, int end);
\r
51 public void deleteColumns(int start, int end);
\r
53 public void deleteColumns(int seq1, int seq2, int start, int end);
\r
55 public void insertColumns(SequenceI[] seqs, int pos);
\r
57 public SequenceI findName(String name);
\r
59 public SequenceI findbyDisplayId(String name);
\r
61 public int findIndex(SequenceI s);
\r
64 public void trimLeft(int i);
\r
66 public void trimRight(int i);
\r
68 public void removeGaps();
\r
70 public Vector removeRedundancy(float threshold, Vector sel);
\r
73 public SequenceGroup findGroup(int i);
\r
75 public SequenceGroup findGroup(SequenceI s);
\r
77 public SequenceGroup[] findAllGroups(SequenceI s);
\r
79 public void addToGroup(SequenceGroup g, SequenceI s);
\r
81 public void removeFromGroup(SequenceGroup g, SequenceI s);
\r
83 public void addGroup(SequenceGroup sg);
\r
85 public void deleteGroup(SequenceGroup g);
\r
87 public Vector getGroups();
\r
89 public void deleteAllGroups();
\r
91 public void addSuperGroup(SuperGroup sg);
\r
93 public void removeSuperGroup(SuperGroup sg);
\r
95 public SuperGroup getSuperGroup(SequenceGroup sg);
\r
98 public void sortGroups();
\r
100 public void sortByPID(SequenceI s);
\r
102 public void sortByID();
\r
105 public void addAnnotation(AlignmentAnnotation aa);
\r
107 public void deleteAnnotation(AlignmentAnnotation aa);
\r
109 public AlignmentAnnotation[] getAlignmentAnnotation();
\r
111 public void setGapCharacter(char gc);
\r
113 public char getGapCharacter();
\r
115 public Vector getAAFrequency();
\r