* @author $author$
* @version $Revision$
*/
-public class SequenceGroup
+public class SequenceGroup implements AnnotatedCollectionI
{
String groupName;
{
return;
}
-
+ if (cs!=null)
+ {
+ cs.alignmentChanged(this);
+ }
try
{
Hashtable cnsns[] = AAFrequency.calculate(sequences, startRes,
{
return showConsensusHistogram;
}
+
+ @Override
+ /**
+ * returns a new array with all annotation involving this group
+ */
+ public AlignmentAnnotation[] getAlignmentAnnotation()
+ {
+ // TODO add in other methods like 'getAlignmentAnnotation(String label), etc'
+ ArrayList<AlignmentAnnotation> annot = new ArrayList<AlignmentAnnotation>();
+ for (SequenceI seq:(Vector<SequenceI>)sequences)
+ {
+ for (AlignmentAnnotation al: seq.getAnnotation())
+ {
+ if (al.groupRef==this)
+ {
+ annot.add(al);
+ }
+ }
+ }
+ if (consensus!=null)
+ {
+ annot.add(consensus);
+ }
+ if (conservation!=null)
+ {
+ annot.add(conservation);
+ }
+ return annot.toArray(new AlignmentAnnotation[0]);
+ }
}