X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FSequenceGroup.java;h=d403d6e7f55a982193424ace0b4f35313a5e5beb;hb=6395e8fc1fc6b33c3b305d74d9be3642dfca8417;hp=dec4fa433dac9c8d4562233b568650944049b414;hpb=25aaaa87042b3f507ad4348120df7dd073182759;p=jalview.git diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index dec4fa4..d403d6e 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -76,8 +76,10 @@ public class SequenceGroup implements AnnotatedCollectionI */ public ColourSchemeI cs; + // start column (base 0) int startRes = 0; + // end column (base 0) int endRes = 0; public Color outlineColour = Color.black; @@ -207,7 +209,7 @@ public class SequenceGroup implements AnnotatedCollectionI if (seqs[ipos] != null) { seqs[ipos].setDescription(seq.getDescription()); - seqs[ipos].setDBRef(seq.getDBRef()); + seqs[ipos].setDBRefs(seq.getDBRefs()); seqs[ipos].setSequenceFeatures(seq.getSequenceFeatures()); if (seq.getDatasetSequence() != null) { @@ -611,13 +613,13 @@ public class SequenceGroup implements AnnotatedCollectionI { synchronized (sequences) { - if (sequences.contains(s)) - { - deleteSequence(s, recalc); - } - else - { - addSequence(s, recalc); + if (sequences.contains(s)) + { + deleteSequence(s, recalc); + } + else + { + addSequence(s, recalc); } } } @@ -773,8 +775,9 @@ public class SequenceGroup implements AnnotatedCollectionI synchronized (sequences) { // MC This needs to get reset when characters are inserted and deleted - boolean first=true; - for (SequenceI seq:sequences) { + boolean first = true; + for (SequenceI seq : sequences) + { if (first || seq.getLength() > width) { width = seq.getLength(); @@ -891,6 +894,7 @@ public class SequenceGroup implements AnnotatedCollectionI /** * @return the representative sequence for this group */ + @Override public SequenceI getSeqrep() { return seqrep; @@ -903,6 +907,7 @@ public class SequenceGroup implements AnnotatedCollectionI * @param seqrep * the seqrep to set (null means no sequence representative) */ + @Override public void setSeqrep(SequenceI seqrep) { this.seqrep = seqrep; @@ -912,6 +917,7 @@ public class SequenceGroup implements AnnotatedCollectionI * * @return true if group has a sequence representative */ + @Override public boolean hasSeqrep() { return seqrep != null; @@ -1033,7 +1039,8 @@ public class SequenceGroup implements AnnotatedCollectionI /** * - * @return automatically calculated consensus row + * @return automatically calculated consensus row note: the row is a stub if a + * consensus calculation has not yet been performed on the group */ public AlignmentAnnotation getConsensus() { @@ -1295,6 +1302,9 @@ public class SequenceGroup implements AnnotatedCollectionI return false; } + /** + * Remove all sequences from the group (leaving other properties unchanged). + */ public void clear() { synchronized (sequences)