X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;fp=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=8f1d1602114789394801aaefef5d5ab35f8a5722;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=2f365e6e113c7c8fc4b4d28082afa7f075f8772c;hpb=04c8f7bff663aa469127e9eed4164e02933782f1;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index 2f365e6..8f1d160 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -48,6 +48,9 @@ public interface SequenceI extends ASequenceI */ public void setName(String name); + public HiddenMarkovModel getHMM(); + + public void setHMM(HiddenMarkovModel hmm); /** * Get the display name */ @@ -215,10 +218,10 @@ public interface SequenceI extends ASequenceI * from 1), or null if no residues are included in the range * * @param fromColum - * - first column base 1 + * - first column base 1. (0 and negative positions are rounded up) * @param toColumn * - last column, base 1 - * @return + * @return null if fromColum>toColumn */ public ContiguousI findPositions(int fromColum, int toColumn); @@ -357,13 +360,12 @@ public interface SequenceI extends ASequenceI /** * set the array of Database references for the sequence. * - * BH 2019.02.04 changes param to DBModlist + * 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 + * @throws InvalidArgumentException if the is not one created by Sequence itself */ @Deprecated public void setDBRefs(DBModList dbs); @@ -448,8 +450,8 @@ public interface SequenceI extends ASequenceI /** * Returns a (possibly empty) list of any annotations that match on given - * calcId (source), label (type) and description (observation instance). Null - * values do not match. + * calcId (source), label (type) and description (observation instance). + * Null values do not match. * * @param calcId * @param label @@ -457,7 +459,6 @@ public interface SequenceI extends ASequenceI */ public List getAlignmentAnnotations(String calcId, String label, String description); - /** * create a new dataset sequence (if necessary) for this sequence and sets * this sequence to refer to it. This call will move any features or @@ -517,6 +518,11 @@ public interface SequenceI extends ASequenceI * list */ public List getPrimaryDBRefs(); + /** + * Answers true if the sequence has annotation for Hidden Markov Model + * information content, else false + */ + boolean hasHMMAnnotation(); /** * Returns a (possibly empty) list of sequence features that overlap the given @@ -532,8 +538,7 @@ public interface SequenceI extends ASequenceI * optional feature types to restrict results to * @return */ - List findFeatures(int fromCol, int toCol, - String... types); + List findFeatures(int fromCol, int toCol, String... types); /** * Method to call to indicate that the sequence (characters or alignment/gaps) @@ -541,7 +546,7 @@ public interface SequenceI extends ASequenceI * positions to be invalidated. */ void sequenceChanged(); - + /** * * @return BitSet corresponding to index [0,length) where Comparison.isGap() @@ -573,8 +578,9 @@ public interface SequenceI extends ASequenceI * @param chromosomeId * @param map */ - void setGeneLoci(String speciesId, String assemblyId, String chromosomeId, - MapList map); + void setGeneLoci(String speciesId, String assemblyId, + String chromosomeId, MapList map); + /** * Returns the sequence string constructed from the substrings of a sequence @@ -597,4 +603,12 @@ public interface SequenceI extends ASequenceI */ public int firstResidueOutsideIterator(Iterator it); + + /** + * Answers true if this sequence has an associated Hidden Markov Model + * + * @return + */ + boolean hasHMMProfile(); } +