/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
+import jalview.datamodel.Profile;
import jalview.datamodel.SequenceI;
import jalview.schemes.ColourSchemeI;
-import java.util.Hashtable;
-
public class ConsensusThread extends AlignCalcWorker
{
public ConsensusThread(AlignViewportI alignViewport,
*/
protected void computeConsensus(AlignmentI alignment)
{
- Hashtable[] hconsensus = new Hashtable[alignment.getWidth()];
+ Profile[] hconsensus = new Profile[alignment.getWidth()];
SequenceI[] aseqs = getSequences();
AAFrequency.calculate(aseqs, 0, alignment.getWidth(), hconsensus, true);
/**
* @param hconsensus
*/
- protected void setColourSchemeConsensus(Hashtable[] hconsensus)
+ protected void setColourSchemeConsensus(Profile[] hconsensus)
{
ColourSchemeI globalColourScheme = alignViewport
.getGlobalColourScheme();
public void updateResultAnnotation(boolean immediate)
{
AlignmentAnnotation consensus = getConsensusAnnotation();
- Hashtable[] hconsensus = getViewportConsensus();
+ Profile[] hconsensus = (Profile[]) getViewportConsensus();
if (immediate || !calcMan.isWorking(this) && consensus != null
&& hconsensus != null)
{
*
* @param consensusAnnotation
* the annotation to be populated
- * @param consensusData
+ * @param hconsensus
* the computed consensus data
*/
protected void deriveConsensus(AlignmentAnnotation consensusAnnotation,
- Hashtable[] consensusData)
+ Profile[] hconsensus)
{
long nseq = getSequences().length;
- AAFrequency.completeConsensus(consensusAnnotation, consensusData, 0,
- consensusData.length, alignViewport.isIgnoreGapsConsensus(),
+ AAFrequency.completeConsensus(consensusAnnotation, hconsensus, 0,
+ hconsensus.length, alignViewport.isIgnoreGapsConsensus(),
alignViewport.isShowSequenceLogo(), nseq);
}
*
* @return
*/
- protected Hashtable[] getViewportConsensus()
+ protected Object[] getViewportConsensus()
{
+ // TODO convert ComplementConsensusThread to use Profile
return alignViewport.getSequenceConsensusHash();
}
}