action.pairwise_alignment = Pairwise Alignment
action.user_defined = User Defined...
action.by_conservation = By Conservation
-action.by_consensus_secondary_structure = By Secondary Structure Consensus
+action.by_secondary_structure_conservation = By Secondary Structure Conservation
action.wrap = Wrap
action.show_gaps = Show Gaps
action.show_hidden_markers = Show Hidden Markers
label.apply_colour_to_all_groups = Apply Colour To All Groups
label.modify_identity_threshold = Modify Identity Threshold...
label.modify_conservation_threshold = Modify Conservation Threshold...
-label.modify_consensus_secondary_structure_threshold = Modify Secondary Structure Consensus Threshold...
+label.modify_secondary_structure_conservation_threshold = Modify Secondary Structure Conservation Threshold...
label.input_from_textbox = Input from textbox
label.centre_column_labels = Centre column labels
label.automatic_scrolling = Automatic Scrolling
label.cut_sequences = Cut Sequences
label.conservation_colour_increment = Conservation Colour Increment ({0})
label.percentage_identity_threshold = Percentage Identity Threshold ({0})
-label.consensus_secondary_structure_threshold = Consensus Secondary Structure Threshold ({0})
+label.secondary_structure_conservation_threshold = Secondary Structure Conservation Threshold ({0})
label.error_unsupported_owwner_user_colour_scheme = Unsupported owner for User Colour scheme dialog
label.save_alignment_to_file = Save Alignment to file
label.save_features_to_file = Save Features to File
void setSecondaryStructureSources(List<String> secondaryStructureSources);
List<String> getSecondaryStructureSources();
+
+ int getConsensusSecondaryStructureThreshold();
+
+ /**
+ *
+ * @param val
+ * set the scalar for bleaching colourschemes according to degree of
+ * secondary structure conservation
+ */
+ void setConsensusSecondaryStructureThreshold(int val);
}
consensus = aan;
}
}
+
+ public void setSSConsensusRow(AlignmentAnnotation aan)
+ {
+
+ if (ssConsensus == null)
+ {
+ ssConsensus = new ArrayList<AlignmentAnnotation>();
+ ssConsensus.add(aan);
+ }
+ else {
+ boolean annotExists = ssConsensus.stream()
+ .anyMatch(ssa -> ssa.label.equals(aan.label));
+ if(!annotExists) {
+ ssConsensus.add(aan);
+ }
+ }
+ }
/**
*
viewTextMenuItem.setSelected(av.getShowText());
showNonconservedMenuItem.setSelected(av.getShowUnconserved());
showGroupConsensus.setSelected(av.isShowGroupConsensus());
+ showGroupSSConsensus.setSelected(av.isShowGroupSSConsensus());
showGroupConservation.setSelected(av.isShowGroupConservation());
showConsensusHistogram.setSelected(av.isShowConsensusHistogram());
showSequenceLogo.setSelected(av.isShowSequenceLogo());
{
SliderPanel.hideConservationSlider();
}
+ if (viewport.getByConsensusSecondaryStructureSelected())
+ {
+ SliderPanel.setConsensusSecondaryStructureSlider(alignPanel,
+ viewport.getResidueShading(), alignPanel.getViewName());
+ }
+ else
+ {
+ SliderPanel.hideConsensusSecondaryStructureSlider();
+ }
if (viewport.getAbovePIDThreshold())
{
SliderPanel.setPIDSliderSource(alignPanel,
});
byConsensusSecondaryStructureMenuItem.setText(
- MessageManager.getString("action.by_consensus_secondary_structure"));
+ MessageManager.getString("action.by_secondary_structure_conservation"));
byConsensusSecondaryStructureMenuItem.addActionListener(new ActionListener()
{
@Override
});
modifyConsensusSecondaryStructureThreshold.setText(MessageManager
- .getString("label.modify_consensus_secondary_structure_threshold"));
+ .getString("label.modify_secondary_structure_conservation_threshold"));
modifyConsensusSecondaryStructureThreshold.addActionListener(new ActionListener()
{
@Override
{
SliderPanel.setPIDSliderSource(ap, groupColourScheme, name);
}
+ if (stretchGroup.cs.isConsensusSecondaryStructureColouring())
+ {
+ SliderPanel.setConsensusSecondaryStructureSlider(ap, groupColourScheme, name);
+ }
}
PaintRefresher.Refresh(this, av.getSequenceSetId());
// TODO: structure colours only need updating if stretchGroup used to or now
}
consensusSecondaryStructureSlider.setTitle(MessageManager.formatMessage(
- "label.consensus_secondary_structure_threshold", new String[]
+ "label.secondary_structure_conservation_threshold", new String[]
{ source == null ? BACKGROUND : source }));
List<SequenceGroup> groups = ap.av.getAlignment().getGroups();
scheme.setConservationApplied(true);
scheme.setConservationInc(percent);
}
- else if(forConsensusSecondaryStructure)
- {
- scheme.setConsensusSecondaryStructureColouring(true);
- scheme.setConsensusSecondaryStructureThreshold(percent);
- }
else
{
scheme.setThreshold(percent, ap.av.isIgnoreGapsConsensus());
}
+ if(forConsensusSecondaryStructure)
+ {
+ scheme.setConsensusSecondaryStructureColouring(true);
+ scheme.setConsensusSecondaryStructureThreshold(percent);
+ }
}
/**
c.verdict(false, viewport.getConsPercGaps());
sg.cs.setConservation(c);
}
+ if(viewport.getResidueShading().isConsensusSecondaryStructureColouring())
+ {
+ sg.getGroupColourScheme().setConsensusSecondaryStructureThreshold(
+ viewport.getResidueShading().getThreshold());
+ sg.getGroupColourScheme().setConsensusSecondaryStructureColouring(true);
+ }
}
// indicate that associated structure views will need an update
viewport.setUpdateStructures(true);
byConsensusSecondaryStructureMenuItem = new JCheckBoxMenuItem(
- MessageManager.getString("action.by_consensus_secondary_structure"));
+ MessageManager.getString("action.by_secondary_structure_conservation"));
byConsensusSecondaryStructureMenuItem.addActionListener(new ActionListener()
{
@Override
});
modifyConsensusSecondaryStructureThreshold = new JMenuItem(MessageManager
- .getString("label.modify_consensus_secondary_structure_threshold"));
+ .getString("label.modify_secondary_structure_conservation_threshold"));
modifyConsensusSecondaryStructureThreshold.addActionListener(new ActionListener()
{
@Override
// group has references so set its ID field
jGroup.setId(groupRefs.get(sg));
}
+
+ List<String> groupSecondaryStructureSources = sg.getSecondaryStructureSources();
+ if(groupSecondaryStructureSources != null && groupSecondaryStructureSources.size()>0) {
+ jGroup.setSecondaryStructureSources(groupSecondaryStructureSources);
+ }
+
ColourSchemeI colourScheme = sg.getColourScheme();
if (colourScheme != null)
{
}
jGroup.setPidThreshold(groupColourScheme.getThreshold());
+
+ if(groupColourScheme.isConsensusSecondaryStructureColouring())
+ {
+ jGroup.setConsensusSecondaryStructureColouring(
+ groupColourScheme.isConsensusSecondaryStructureColouring());
+ jGroup.setConsensusSecondaryStructureThreshold(
+ groupColourScheme.getConsensusSecondaryStructureThreshold());
+ }
}
-
+
jGroup.setOutlineColour(sg.getOutlineColour().getRGB());
jGroup.setDisplayBoxes(sg.getDisplayBoxes());
jGroup.setDisplayText(sg.getDisplayText());
jGroup.getSeq().add(seqHash(seq));
}
}
-
+
// jms.setJGroup(groups);
Object group;
for (JGroup grp : groups)
}
}
view.setPidThreshold(vcs.getThreshold());
+
+ if(vcs.isConsensusSecondaryStructureColouring())
+ {
+ view.setConsensusSecondaryStructureThreshold(
+ vcs.getConsensusSecondaryStructureThreshold());
+ }
}
view.setConservationSelected(av.getConservationSelected());
view.setPidSelected(av.getAbovePIDThreshold());
+ view.setByConsensusSecondaryStructureSelected(
+ av.getByConsensusSecondaryStructureSelected());
view.setCharHeight(av.getCharHeight());
view.setCharWidth(av.getCharWidth());
final Font font = av.getFont();
view.setShowSequenceLogo(av.isShowSequenceLogo());
view.setNormaliseSequenceLogo(av.isNormaliseSequenceLogo());
view.setShowGroupConsensus(av.isShowGroupConsensus());
+ view.setShowGroupSSConsensus(av.isShowGroupSSConsensus());
view.setShowGroupConservation(av.isShowGroupConservation());
view.setShowNPfeatureTooltip(av.isShowNPFeats());
view.setShowDbRefTooltip(av.isShowDBRefs());
safeBoolean(jGroup.isColourText()),
safeInt(jGroup.getStart()), safeInt(jGroup.getEnd()));
sg.getGroupColourScheme().setThreshold(pidThreshold, true);
+ sg.getGroupColourScheme().setConsensusSecondaryStructureColouring(
+ safeBoolean(jGroup.isConsensusSecondaryStructureColouring()));
sg.getGroupColourScheme()
.setConservationInc(safeInt(jGroup.getConsThreshold()));
+ sg.getGroupColourScheme().setConsensusSecondaryStructureThreshold(
+ safeInt(jGroup.getConsensusSecondaryStructureThreshold()));
+
sg.setOutlineColour(new Color(safeInt(jGroup.getOutlineColour())));
sg.textColour = new Color(safeInt(jGroup.getTextCol1()));
sg.setshowSequenceLogo(jGroup.isShowSequenceLogo());
sg.setNormaliseSequenceLogo(jGroup.isNormaliseSequenceLogo());
sg.setIgnoreGapsConsensus(jGroup.isIgnoreGapsinConsensus());
+ sg.setSecondaryStructureSources(jGroup.getSecondaryStructureSources());
if (jGroup.getConsThreshold() != null
&& jGroup.getConsThreshold().intValue() != 0)
{
{
sg.setConservationRow(jaa);
}
+ if (jaa.label.startsWith("Secondary Structure Consensus"))
+ {
+ sg.setSSConsensusRow(jaa);
+ }
}
}
}
viewport.setConservationSelected(
safeBoolean(view.isConservationSelected()));
viewport.setIncrement(safeInt(view.getConsThreshold()));
+ viewport.setByConsensusSecondaryStructureSelected(
+ safeBoolean(view.isByConsensusSecondaryStructureSelected()));
+ viewport.setConsensusSecondaryStructureThreshold(
+ safeInt(view.getConsensusSecondaryStructureThreshold()));
viewport.setShowJVSuffix(safeBoolean(view.isShowFullId()));
viewport.setRightAlignIds(safeBoolean(view.isRightAlignIds()));
viewport.setFont(
viewport.getResidueShading()
.setConservationInc(safeInt(view.getConsThreshold()));
}
+ if (safeBoolean(view.isByConsensusSecondaryStructureSelected()) && cs != null)
+ {
+ viewport.getResidueShading()
+ .setConsensusSecondaryStructureThreshold(
+ safeInt(view.getConsensusSecondaryStructureThreshold()));
+ }
af.changeColour(cs);
viewport.setColourAppliesToAllGroups(true);
viewport.setShowDBRefs(safeBoolean(view.isShowDbRefTooltip()));
viewport.setShowNPFeats(safeBoolean(view.isShowNPfeatureTooltip()));
viewport.setShowGroupConsensus(view.isShowGroupConsensus());
+ viewport.setShowGroupSSConsensus(view.isShowGroupSSConsensus());
viewport.setShowGroupConservation(view.isShowGroupConservation());
viewport.setShowComplementFeatures(view.isShowComplementFeatures());
viewport.setShowComplementFeaturesOnTop(
// TODO: generalise this to have render styles for consensus/profile
// data
if (row.groupRef != null &&
- (row == row.groupRef.getConsensus() || row.groupRef.getSSConsensus(null).contains(row)))
+ (row == row.groupRef.getConsensus() ||
+ (row.groupRef.getSSConsensus(null) !=null && row.groupRef.getSSConsensus(null).contains(row))))
{
renderHistogram = row.groupRef.isShowConsensusHistogram();
renderProfile = row.groupRef.isShowSequenceLogo();
normaliseProfile = row.groupRef.isNormaliseSequenceLogo();
}
- else if (row == consensusAnnot || row == structConsensusAnnot
- || row == complementConsensusAnnot || (ssConsensusAnnot!=null && ssConsensusAnnot.contains(row)))
+ else if (row == consensusAnnot
+ || row == structConsensusAnnot
+ || row == complementConsensusAnnot
+ || (ssConsensusAnnot!=null && ssConsensusAnnot.contains(row)))
{
renderHistogram = av_renderHistogram;
renderProfile = av_renderProfile;
public int getIncrement()
{
return viewStyle.getIncrement();
+ }
+
+ /**
+ * @param inc
+ * @see jalview.api.ViewStyleI#setConsensusSecondaryStructureThreshold(int)
+ */
+ @Override
+ public void setConsensusSecondaryStructureThreshold(int val)
+ {
+ viewStyle.setConsensusSecondaryStructureThreshold(val);
}
+
+ /**
+ * @return
+ * @see jalview.api.ViewStyleI#getConsensusSecondaryStructureThreshold()
+ */
+ @Override
+ public int getConsensusSecondaryStructureThreshold()
+ {
+ return viewStyle.getConsensusSecondaryStructureThreshold();
+ }
+
/**
* @param b
private boolean displayReferenceSeq = false;
private int increment;
+
+ private int consensusSecondaryStructureThreshold;
/**
* display gap characters
setColourByReferenceSeq(vs.isColourByReferenceSeq());
setColourText(vs.getColourText());
setByConsensusSecondaryStructureSelected(vs.getByConsensusSecondaryStructureSelected());
+ setConsensusSecondaryStructureThreshold(vs.getConsensusSecondaryStructureThreshold());
setConservationColourSelected(vs.isConservationColourSelected());
setConservationSelected(vs.getConservationSelected());
setDisplayReferenceSeq(vs.isDisplayReferenceSeq());
&& getFontStyle() == vs.getFontStyle()
&& getIdWidth() == vs.getIdWidth()
&& getIncrement() == vs.getIncrement()
+ && getConsensusSecondaryStructureThreshold() == vs.getConsensusSecondaryStructureThreshold()
&& isRenderGaps() == vs.isRenderGaps()
&& isRightAlignIds() == vs.isRightAlignIds()
&& getScaleAboveWrapped() == vs.getScaleAboveWrapped()
{
return threshold;
}
+
+ @Override
+ public int getConsensusSecondaryStructureThreshold()
+ {
+ return consensusSecondaryStructureThreshold;
+ }
+
/**
* @return the thresholdTextColour
{
increment = inc;
}
+
+ /**
+ *
+ * @param val
+ * set the scalar for bleaching colourschemes according to degree of
+ * secondary structure conservation
+ */
+ @Override
+ public void setConsensusSecondaryStructureThreshold(int val)
+ {
+ consensusSecondaryStructureThreshold = val;
+ }
+
/**
* DOCUMENT ME!
protected Boolean colourByLabel;
@XmlAttribute(name = "autoScale")
- protected Boolean autoScale;
+ protected Boolean autoScale;
/**
* Gets the value of the attributeName property.
protected Integer consThreshold;
@XmlAttribute(name = "pidThreshold")
- protected Integer pidThreshold;
+ protected Integer pidThreshold;
+
+ @XmlAttribute(name = "consensusSecondaryStructureThreshold")
+ protected Integer consensusSecondaryStructureThreshold;
+
+ @XmlAttribute(name = "consensusSecondaryStructureColouring")
+ private boolean consensusSecondaryStructureColouring;
@XmlAttribute(name = "outlineColour")
protected Integer outlineColour;
protected Boolean normaliseSequenceLogo;
@XmlAttribute(name = "id")
- protected String id;
+ protected String id;
+
+ @XmlAttribute(name = "secondaryStructureSources")
+ protected List<String> secondaryStructureSources;
+
/**
* Gets the value of the seq property.
{
this.pidThreshold = value;
}
+
+ /**
+ * Gets the value of the consensusSecondaryStructureThreshold property.
+ *
+ * @return possible object is {@link Integer }
+ *
+ */
+ public Integer getConsensusSecondaryStructureThreshold()
+ {
+ return consensusSecondaryStructureThreshold;
+ }
+
+ /**
+ * Sets the value of the consensusSecondaryStructureThreshold property.
+ *
+ * @param value
+ * allowed object is {@link Integer }
+ *
+ */
+ public void setConsensusSecondaryStructureThreshold(Integer value)
+ {
+ this.consensusSecondaryStructureThreshold = value;
+ }
+
+ /**
+ * Sets the value of the consensusSecondaryStructureColouring property.
+ *
+ * @param value
+ * allowed object is {@link boolean }
+ *
+ */
+ public void setConsensusSecondaryStructureColouring(boolean value)
+ {
+ this.consensusSecondaryStructureColouring = value;
+ }
+
+
+ /**
+ * Sets the value of the consensusSecondaryStructureColouring property.
+ *
+ * @param value
+ * allowed object is {@link boolean }
+ *
+ */
+ public boolean isConsensusSecondaryStructureColouring()
+ {
+ return consensusSecondaryStructureColouring;
+ }
/**
* Gets the value of the outlineColour property.
{
this.id = value;
}
+
+
+ public List<String> getSecondaryStructureSources()
+ {
+ return secondaryStructureSources;
+ }
+
+ public void setSecondaryStructureSources(
+ List<String> secondaryStructureSources)
+ {
+ this.secondaryStructureSources = secondaryStructureSources;
+ }
}
@XmlAttribute(name = "pidSelected")
protected Boolean pidSelected;
+
+ @XmlAttribute(name = "byConsensusSecondaryStructureSelected")
+ protected Boolean byConsensusSecondaryStructureSelected;
@XmlAttribute(name = "bgColour")
protected String bgColour;
@XmlAttribute(name = "pidThreshold")
protected Integer pidThreshold;
+ @XmlAttribute(name = "consensusSecondaryStructureThreshold")
+ protected Integer consensusSecondaryStructureThreshold;
+
@XmlAttribute(name = "title")
protected String title;
@XmlAttribute(name = "showGroupConsensus")
protected Boolean showGroupConsensus;
+
+ @XmlAttribute(name = "showGroupSSConsensus")
+ protected Boolean showGroupSSConsensus;
@XmlAttribute(name = "showConsensusHistogram")
protected Boolean showConsensusHistogram;
{
this.pidSelected = value;
}
+
+ /**
+ * Gets the value of the byConsensusSecondaryStructureSelected property.
+ *
+ * @return possible object is {@link Boolean }
+ *
+ */
+ public Boolean isByConsensusSecondaryStructureSelected()
+ {
+ return byConsensusSecondaryStructureSelected;
+ }
+
+ /**
+ * Sets the value of the byConsensusSecondaryStructureSelected property.
+ *
+ * @param value
+ * allowed object is {@link Boolean }
+ *
+ */
+ public void setByConsensusSecondaryStructureSelected(Boolean value)
+ {
+ this.byConsensusSecondaryStructureSelected = value;
+ }
/**
* Gets the value of the bgColour property.
{
this.pidThreshold = value;
}
+
+ /**
+ * Gets the value of the consensusSecondaryStructureThreshold property.
+ *
+ * @return possible object is {@link Integer }
+ *
+ */
+ public Integer getConsensusSecondaryStructureThreshold()
+ {
+ return consensusSecondaryStructureThreshold;
+ }
/**
+ * Sets the value of the consensusSecondaryStructureThreshold property.
+ *
+ * @param value
+ * allowed object is {@link Integer }
+ *
+ */
+ public void setConsensusSecondaryStructureThreshold(Integer value)
+ {
+ this.consensusSecondaryStructureThreshold = value;
+ }
+
+
+ /**
* Gets the value of the title property.
*
* @return possible object is {@link String }
{
this.showGroupConsensus = value;
}
+
+ /**
+ * Gets the value of the showGroupSSConsensus property.
+ *
+ * @return possible object is {@link Boolean }
+ *
+ */
+ public boolean isShowGroupSSConsensus()
+ {
+ if (showGroupSSConsensus == null)
+ {
+ return false;
+ }
+ else
+ {
+ return showGroupSSConsensus;
+ }
+ }
+
+ /**
+ * Sets the value of the showGroupSSConsensus property.
+ *
+ * @param value
+ * allowed object is {@link Boolean }
+ *
+ */
+ public void setShowGroupSSConsensus(Boolean value)
+ {
+ this.showGroupSSConsensus = value;
+ }
/**
* Gets the value of the showConsensusHistogram property.