import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.Annotation;
+import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
import jalview.io.TCoffeeScoreFile;
import java.awt.Color;
import java.util.ArrayList;
import java.util.IdentityHashMap;
+import java.util.Map;
import java.util.TreeMap;
/**
* @param alignment - annotated sequences to be searched
*/
public TCoffeeColourScheme(AnnotatedCollectionI alignment) {
- alignmentChanged(alignment);
+ alignmentChanged(alignment, null);
}
- @Override public void alignmentChanged(AnnotatedCollectionI alignment)
+ @Override
+ public void alignmentChanged(AnnotatedCollectionI alignment, Map<SequenceI, SequenceCollectionI> hiddenReps)
{
+ // TODO: if sequences have been represented and they have scores, could compute an average sequence score for the representative
+
// assume only one set of TCOFFEE scores - but could have more than one potentially.
ArrayList<AlignmentAnnotation> annots = new ArrayList<AlignmentAnnotation>();
// Search alignment to get all tcoffee annotation and pick one set of annotation to use to colour seqs.
seqMap.put(al.sequenceRef, scores);
}
}
+ // TODO: compute average colour for each symbol type in each column - gives
+ // a second order colourscheme for colouring a sequence logo derived from
+ // the alignment (colour reflects quality of alignment for each residue
+ // class)
}
@Override
public Color findColour(char c, int j, SequenceI seq) {
Color[] cols;
if( seqMap==null || (cols=seqMap.get(seq))==null) {
+// see above TODO about computing a colour for each residue in each column: cc = _rcols[i][indexFor[c]];
return Color.white;
}