import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.ProfilesI;
+import jalview.schemes.CollectionColourScheme;
+import jalview.schemes.CollectionColourSchemeI;
import jalview.schemes.ColourSchemeI;
+import jalview.schemes.NucleotideColourScheme;
import jalview.schemes.ResidueProperties;
+import jalview.schemes.ZappoColourScheme;
import jalview.util.Platform;
import java.awt.BasicStroke;
boolean av_renderHistogram = true, av_renderProfile = true,
av_normaliseProfile = false;
- ColourSchemeI profcolour = null;
+ CollectionColourSchemeI profcolour = null;
private ColumnSelection columnSelection;
- private Hashtable[] hconsensus;
+ private ProfilesI hconsensus;
private Hashtable[] complementConsensus;
av_renderHistogram = av.isShowConsensusHistogram();
av_renderProfile = av.isShowSequenceLogo();
av_normaliseProfile = av.isNormaliseSequenceLogo();
- profcolour = av.getGlobalColourScheme();
- if (profcolour == null)
+ profcolour = av.getViewportColourScheme();
+ if (profcolour == null || profcolour.getColourScheme() == null)
{
- // Set the default colour for sequence logo if the alignnent has no
- // colourscheme set
- profcolour = av.getAlignment().isNucleotide() ? new jalview.schemes.NucleotideColourScheme()
- : new jalview.schemes.ZappoColourScheme();
+ /*
+ * Use default colour for sequence logo if
+ * the alignment has no colourscheme set
+ * (would like to use user preference but n/a for applet)
+ */
+ ColourSchemeI col = av.getAlignment().isNucleotide() ? new NucleotideColourScheme()
+ : new ZappoColourScheme();
+ profcolour = new CollectionColourScheme(col);
}
columnSelection = av.getColumnSelection();
hconsensus = av.getSequenceConsensusHash();
{
// TODO? group consensus for cDNA complement
return AAFrequency.extractProfile(
- aa.groupRef.consensusData[column],
+ aa.groupRef.consensusData.get(column),
aa.groupRef.getIgnoreGapsConsensus());
}
// TODO extend annotation row to enable dynamic and static profile data to
}
else
{
- return AAFrequency.extractProfile(hconsensus[column],
+ return AAFrequency.extractProfile(
+hconsensus.get(column),
av_ignoreGapsConsensus);
}
}