@@ -342,7+342,7 @@ public class AlignViewport implements SelectionSource
alignment.addAnnotation(quality);
}
}
alignment.addAnnotation(quality);
}
}
-
+ // TODO: add menu option action that nulls or creates consensus object depending on if the user wants to see the annotation or not in a specific alignment
consensus = new AlignmentAnnotation("Consensus", "PID",
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
consensus.hasText = true;
consensus = new AlignmentAnnotation("Consensus", "PID",
new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
consensus.hasText = true;
@@ -560,7+560,8 @@ public class AlignViewport implements SelectionSource
*/
public void updateConservation(final AlignmentPanel ap)
{
*/
public void updateConservation(final AlignmentPanel ap)
{
- if (alignment.isNucleotide() || conservation == null)
+ // see note in mantis : issue number 8585
+ if (alignment.isNucleotide() || conservation == null || !autoCalculateConsensus)
{
return;
}
{
return;
}
@@ -574,6+575,11 @@ public class AlignViewport implements SelectionSource
*/
public void updateConsensus(final AlignmentPanel ap)
{
*/
public void updateConsensus(final AlignmentPanel ap)
{
+ // see note in mantis : issue number 8585
+ if (consensus == null || !autoCalculateConsensus)
+ {
+ return;
+ }
consensusThread = new ConsensusThread(ap);
consensusThread.start();
}
consensusThread = new ConsensusThread(ap);
consensusThread.start();
}
@@ -1883,9+1889,12 @@ public class AlignViewport implements SelectionSource
}
if (hconsensus != null && autoCalculateConsensus)
{
}
if (hconsensus != null && autoCalculateConsensus)
{
- updateConsensus(ap);
updateConservation(ap);
}
updateConservation(ap);
}
+ if (autoCalculateConsensus)
+ {
+ updateConsensus(ap);
+ }
// Reset endRes of groups if beyond alignment width
int alWidth = alignment.getWidth();
// Reset endRes of groups if beyond alignment width