X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=48615f0dea44b380d39724b8292df2bef2384c79;hb=fbf1b226fa9db949c3854e72b9c82734cdc24ea0;hp=538b791bcac01f78339e1aec5326ac14e2eaa667;hpb=5fc820296bd27badf71036b9d79980277d1dd095;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 538b791..48615f0 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -21,8 +21,10 @@ package jalview.datamodel; import jalview.datamodel.features.SequenceFeaturesI; +import jalview.util.MapList; import java.util.BitSet; +import java.util.Iterator; import java.util.List; import java.util.Vector; @@ -192,22 +194,26 @@ public interface SequenceI extends ASequenceI public int findIndex(int pos); /** - * Returns the sequence position for an alignment position. + * Returns the sequence position for an alignment (column) position. If at a + * gap, returns the position of the next residue to the right. If beyond the + * end of the sequence, returns 1 more than the last residue position. * * @param i * column index in alignment (from 0.. - *
  • features that have been deleted (as within the cut) - amendedFeature is - * null
  • - *
  • truncated features (as overlapping or spanning the cut)
  • - * - * Contact features that overlap the cut region are deleted. Contact features - * that enclose the cut region are shortened. + * Answers the GeneLociI, or null if not known * - * @param fromColumn - * @param toColumn * @return */ - List adjustFeatures(int fromColumn, int toColumn); + GeneLociI getGeneLoci(); + + /** + * Sets the mapping to gene loci for the sequence + * + * @param speciesId + * @param assemblyId + * @param chromosomeId + * @param map + */ + void setGeneLoci(String speciesId, String assemblyId, + String chromosomeId, MapList map); + + + /** + * Returns the sequence string constructed from the substrings of a sequence + * defined by the int[] ranges provided by an iterator. E.g. the iterator + * could iterate over all visible regions of the alignment + * + * @param it + * the iterator to use + * @return a String corresponding to the sequence + */ + public String getSequenceStringFromIterator(Iterator it); + + /** + * Locate the first position in this sequence which is not contained in an + * iterator region. If no such position exists, return 0 + * + * @param it + * iterator over regions + * @return first residue not contained in regions + */ + public int firstResidueOutsideIterator(Iterator it); }