/* * Jalview - A Sequence Alignment Editor and Viewer * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package jalview.datamodel; import java.util.*; /** Data structure to hold and manipulate a multiple sequence alignment */ public interface AlignmentI { public int getHeight() ; public int getWidth() ; public int getMaxIdLength() ; public boolean isAligned(); public Vector getSequences(); public SequenceI getSequenceAt(int i); public void addSequence(SequenceI seq) ; public void setSequenceAt(int i,SequenceI seq); public void deleteSequence(SequenceI s) ; public void deleteSequence(int i) ; public SequenceI[] getColumns(int start, int end) ; public SequenceI[] getColumns(int seq1, int seq2, int start, int end) ; public void deleteColumns(int start, int end) ; public void deleteColumns(int seq1, int seq2, int start, int end) ; public void insertColumns(SequenceI[] seqs, int pos) ; public SequenceI findName(String name) ; public SequenceI findbyDisplayId(String name); public int findIndex(SequenceI s) ; // Modifying public void trimLeft(int i) ; public void trimRight(int i) ; public void removeGaps() ; public Vector removeRedundancy(float threshold, Vector sel) ; // Grouping methods public SequenceGroup findGroup(int i) ; public SequenceGroup findGroup(SequenceI s) ; public SequenceGroup [] findAllGroups(SequenceI s); public void addToGroup(SequenceGroup g, SequenceI s) ; public void removeFromGroup(SequenceGroup g,SequenceI s) ; public void addGroup(SequenceGroup sg) ; public void deleteGroup(SequenceGroup g) ; public Vector getGroups(); public void deleteAllGroups(); public void addSuperGroup(SuperGroup sg); public void removeSuperGroup(SuperGroup sg); public SuperGroup getSuperGroup(SequenceGroup sg); // Sorting public void sortGroups() ; public void sortByPID(SequenceI s) ; public void sortByID() ; //Annotations public void addAnnotation(AlignmentAnnotation aa); public void deleteAnnotation(AlignmentAnnotation aa); public AlignmentAnnotation [] getAlignmentAnnotation(); public void setGapCharacter(char gc); public char getGapCharacter(); public Vector getAAFrequency(); }