import jalview.analysis.AlignmentUtils;
import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
-import jalview.analysis.TreeModel;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureColourI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
-import jalview.datamodel.PDBEntry;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.SequenceGroup;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Rectangle;
-import java.util.ArrayList;
import java.util.Hashtable;
+import java.util.Iterator;
import java.util.List;
-import java.util.Vector;
import javax.swing.JInternalFrame;
private AnnotationColumnChooser annotationColumnSelectionState;
+ boolean validCharWidth;
+
+ public boolean followSelection = true;
+
+ private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<>();
+
/**
* Creates a new AlignViewport object.
*
setFont(new Font(fontName, style, Integer.parseInt(fontSize)), true);
- alignment
- .setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0));
+ AlignmentI al = getAlignment();
+
+ if (Cache.getDefault("NORMALISE_GAPS", true))
+ {
+ al.setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0));
+ }
// We must set conservation and consensus before setting colour,
// as Blosum and Clustal require this to be done
- if (hconsensus == null && !isDataset)
+ if (consensusProfiles == null && !isDataset)
{
- if (!alignment.isNucleotide())
+ if (!al.isNucleotide())
{
showConservation = Cache.getDefault("SHOW_CONSERVATION", true);
showQuality = Cache.getDefault("SHOW_QUALITY", true);
showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false);
normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO",
false);
+ // for now, use consensus options for Information till it gets its own
+ setShowHMMSequenceLogo(showSequenceLogo);
+ setNormaliseHMMSequenceLogo(normaliseSequenceLogo);
+ setShowInformationHistogram(showConsensusHistogram);
showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false);
showConsensus = Cache.getDefault("SHOW_IDENTITY", true);
showOccupancy = Cache.getDefault(Preferences.SHOW_OCCUPANCY, true);
}
initAutoAnnotation();
- String colourProperty = alignment.isNucleotide()
+ // initInformation();
+
+ String colourProperty = al.isNucleotide()
? Preferences.DEFAULT_COLOUR_NUC
: Preferences.DEFAULT_COLOUR_PROT;
String schemeName = Cache.getProperty(colourProperty);
ResidueColourScheme.NONE);
}
ColourSchemeI colourScheme = ColourSchemeProperty
- .getColourScheme(alignment, schemeName);
+ .getColourScheme(al, schemeName);
residueShading = new ResidueShader(colourScheme);
if (colourScheme instanceof UserColourScheme)
if (residueShading != null)
{
- residueShading.setConsensus(hconsensus);
+ residueShading.setConsensus(consensusProfiles);
}
}
- boolean validCharWidth;
-
/**
* {@inheritDoc}
*/
/*
* replace mappings on our alignment
*/
- if (alignment != null && align != null)
+ if (getAlignment() != null && align != null)
{
- alignment.setCodonFrames(align.getCodonFrames());
+ getAlignment().setCodonFrames(align.getCodonFrames());
}
}
}
/**
- * returns the visible column regions of the alignment
+ * Returns an iterator over the visible column regions of the alignment
*
* @param selectedRegionOnly
* true to just return the contigs intersecting with the selected
* area
* @return
*/
- public int[] getViewAsVisibleContigs(boolean selectedRegionOnly)
+ public Iterator<int[]> getViewAsVisibleContigs(boolean selectedRegionOnly)
{
- int[] viscontigs = null;
- int start = 0, end = 0;
+ int start = 0;
+ int end = 0;
if (selectedRegionOnly && selectionGroup != null)
{
start = selectionGroup.getStartRes();
}
else
{
- end = alignment.getWidth();
+ end = getAlignment().getWidth();
}
- viscontigs = alignment.getHiddenColumns().getVisibleContigs(start, end);
- return viscontigs;
+
+ return getAlignment().getHiddenColumns().getVisContigsIterator(start,
+ end, false);
}
/**
return false;
}
- public boolean followSelection = true;
-
/**
* @return true if view selection should always follow the selections
* broadcast by other selection sources
.getStructureSelectionManager(Desktop.instance);
}
- @Override
- public boolean isNormaliseSequenceLogo()
- {
- return normaliseSequenceLogo;
- }
-
- public void setNormaliseSequenceLogo(boolean state)
- {
- normaliseSequenceLogo = state;
- }
-
/**
*
* @return true if alignment characters should be displayed
return validCharWidth;
}
- private Hashtable<String, AutoCalcSetting> calcIdParams = new Hashtable<String, AutoCalcSetting>();
-
public AutoCalcSetting getCalcIdSettingsFor(String calcId)
{
return calcIdParams.get(calcId);
}
fr.setTransparency(featureSettings.getTransparency());
}
+
}