{
return Color.white;
}
+ if (Character.isLowerCase(symbol))
+ {
+ return new Color(230, 0, 0);
+ }
Double prob;
prob = hmm.getMatchEmissionProbability(position, symbol);
double freq = 0;
}
if (prob == 0)
{
- return Color.red;
+ return new Color(230, 0, 0);
}
Double value = Math.log(prob / freq);
Color colour = null;
public void alignmentChanged(AnnotatedCollectionI collection,
Map<SequenceI, SequenceCollectionI> hiddenReps)
{
- List<SequenceI> seqs = collection.getSequences();
- for (SequenceI seq : seqs)
- {
- if (seq.getHMM() != null)
- {
- hmm = seq.getHMM();
- break;
- }
- }
+ List<SequenceI> seqs = collection.getSequences();
+ for (SequenceI seq : seqs)
+ {
+ if (seq.getHMM() != null)
+ {
+ hmm = seq.getHMM();
+ break;
+ }
+ }
}
public ColourSchemeI getInstance(AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
- HiddenMarkovModel markov = null;
- List<SequenceI> seqs = sg.getSequences();
- for (SequenceI seq : seqs)
- {
- if (seq.getHMM() != null)
- {
- markov = seq.getHMM();
- break;
- }
- }
- HMMERColourScheme colour = new HMMERColourScheme(markov);
- return colour;
+ HiddenMarkovModel markov = null;
+ List<SequenceI> seqs = sg.getSequences();
+ for (SequenceI seq : seqs)
+ {
+ if (seq.getHMM() != null)
+ {
+ markov = seq.getHMM();
+ break;
+ }
+ }
+ HMMERColourScheme colour = new HMMERColourScheme(markov);
+ return colour;
}