X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceI.java;h=7ecb4ed53d54a0a59493b1c4fb0ffb2eaed75a7d;hb=refs%2Fheads%2Ffeatures%2FJAL-653_JAL-1766_htslib_refseqsupport;hp=b7a291e07c542eef7f53e8998f56413965555e6e;hpb=b9012154b256ce7dc7125072706e918ab97ffe87;p=jalview.git diff --git a/src/jalview/datamodel/SequenceI.java b/src/jalview/datamodel/SequenceI.java index b7a291e..7ecb4ed 100755 --- a/src/jalview/datamodel/SequenceI.java +++ b/src/jalview/datamodel/SequenceI.java @@ -217,8 +217,11 @@ public interface SequenceI extends ASequenceI public int[] findPositionMap(); /** + * Answers true if the sequence is composed of amino acid characters. Note + * that implementations may use heuristic methods which are not guaranteed to + * give the biologically 'right' answer. * - * @return true if sequence is composed of amino acid characters + * @return */ public boolean isProtein(); @@ -314,6 +317,14 @@ public interface SequenceI extends ASequenceI public void setVamsasId(String id); + /** + * set the array of Database references for the sequence. + * + * @param dbs + * @deprecated - use is discouraged since side-effects may occur if DBRefEntry + * set are not normalised. + */ + @Deprecated public void setDBRefs(DBRefEntry[] dbs); public DBRefEntry[] getDBRefs(); @@ -326,7 +337,14 @@ public interface SequenceI extends ASequenceI */ public void addDBRef(DBRefEntry entry); - public void addSequenceFeature(SequenceFeature sf); + /** + * Adds the given sequence feature and returns true, or returns false if it is + * already present on the sequence + * + * @param sf + * @return + */ + public boolean addSequenceFeature(SequenceFeature sf); public void deleteFeature(SequenceFeature sf); @@ -448,7 +466,6 @@ public interface SequenceI extends ASequenceI */ public PDBEntry getPDBEntry(String pdbId); - /** * Get all primary database/accessions for this sequence's data. These * DBRefEntry are expected to resolve to a valid record in the associated @@ -458,4 +475,15 @@ public interface SequenceI extends ASequenceI * list */ public List getPrimaryDBRefs(); + + /** + * Returns a (possibly empty) list of sequence features of the given type that + * overlap the range from-to (inclusive) + * + * @param type + * @param from + * @param to + * @return + */ + List findFeatures(String type, int from, int to); }