X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentI.java;h=186136f990e7536cb5ee923c3f2919c2d07761c3;hb=c16c1633e1a5acc9f44e4de40b9abbb8a59b99b4;hp=b4075a08ac41f78dd8bd30295b5ba6f3ed2fc0cd;hpb=506d60f0e188723ddc91c26824b41ac7034df3fe;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentI.java b/src/jalview/datamodel/AlignmentI.java index b4075a0..186136f 100755 --- a/src/jalview/datamodel/AlignmentI.java +++ b/src/jalview/datamodel/AlignmentI.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4) - * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) + * Copyright (C) 2009 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 @@ -122,7 +122,7 @@ public interface AlignmentI * @param s * Sequence to look for. * - * @return Index of sequence within the alignment. + * @return Index of sequence within the alignment or -1 if not found */ public int findIndex(SequenceI s); @@ -359,4 +359,34 @@ public interface AlignmentI */ public SequenceI findName(SequenceI startAfter, String token, boolean b); + /** + * find first sequence in alignment which is involved in the given search result object + * @param results + * @return -1 or index of sequence in alignment + */ + public int findIndex(SearchResults results); + + /** + * append sequences and annotation from another alignment object to this one. + * Note: this is a straight transfer of object references, and may result in + * toappend's dependent data being transformed to fit the alignment (changing gap characters, etc...). + * If you are uncertain, use the copy Alignment copy constructor to create a new version + * which can be appended without side effect. + * @param toappend - the alignment to be appended. + */ + public void append(AlignmentI toappend); + /** + * Justify the sequences to the left or right by deleting and inserting gaps before the initial residue or after the terminal residue + * @param right true if alignment padded to right, false to justify to left + * @return true if alignment was changed + * TODO: return undo object + */ + public boolean justify(boolean right); + + /** + * add given annotation row at given position (0 is start, -1 is end) + * @param consensus + * @param i + */ + public void addAnnotation(AlignmentAnnotation consensus, int i); }