- protected boolean markColumnsContaining(
- AlignmentAnnotation currentAnnotation, int thresholdComparisonType)
- {
- try
- {
- if (currentAnnotation != null)
- {
- Annotation[] annotations = currentAnnotation.annotations;
- ColumnSelection cs = av.getColumnSelection();
- cs.clear();
- if (thresholdComparisonType == AnnotationColourGradient.NO_THRESHOLD)
- {
- int count = 0;
- do
- {
- if (annotations[count] != null)
- {
- if (currentAnnotation.label.equals("Secondary Structure")
- && annotations[count].secondaryStructure != ' ')
- {
- cs.addElement(count);
- }
- else if (currentAnnotation.label
- .equals("Iron Sulphur Contacts"))
- {
- cs.addElement(count);
- }
- else if (annotations[count].value != 0.0)
- {
- cs.addElement(count);
- }
-
- }
- count++;
- } while (count < annotations.length);
- }
- else
- {
- int count = 0;
- do
- {
- if (annotations[count] != null)
- {
- if (thresholdComparisonType == AnnotationColourGradient.ABOVE_THRESHOLD)
- {
- if (annotations[count].value > currentAnnotation.threshold.value)
- {
- cs.addElement(count);
- }
- }
- else if (thresholdComparisonType == AnnotationColourGradient.BELOW_THRESHOLD)
- {
- if (annotations[count].value < currentAnnotation.threshold.value)
- {
- cs.addElement(count);
- }
- }
-
- }
- count++;
- } while (count < annotations.length);
- }
- }
-
- return true;
- } catch (Exception e)
- {
- e.printStackTrace();
- return false;
- }
- }
-