seqannot = new IdentityHashMap<SequenceI, AlignmentAnnotation>();
}
// resolve the context containing all the annotation for the sequence
- AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment
+ AnnotatedCollectionI alcontext = alignment instanceof AlignmentI
+ ? alignment
: alignment.getContext();
boolean f = true, rna = false;
- for (AlignmentAnnotation alan : alcontext.findAnnotation(annotation
- .getCalcId()))
+ for (AlignmentAnnotation alan : alcontext
+ .findAnnotation(annotation.getCalcId()))
{
if (alan.sequenceRef != null
- && (alan.label != null && annotation != null && alan.label
- .equals(annotation.label)))
+ && (alan.label != null && annotation != null
+ && alan.label.equals(annotation.label)))
{
if (!rna && alan.isRNA())
{
public Color getMaxColour()
{
- return new Color(redMin + redRange, greenMin + greenRange, blueMin
- + blueRange);
+ return new Color(redMin + redRange, greenMin + greenRange,
+ blueMin + blueRange);
}
/**
/*
* locate the annotation we are configured to colour by
*/
- AlignmentAnnotation ann = (seqAssociated && seqannot != null ? seqannot
- .get(seq) : this.annotation);
+ AlignmentAnnotation ann = (seqAssociated && seqannot != null
+ ? seqannot.get(seq)
+ : this.annotation);
/*
* if gap or no annotation at position, no colour (White)
*/
if (annotationThreshold != null)
{
- if ((aboveAnnotationThreshold == ABOVE_THRESHOLD && aj.value >= annotationThreshold.value)
- || (aboveAnnotationThreshold == BELOW_THRESHOLD && aj.value > annotationThreshold.value))
+ if ((aboveAnnotationThreshold == ABOVE_THRESHOLD
+ && aj.value < annotationThreshold.value)
+ || (aboveAnnotationThreshold == BELOW_THRESHOLD
+ && aj.value > annotationThreshold.value))
{
return Color.white;
}
}
else
{
- result = ann.annotations[j].secondaryStructure == 'H' ? AnnotationRenderer.HELIX_COLOUR
- : ann.annotations[j].secondaryStructure == 'E' ? AnnotationRenderer.SHEET_COLOUR
+ result = ann.annotations[j].secondaryStructure == 'H'
+ ? AnnotationRenderer.HELIX_COLOUR
+ : ann.annotations[j].secondaryStructure == 'E'
+ ? AnnotationRenderer.SHEET_COLOUR
: AnnotationRenderer.STEM_COLOUR;
}
}