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
20 package jalview.datamodel;
\r
24 /** Data structure to hold and manipulate a multiple sequence alignment
\r
26 public interface AlignmentI {
\r
28 public int getHeight() ;
\r
29 public int getWidth() ;
\r
30 public int getMaxIdLength() ;
\r
32 public boolean isAligned();
\r
34 public Vector getSequences();
\r
35 public SequenceI getSequenceAt(int i);
\r
37 public void addSequence(SequenceI seq) ;
\r
38 public void setSequenceAt(int i,SequenceI seq);
\r
40 public void deleteSequence(SequenceI s) ;
\r
41 public void deleteSequence(int i) ;
\r
43 public SequenceI[] getColumns(int start, int end) ;
\r
44 public SequenceI[] getColumns(int seq1, int seq2, int start, int end) ;
\r
46 public void deleteColumns(int start, int end) ;
\r
47 public void deleteColumns(int seq1, int seq2, int start, int end) ;
\r
49 public void insertColumns(SequenceI[] seqs, int pos) ;
\r
51 public SequenceI findName(String name) ;
\r
52 public SequenceI findbyDisplayId(String name);
\r
54 public int findIndex(SequenceI s) ;
\r
57 public void trimLeft(int i) ;
\r
58 public void trimRight(int i) ;
\r
60 public void removeGaps() ;
\r
61 public Vector removeRedundancy(float threshold, Vector sel) ;
\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
75 public void addSuperGroup(SuperGroup sg);
\r
76 public void removeSuperGroup(SuperGroup sg);
\r
77 public SuperGroup getSuperGroup(SequenceGroup sg);
\r
80 public void sortGroups() ;
\r
81 public void sortByPID(SequenceI s) ;
\r
82 public void sortByID() ;
\r
85 public void addAnnotation(AlignmentAnnotation aa);
\r
86 public void deleteAnnotation(AlignmentAnnotation aa);
\r
87 public AlignmentAnnotation [] getAlignmentAnnotation();
\r
89 public void setGapCharacter(char gc);
\r
90 public char getGapCharacter();
\r
92 public Vector getAAFrequency();
\r