ov.getCanvas().getResidueColour().getRGB());
overview.setHiddenColour(ov.getCanvas().getHiddenColour().getRGB());
view.setOverview(overview);
- }
+ }
if (av.getGlobalColourScheme() instanceof jalview.schemes.UserColourScheme)
{
view.setBgColour(setUserColourScheme(av.getGlobalColourScheme(),
line.setColour(annotation.getThreshold().colour.getRGB());
an.setThresholdLine(line);
}
- if (annotation.graph==AlignmentAnnotation.CONTACT_MAP)
+ if (annotation.graph == AlignmentAnnotation.CONTACT_MAP)
{
- if (annotation.sequenceRef.getContactMaps()!=null)
+ if (annotation.sequenceRef.getContactMaps() != null)
{
- ContactMatrixI cm = annotation.sequenceRef.getContactMatrixFor(annotation);
- if (cm!=null)
+ ContactMatrixI cm = annotation.sequenceRef
+ .getContactMatrixFor(annotation);
+ if (cm != null)
{
MatrixType xmlmat = new MatrixType();
xmlmat.setType(cm.getType());
xmlmat.setRows(BigInteger.valueOf(cm.getWidth()));
xmlmat.setCols(BigInteger.valueOf(cm.getHeight()));
- // consider using an opaque to/from -> allow instance to control its representation ?
+ // consider using an opaque to/from -> allow instance to control
+ // its representation ?
xmlmat.setElements(ContactMatrix.contactToFloatString(cm));
if (cm.hasGroups())
{
- for (BitSet gp: cm.getGroups())
+ for (BitSet gp : cm.getGroups())
{
BigInteger val = new BigInteger(gp.toByteArray());
xmlmat.getGroups().add(val.toString());
{
xmlmat.setCutHeight(cm.getCutHeight());
}
-
+
// set/get properties
an.getContactmatrix().add(xmlmat);
}
jaa.setCalcId(annotation.getCalcId());
if (annotation.getProperty().size() > 0)
{
- for (jalview.xml.binding.jalview.Property prop : annotation.getProperty())
+ for (jalview.xml.binding.jalview.Property prop : annotation
+ .getProperty())
{
jaa.setProperty(prop.getName(), prop.getValue());
}
PAEContactMatrix newpae = new PAEContactMatrix(
jaa.sequenceRef, elements);
- List<BitSet> newgroups=new ArrayList<BitSet>();
- if (xmlmat.getGroups().size()>0)
+ List<BitSet> newgroups = new ArrayList<BitSet>();
+ if (xmlmat.getGroups().size() > 0)
{
- for (String sgroup:xmlmat.getGroups())
+ for (String sgroup : xmlmat.getGroups())
{
- try {
+ try
+ {
BigInteger group = new BigInteger(sgroup);
newgroups.add(BitSet.valueOf(group.toByteArray()));
} catch (NumberFormatException nfe)
{
- Console.error("Problem parsing groups for a contact matrix (\""+sgroup+"\"",nfe);
+ Console.error(
+ "Problem parsing groups for a contact matrix (\""
+ + sgroup + "\"",
+ nfe);
}
}
}
- String nwk=xmlmat.getNewick().size()>0 ? xmlmat.getNewick().get(0):null;
- if (xmlmat.getNewick().size()>1)
+ String nwk = xmlmat.getNewick().size() > 0
+ ? xmlmat.getNewick().get(0)
+ : null;
+ if (xmlmat.getNewick().size() > 1)
{
Console.log.info(
"Ignoring additional clusterings for contact matrix");
}
-
+
String treeMethod = xmlmat.getTreeMethod();
- double thresh = xmlmat.getCutHeight()!=null ? xmlmat.getCutHeight() : 0;
+ double thresh = xmlmat.getCutHeight() != null
+ ? xmlmat.getCutHeight()
+ : 0;
newpae.restoreGroups(newgroups, treeMethod, nwk, thresh);
jaa.sequenceRef.addContactListFor(jaa, newpae);
}
*/
protected void loadOverview(Viewport view, String version, AlignFrame af)
{
- if (!isVersionStringLaterThan("2.11.3",
- version) && view.getOverview()==null)
+ if (!isVersionStringLaterThan("2.11.3", version)
+ && view.getOverview() == null)
{
return;
}
{
if (tree.isColumnWise())
{
- AlignmentAnnotation aa = (AlignmentAnnotation) annotationIds.get(tree
- .getColumnReference());
+ AlignmentAnnotation aa = (AlignmentAnnotation) annotationIds
+ .get(tree.getColumnReference());
if (aa == null)
{
Console.warn(
viewport.setIncrement(safeInt(view.getConsThreshold()));
viewport.setShowJVSuffix(safeBoolean(view.isShowFullId()));
viewport.setRightAlignIds(safeBoolean(view.isRightAlignIds()));
- viewport.setFont(new Font(view.getFontName(),
- safeInt(view.getFontStyle()), safeInt(view.getFontSize())),
- (view.getCharWidth()!=null) ? false : true);
- if (view.getCharWidth()!=null)
+ viewport.setFont(
+ new Font(view.getFontName(), safeInt(view.getFontStyle()),
+ safeInt(view.getFontSize())),
+ (view.getCharWidth() != null) ? false : true);
+ if (view.getCharWidth() != null)
{
viewport.setCharWidth(view.getCharWidth());
viewport.setCharHeight(view.getCharHeight());
+ annotationId);
return null;
}
- // belt-and-braces create a threshold line if the
+ // belt-and-braces create a threshold line if the
// colourscheme needs one but the matchedAnnotation doesn't have one
if (safeInt(viewAnnColour.getAboveThreshold()) != 0
&& matchedAnnotation.getThreshold() == null)