X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=933f33292f8a29c028d3b99e2715fbd438a799dc;hb=b87512d6e28a2a93ea2f08dcfbee320856c5c8de;hp=b22e48f8613a26b394ed688078c196cfff88f826;hpb=acf6d0deb9caf0148791f2993be0a2cd7987f569;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index b22e48f..933f332 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -20,7 +20,10 @@ */ package jalview.datamodel; +import jalview.datamodel.Sequence.DBModList; import jalview.datamodel.features.SequenceFeaturesI; +import jalview.util.MapList; +import jalview.ws.params.InvalidArgumentException; import java.util.BitSet; import java.util.Iterator; @@ -111,9 +114,11 @@ public interface SequenceI extends ASequenceI * get a range on the sequence as a string * * @param start - * position relative to start of sequence including gaps (from 0) + * (inclusive) position relative to start of sequence including gaps + * (from 0) * @param end - * position relative to start of sequence including gaps (from 0) + * (exclusive) position relative to start of sequence including gaps + * (from 0) * * @return String containing all gap and symbols in specified range */ @@ -205,14 +210,17 @@ public interface SequenceI extends ASequenceI public int findPosition(int i); /** - * Returns the from-to sequence positions (start..) for the given column - * positions (1..), or null if no residues are included in the range + * Returns the sequence positions for first and last residues lying within the + * given column positions [fromColum,toColumn] (where columns are numbered + * from 1), or null if no residues are included in the range * * @param fromColum + * - first column base 1 * @param toColumn + * - last column, base 1 * @return */ - public Range findPositions(int fromColum, int toColumn); + public ContiguousI findPositions(int fromColum, int toColumn); /** * Returns an int array where indices correspond to each residue in the @@ -349,14 +357,17 @@ public interface SequenceI extends ASequenceI /** * set the array of Database references for the sequence. * + * BH 2019.02.04 changes param to DBModlist + * * @param dbs * @deprecated - use is discouraged since side-effects may occur if DBRefEntry * set are not normalised. + * @throws InvalidArgumentException if the is not one created by Sequence itself */ @Deprecated - public void setDBRefs(DBRefEntry[] dbs); + public void setDBRefs(DBModList dbs); - public DBRefEntry[] getDBRefs(); + public DBModList getDBRefs(); /** * add the given entry to the list of DBRefs for this sequence, or replace a @@ -534,6 +545,25 @@ public interface SequenceI extends ASequenceI public int replace(char c1, char c2); /** + * Answers the GeneLociI, or null if not known + * + * @return + */ + 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 @@ -553,4 +583,7 @@ public interface SequenceI extends ASequenceI * @return first residue not contained in regions */ public int firstResidueOutsideIterator(Iterator it); + + } +