2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.datamodel;
32 public interface SequenceI
37 * @param name DOCUMENT ME!
39 public void setName(String name);
44 * @return DOCUMENT ME!
46 public String getName();
52 * @param start DOCUMENT ME!
54 public void setStart(int start);
59 * @return DOCUMENT ME!
61 public int getStart();
66 * @return DOCUMENT ME!
68 public String getDisplayId(boolean jvsuffix);
73 * @param end DOCUMENT ME!
75 public void setEnd(int end);
80 * @return DOCUMENT ME!
87 * @return DOCUMENT ME!
89 public int getLength();
94 * @param sequence DOCUMENT ME!
96 public void setSequence(String sequence);
101 * @return DOCUMENT ME!
103 public String getSequence();
108 * @param start DOCUMENT ME!
109 * @param end DOCUMENT ME!
111 * @return DOCUMENT ME!
113 public String getSequence(int start, int end);
115 * create a new sequence object from start to end of this sequence
120 public SequenceI getSubSequence(int start, int end);
124 * @param i DOCUMENT ME!
126 * @return DOCUMENT ME!
128 public char getCharAt(int i);
133 * @param desc DOCUMENT ME!
135 public void setDescription(String desc);
140 * @return DOCUMENT ME!
142 public String getDescription();
147 * @param pos DOCUMENT ME!
149 * @return DOCUMENT ME!
151 public int findIndex(int pos);
154 * Returns the sequence position for an alignment position
156 * @param i column index in alignment (from 1)
158 * @return residue number for residue (left of and) nearest ith column
160 public int findPosition(int i);
163 * Returns an int array where indices correspond to each residue in the sequence and the element value gives its position in the alignment
165 * @return int[SequenceI.getEnd()-SequenceI.getStart()+1] or null if no residues in SequenceI object
167 public int[] gapMap();
172 * @param i DOCUMENT ME!
173 * @param j DOCUMENT ME!
175 public void deleteChars(int i, int j);
180 * @param i DOCUMENT ME!
182 public void deleteCharAt(int i);
187 * @param i DOCUMENT ME!
188 * @param c DOCUMENT ME!
190 public void insertCharAt(int i, char c);
195 * @param i DOCUMENT ME!
196 * @param c DOCUMENT ME!
198 public void insertCharAt(int i, int length, char c);
204 * @return DOCUMENT ME!
206 public SequenceFeature[] getSequenceFeatures();
211 * @param v DOCUMENT ME!
213 public void setSequenceFeatures(SequenceFeature [] features);
218 * @param id DOCUMENT ME!
220 public void setPDBId(Vector ids);
225 * @return DOCUMENT ME!
227 public Vector getPDBId();
229 public void addPDBId(PDBEntry entry);
231 public String getVamsasId();
233 public void setVamsasId(String id);
235 public void setDBRef(DBRefEntry[] dbs);
237 public DBRefEntry [] getDBRef();
239 public void addDBRef(DBRefEntry entry);
241 public void addSequenceFeature(SequenceFeature sf);
243 public void deleteFeature(SequenceFeature sf);
245 public void setDatasetSequence(SequenceI seq);
247 public SequenceI getDatasetSequence();
249 public AlignmentAnnotation [] getAnnotation();
251 public void addAlignmentAnnotation(AlignmentAnnotation annotation);
253 public SequenceGroup getHiddenSequences();
255 public void addHiddenSequence(SequenceI seq);
257 public void showHiddenSequence(SequenceI seq);