}
}
+
/**
* Calculate the consensus symbol(s) for each column in the given range.
*
value = hmm.getMatchEmissionProbability(column, symbol);
double freq;
- if (alph == AMINO && removeBelowBackground)
+ if (AMINO.equals(alph) && removeBelowBackground)
{
freq = ResidueProperties.aminoBackgroundFrequencies.get(symbol);
if (value < freq)
value = 0d;
}
}
- else if (alph == DNA && removeBelowBackground)
+ else if (DNA.equals(alph) && removeBelowBackground)
{
freq = ResidueProperties.nucleotideBackgroundFrequencies
.get(symbol);
boolean isNormaliseSequenceLogo();
+ boolean isShowInformationHistogram();
+
+ boolean isShowHMMSequenceLogo();
+
+ boolean isNormaliseHMMSequenceLogo();
+
ColourSchemeI getGlobalColourScheme();
/**
boolean isIgnoreGapsConsensus();
+ boolean isIgnoreBelowBackground();
+
boolean isCalculationInProgress(AlignmentAnnotation alignmentAnnotation);
AlignmentAnnotation getAlignmentQualityAnnot();
AlignmentAnnotation getAlignmentConsensusAnnotation();
/**
+ * get the container for alignment information content annotation
+ *
+ * @return
+ */
+ AlignmentAnnotation getAlignmentInformationAnnotation();
+
+ /**
* get the container for alignment gap annotation
*
* @return
*
* @return
*/
+ @Override
boolean isProteinFontAsCdna();
/**
*
* @return
*/
+ @Override
void setProteinFontAsCdna(boolean b);
}
// TODO implement for applet
}
+ @Override
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ // TODO Auto-generated method stub
+ return normaliseHMMSequenceLogo;
+ }
+
}
*/
public class HiddenMarkovModel
{
+
+
// Stores file properties. Do not directly access this field as it contains
// only string value - use the getter methods. For example, to find the length
// of theHMM, use getModelLength()to return an int value
public Integer getNodeAlignmentColumn(int nodeIndex)
{
Integer value = nodes.get(nodeIndex).getAlignmentColumn();
- return value;
+ return value - 1;
}
public char getConsensusResidue(int nodeIndex)
AlignmentAnnotation conservation = null;
+ AlignmentAnnotation informationContent = null;
+
private boolean showConsensusHistogram;
private AnnotatedCollectionI context;
+ private boolean showHMMSequenceLogo;
+
+ private boolean normaliseHMMSequenceLogo;
+
+ private boolean showInformationHistogram;
+
/**
* Creates a new SequenceGroup object.
*/
showSequenceLogo = seqsel.showSequenceLogo;
normaliseSequenceLogo = seqsel.normaliseSequenceLogo;
showConsensusHistogram = seqsel.showConsensusHistogram;
+ showHMMSequenceLogo = seqsel.showHMMSequenceLogo;
+ normaliseHMMSequenceLogo = seqsel.normaliseHMMSequenceLogo;
+ showInformationHistogram = seqsel.showInformationHistogram;
idColour = seqsel.idColour;
outlineColour = seqsel.outlineColour;
seqrep = seqsel.seqrep;
*/
public boolean recalcConservation(boolean defer)
{
- if (cs == null && consensus == null && conservation == null)
+ if (cs == null && consensus == null && conservation == null
+ && informationContent == null)
{
return false;
}
{
ProfilesI cnsns = AAFrequency.calculate(sequences, startRes,
endRes + 1, showSequenceLogo);
+ if (informationContent != null)
+ {
+ // _updateInformationRow(cnsns, sequences.size()); TODO don't know what
+ // to do here
+ upd = true;
+ }
if (consensus != null)
{
_updateConsensusRow(cnsns, sequences.size());
// ignoreGapsInConsensusCalculation);
}
+ private void _updateInformationRow(ProfilesI cnsns, long nseq)
+ {
+ if (consensus == null)
+ {
+ getConsensus();
+ }
+ consensus.label = "Consensus for " + getName();
+ consensus.description = "Percent Identity";
+ consensusData = cnsns;
+ // preserve width if already set
+ int aWidth = (consensus.annotations != null)
+ ? (endRes < consensus.annotations.length
+ ? consensus.annotations.length : endRes + 1)
+ : endRes + 1;
+ consensus.annotations = null;
+ consensus.annotations = new Annotation[aWidth]; // should be alignment width
+
+ AAFrequency.completeConsensus(consensus, cnsns, startRes, endRes + 1,
+ ignoreGapsInConsensus, showSequenceLogo, nseq); // TODO: setting
+ // container
+ // for
+ // ignoreGapsInConsensusCalculation);
+ }
+
/**
* @param s
* sequence to either add or remove from group
return (startRes <= apos && endRes >= apos) && sequences.contains(seq);
}
+ public boolean isShowInformationHistogram()
+ {
+ return showInformationHistogram;
+ }
+
+ public void setShowInformationHistogram(boolean state)
+ {
+ if (showInformationHistogram != state && informationContent != null)
+ {
+ this.showInformationHistogram = state;
+ // recalcConservation(); TODO don't know what to do here next
+ }
+ this.showInformationHistogram = state;
+
+ }
+
+ public boolean isShowHMMSequenceLogo()
+ {
+ // TODO Auto-generated method stub
+ return showHMMSequenceLogo;
+ }
+
+ public void setshowHMMSequenceLogo(boolean state)
+ {
+ showHMMSequenceLogo = state;
+
+ }
+
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ // TODO Auto-generated method stub
+ return normaliseHMMSequenceLogo;
+ }
+
+ public void setNormaliseHMMSequenceLogo(boolean state)
+ {
+ normaliseSequenceLogo = state;
+ }
}
import jalview.schemes.ColourSchemeI;
import jalview.schemes.ColourSchemes;
import jalview.schemes.ResidueColourScheme;
+import jalview.schemes.ResidueProperties;
import jalview.schemes.TCoffeeColourScheme;
+import jalview.util.Comparison;
import jalview.util.MessageManager;
import jalview.viewmodel.AlignmentViewport;
import jalview.viewmodel.ViewportRanges;
import java.awt.print.PageFormat;
import java.awt.print.PrinterJob;
import java.beans.PropertyChangeEvent;
+import java.io.BufferedReader;
import java.io.File;
+import java.io.FileReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.net.URL;
import java.util.Arrays;
import java.util.Deque;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
+import java.util.Scanner;
import java.util.Vector;
import javax.swing.JCheckBoxMenuItem;
IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener
{
+ Map<String, Float> distribution = new HashMap<>(); // temporary
+
public static final int DEFAULT_WIDTH = 700;
public static final int DEFAULT_HEIGHT = 500;
*/
String fileName = null;
+
/**
* Creates a new AlignFrame object with specific width and height.
*
showConsensusHistogram.setSelected(av.isShowConsensusHistogram());
showSequenceLogo.setSelected(av.isShowSequenceLogo());
normaliseSequenceLogo.setSelected(av.isNormaliseSequenceLogo());
+ showInformationHistogram.setSelected(av.isShowInformationHistogram());
+ showHMMSequenceLogo.setSelected(av.isShowHMMSequenceLogo());
+ normaliseHMMSequenceLogo.setSelected(av.isNormaliseHMMSequenceLogo());
ColourMenuHelper.setColourSelected(colourMenu,
av.getGlobalColourScheme());
getViewport().getAlignment().addAnnotation(annotation);
annotation.setHMM(hmm);
isAnnotation = true;
+
+ BufferedReader input = new BufferedReader(new FileReader(
+ "H:/Desktop/Distributions/BadAlignment-8.csv"));
+ String line = input.readLine();
+
+ while (!("".equals(line)) && line != null)
+ {
+ Scanner scanner = new Scanner(line);
+ if (scanner.hasNext())
+ {
+ scanner.useDelimiter(",");
+ String value = scanner.next();
+
+ distribution.put(value, scanner.nextFloat());
+ line = input.readLine();
+ }
+ }
+
+
+ AlignmentI alignment = getViewport().getAlignment();
+ Integer alpha = 0;
+ final int AMINO = 0;
+ final int DNA = 1;
+ if ("amino".equals(hmm.getAlphabetType()))
+ {
+ alpha = AMINO;
+ }
+ else if ("DNA".equals(hmm.getAlphabetType()))
+ {
+ alpha = DNA;
+ }
+
+
+ int size = 0;
+
+ for (int l = 1; l < hmm.getLength() + 1; l++)
+ {
+ for (int n = 0; n < alignment.getHeight(); n++)
+ {
+
+ char character = alignment.getSequenceAt(n)
+ .getCharAt(hmm.getNodeAlignmentColumn(l));
+ character = Character.toUpperCase(character);
+
+ boolean containedN;
+ boolean containedA;
+
+ containedN = ResidueProperties.nucleotideBackgroundFrequencies
+ .containsKey(character);
+ containedA = ResidueProperties.aminoBackgroundFrequencies
+ .containsKey(character);
+
+ if (!Comparison.isGap(character)
+ && ((alpha == DNA && containedN)
+ || (alpha == AMINO && containedA)))
+ {
+ size++;
+ }
+
+ }
+ }
+
+ for (int l = 1; l < hmm.getLength() + 1; l++)
+ {
+ for (int n = 0; n < alignment.getHeight(); n++)
+ {
+ Double prob;
+ char character;
+ character = alignment.getSequenceAt(n)
+ .getCharAt(hmm.getNodeAlignmentColumn(l));
+ character = Character.toUpperCase(character);
+ boolean containedN;
+ boolean containedA;
+
+ containedN = ResidueProperties.nucleotideBackgroundFrequencies
+ .containsKey(character);
+ containedA = ResidueProperties.aminoBackgroundFrequencies
+ .containsKey(character);
+
+ if (!Comparison.isGap(character)
+ && ((alpha == DNA && containedN)
+ || (alpha == AMINO && containedA)))
+ {
+ prob = hmm.getMatchEmissionProbability(
+ hmm.getNodeAlignmentColumn(l), character);
+ if (prob == 0d)
+ {
+ System.out.println("?");
+ }
+
+ double freq = 0;
+ if (alpha == AMINO)
+ {
+ freq = ResidueProperties.aminoBackgroundFrequencies
+ .get(character);
+ }
+ if (alpha == DNA)
+ {
+ freq = ResidueProperties.nucleotideBackgroundFrequencies
+ .get(character);
+ }
+ Double doubleValue = Math.log(prob / freq);
+
+ String value = String.format("%.1f", doubleValue);
+ if ("-0.0".equals(value))
+ {
+ value = "0.0";
+ }
+ if (distribution.containsKey(value))
+ {
+ float prev = distribution.get(value);
+ prev = prev + (10000f / size);
+ distribution.put(value, prev);
+ }
+ else
+ {
+ distribution.put(value, 10000f / size);
+ }
+
+
+ }
+
+ }
+ }
+
+ PrintWriter writer = new PrintWriter(
+ new File(
+ "H:/Desktop/Distributions/BadAlignment-8.csv"));
+ for (Map.Entry<String, Float> entry : distribution
+ .entrySet())
+ {
+ writer.println(entry.getKey() + "," + entry.getValue());
+
+ }
+
+ writer.close();
+
+
}
else if (FileFormat.Jnet.equals(format))
{
}
@Override
+ protected void showInformationHistogram_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowInformationHistogram(
+ showInformationHistogram.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ @Override
+ protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
+ {
+ viewport.setShowHMMSequenceLogo(showHMMSequenceLogo.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ @Override
+ protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)
+ {
+ showHMMSequenceLogo.setState(true);
+ viewport.setShowHMMSequenceLogo(true);
+ viewport.setNormaliseHMMSequenceLogo(normaliseSequenceLogo.getState());
+ alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
+ }
+
+ @Override
protected void applyAutoAnnotationSettings_actionPerformed(ActionEvent e)
{
alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState());
*/
public SequenceI[][] collateForPDB(PDBEntry[] pdbEntries)
{
- List<SequenceI[]> seqvectors = new ArrayList<SequenceI[]>();
+ List<SequenceI[]> seqvectors = new ArrayList<>();
for (PDBEntry pdb : pdbEntries)
{
- List<SequenceI> choosenSeqs = new ArrayList<SequenceI>();
+ List<SequenceI> choosenSeqs = new ArrayList<>();
for (SequenceI sq : alignment.getSequences())
{
Vector<PDBEntry> pdbRefEntries = sq.getDatasetSequence()
normaliseSequenceLogo = state;
}
+ public void setNormaliseHMMSequenceLogo(boolean state)
+ {
+ normaliseHMMSequenceLogo = state;
+ }
+
/**
*
* @return true if alignment characters should be displayed
return validCharWidth;
}
- private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<String, AutoCalcSetting>();
+ private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<>();
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
fr.setTransparency(featureSettings.getTransparency());
}
+ @Override
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ // TODO Auto-generated method stub
+ return normaliseHMMSequenceLogo;
+ }
+
}
private static final Pattern LEFT_ANGLE_BRACKET_PATTERN = Pattern
.compile("<");
+
String TOGGLE_LABELSCALE = MessageManager
.getString("label.scale_label_to_column");
pop.add(item);
}
}
- else if (label.indexOf("Consensus") > -1
- || label.indexOf("Information Content") > -1)
+ else if (label.indexOf("Consensus") > -1)
{
- // identifier for type of histogram and/or logo to be shown
- int type = 2;
- if (label.indexOf("Consensus") > -1)
- {
- type = 0;
- }
- else if (label.indexOf("Information Content") > -1)
- {
- type = 1;
- }
+
pop.addSeparator();
// av and sequencegroup need to implement same interface for
final AlignmentAnnotation aaa = aa[selectedRow];
- if (type == 0)
- {
+
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
MessageManager.getString("label.ignore_gaps_consensus"),
(aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
}
});
pop.add(cbmi);
- }
- if (type == 1)
- {
- final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
- "Ignore Below Background Frequency",
- (aa[selectedRow].groupRef != null)
- ? aa[selectedRow].groupRef
- .getIgnoreBelowBackground()
- : ap.av.isIgnoreBelowBackground());
-
- cbmi.addActionListener(new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- if (aaa.groupRef != null)
- {
- // TODO: pass on reference to ap so the view can be updated.
- aaa.groupRef.setIgnoreBelowBackground(cbmi.getState());
- ap.getAnnotationPanel()
- .paint(ap.getAnnotationPanel().getGraphics());
- }
- else
- {
- ap.av.setIgnoreBelowBackground(cbmi.getState(), ap);
- }
- ap.alignmentChanged();
- }
- });
- pop.add(cbmi);
- }
// av and sequencegroup need to implement same interface for
if (aaa.groupRef != null)
{
consclipbrd.addActionListener(this);
pop.add(consclipbrd);
}
+ else if (label.indexOf("Information Content") > -1) // TODO create labels
+ // in message resource
+ // for these
+ {
+ pop.addSeparator();
+ final AlignmentAnnotation aaa = aa[selectedRow];
+
+ final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
+ "Ignore Below Background Frequency",
+ (aa[selectedRow].groupRef != null)
+ ? aa[selectedRow].groupRef
+ .getIgnoreBelowBackground()
+ : ap.av.isIgnoreBelowBackground());
+
+ cbmi.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ if (aaa.groupRef != null)
+ {
+ // TODO: pass on reference to ap so the view can be updated.
+ aaa.groupRef.setIgnoreBelowBackground(cbmi.getState());
+ ap.getAnnotationPanel()
+ .paint(ap.getAnnotationPanel().getGraphics());
+ }
+ else
+ {
+ ap.av.setIgnoreBelowBackground(cbmi.getState(), ap);
+ }
+ ap.alignmentChanged();
+ }
+ });
+ pop.add(cbmi);
+ if (aaa.groupRef != null)
+ {
+ final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+ MessageManager.getString("label.show_group_histogram"),
+ aa[selectedRow].groupRef.isShowInformationHistogram());
+ chist.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ aaa.groupRef.setShowInformationHistogram(chist.getState());
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(chist);
+ final JCheckBoxMenuItem cprofl = new JCheckBoxMenuItem(
+ MessageManager.getString("label.show_group_logo"),
+ aa[selectedRow].groupRef.isShowHMMSequenceLogo());
+ cprofl.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ aaa.groupRef.setshowHMMSequenceLogo(cprofl.getState());
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(cprofl);
+ final JCheckBoxMenuItem cproflnorm = new JCheckBoxMenuItem(
+ MessageManager.getString("label.normalise_group_logo"),
+ aa[selectedRow].groupRef.isNormaliseHMMSequenceLogo());
+ cproflnorm.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ aaa.groupRef
+ .setNormaliseHMMSequenceLogo(cproflnorm.getState());
+ // automatically enable logo display if we're clicked
+ aaa.groupRef.setshowHMMSequenceLogo(true);
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(cproflnorm);
+ }
+ else
+ {
+ final JCheckBoxMenuItem chist = new JCheckBoxMenuItem(
+ MessageManager.getString("label.show_histogram"),
+ av.isShowInformationHistogram());
+ chist.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ av.setShowInformationHistogram(chist.getState());
+ ap.alignFrame.setMenusForViewport();
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(chist);
+ final JCheckBoxMenuItem cprof = new JCheckBoxMenuItem(
+ MessageManager.getString("label.show_logo"),
+ av.isShowHMMSequenceLogo());
+ cprof.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ av.setShowHMMSequenceLogo(cprof.getState());
+ ap.alignFrame.setMenusForViewport();
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(cprof);
+ final JCheckBoxMenuItem cprofnorm = new JCheckBoxMenuItem(
+ MessageManager.getString("label.normalise_logo"),
+ av.isNormaliseHMMSequenceLogo());
+ cprofnorm.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ // TODO: pass on reference
+ // to ap
+ // so the
+ // view
+ // can be
+ // updated.
+ av.setShowHMMSequenceLogo(true);
+ av.setNormaliseHMMSequenceLogo(cprofnorm.getState());
+ ap.alignFrame.setMenusForViewport();
+ ap.repaint();
+ // ap.annotationPanel.paint(ap.annotationPanel.getGraphics());
+ }
+ });
+ pop.add(cprofnorm);
+ }
+ final JMenuItem consclipbrd = new JMenuItem(COPYCONS_SEQ);
+ consclipbrd.addActionListener(this);
+ pop.add(consclipbrd);
+ }
}
pop.show(this, evt.getX(), evt.getY());
}
protected JCheckBoxMenuItem normaliseSequenceLogo = new JCheckBoxMenuItem();
+ protected JCheckBoxMenuItem showInformationHistogram = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem showHMMSequenceLogo = new JCheckBoxMenuItem();
+
+ protected JCheckBoxMenuItem normaliseHMMSequenceLogo = new JCheckBoxMenuItem();
+
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
private SequenceAnnotationOrder annotationSortOrder;
private boolean showAutoCalculatedAbove = false;
- private Map<KeyStroke, JMenuItem> accelerators = new HashMap<KeyStroke, JMenuItem>();
+ private Map<KeyStroke, JMenuItem> accelerators = new HashMap<>();
private SplitContainerI splitFrame;
protected void showComplement_actionPerformed(boolean complement)
{
}
+
+ protected void showInformationHistogram_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void showHMMSequenceLogo_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected void normaliseHMMSequenceLogo_actionPerformed(ActionEvent e)
+ {
+ // TODO Auto-generated method stub
+
+ }
}
private boolean av_ignoreGapsConsensus;
+ private boolean av_ignoreBelowBackground;
+
/**
* attributes set from AwtRenderPanelI
*/
complementConsensus = av.getComplementConsensusHash();
hStrucConsensus = av.getRnaStructureConsensusHash();
av_ignoreGapsConsensus = av.isIgnoreGapsConsensus();
+ av_ignoreBelowBackground = av.isIgnoreBelowBackground();
}
if (aa.label.startsWith("Information"))
{
return AAFrequency.getHMMProfileFor(aa, column,
- true); // TODO detect setting
+ av_ignoreBelowBackground); // TODO check if this follows standard
+ // pipeline
}
if (aa.autoCalculated
&& (aa.label.startsWith("Consensus") || aa.label
}
Double prob;
prob = hmm.getMatchEmissionProbability(position, symbol);
+ if (prob == 0)
+ {
+ return Color.red;
+ }
double freq = ResidueProperties.aminoBackgroundFrequencies.get(symbol);
- Double value = prob - freq;
-
+ Double value = Math.log(prob / freq);
Color colour = null;
- if (value >= 0)
+ if (value > 0)
{
colour = ColorUtils.getGraduatedColour(value.floatValue(), 0,
- Color.WHITE, 1f, Color.green);
+ Color.WHITE, 3f, Color.blue);
}
else if (value < 0)
{
- return Color.YELLOW;
+ return Color.ORANGE;
}
return colour;
protected AlignmentAnnotation[] groupConservation;
- protected AlignmentAnnotation hmmConsensus;
+ protected AlignmentAnnotation informationContent;
/**
* results of alignment consensus analysis for visible portion of view
}
@Override
+ public AlignmentAnnotation getAlignmentInformationAnnotation()
+ {
+ return informationContent;
+ }
+
+ @Override
public AlignmentAnnotation getAlignmentGapAnnotation()
{
return gapcounts;
protected boolean showConsensusHistogram = true;
/**
+ * should hmm profile be rendered by default
+ */
+ protected boolean showHMMSequenceLogo = false;
+
+ /**
+ * should hmm profile be rendered normalised to row height
+ */
+ protected boolean normaliseHMMSequenceLogo = false;
+
+ /**
+ * should information histograms be rendered by default
+ */
+ protected boolean showInformationHistogram = true;
+
+ /**
* @return the showConsensusProfile
*/
@Override
}
/**
+ * @return the showInformationProfile
+ */
+ @Override
+ public boolean isShowHMMSequenceLogo()
+ {
+ return showHMMSequenceLogo;
+ }
+
+ /**
* @param showSequenceLogo
* the new value
*/
this.showSequenceLogo = showSequenceLogo;
}
+ public void setShowHMMSequenceLogo(boolean showHMMSequenceLogo)
+ {
+ if (showHMMSequenceLogo != this.showHMMSequenceLogo)
+ {
+ this.showHMMSequenceLogo = showHMMSequenceLogo;
+ }
+ this.showHMMSequenceLogo = showHMMSequenceLogo;
+ }
+
/**
* @param showConsensusHistogram
* the showConsensusHistogram to set
}
/**
+ * @param showInformationHistogram
+ * the showInformationHistogram to set
+ */
+ public void setShowInformationHistogram(boolean showInformationHistogram)
+ {
+ this.showInformationHistogram = showInformationHistogram;
+ }
+
+ /**
* @return the showGroupConservation
*/
public boolean isShowGroupConservation()
}
/**
+ *
+ * @return flag to indicate if the information content histogram should be
+ * rendered by default
+ */
+ @Override
+ public boolean isShowInformationHistogram()
+ {
+ return this.showInformationHistogram;
+ }
+
+ /**
* when set, updateAlignment will always ensure sequences are of equal length
*/
private boolean padGaps = false;
return ignoreGapsInConsensusCalculation;
}
+ @Override
public boolean isIgnoreBelowBackground()
{
return ignoreBelowBackGroundFrequencyCalculation;