savePCA(panel, object);
}
}
- if (frame instanceof PaSiMapPanel)
- {
- PaSiMapPanel panel = (PaSiMapPanel) frame;
- if (panel.getAlignViewport().getAlignment() == jal)
- {
- savePaSiMap(panel, object);
- }
- }
+ if (frame instanceof PaSiMapPanel)
+ {
+ PaSiMapPanel panel = (PaSiMapPanel) frame;
+ if (panel.getAlignViewport().getAlignment() == jal)
+ {
+ savePaSiMap(panel, object);
+ }
+ }
}
}
*/
protected void savePaSiMap(PaSiMapPanel panel, JalviewModel object)
{
+ // TODO: this should be merged with above savePCAPanel - otherwise it is essentially redundant code
try
{
PcaViewer viewer = new PcaViewer();
viewer.setShowLabels(panel.getRotatableCanvas().isShowLabels());
viewer.setLinkToAllViews(
panel.getRotatableCanvas().isApplyToAllViews());
- /*
+ /* NOT FOR PASIMAP CALCULATIONS
+ *
SimilarityParamsI sp = pasimapModel.getSimilarityParameters();
viewer.setIncludeGaps(sp.includeGaps());
viewer.setMatchGaps(sp.matchGaps());
List<PcaViewer> pcaviewers = model.getPcaViewer();
for (PcaViewer viewer : pcaviewers)
{
+ if (isPasimap(viewer))
+ {
+ continue;
+ }
String modelName = viewer.getScoreModelName();
SimilarityParamsI params = new SimilarityParams(
viewer.isIncludeGappedColumns(), viewer.isMatchGaps(),
}
}
+ private boolean isPasimap(PcaViewer viewer)
+ {
+ return viewer.getTitle().toLowerCase(Locale.ROOT)
+ .startsWith("pasimap");
+ }
/**
* Loads any saved PaSiMAp viewers using the function from PCA
*
List<PcaViewer> pcaviewers = model.getPcaViewer();
for (PcaViewer viewer : pcaviewers)
{
+ if (!isPasimap(viewer))
+ {
+ continue;
+ }
String modelName = viewer.getScoreModelName();
/*
SimilarityParamsI params = new SimilarityParams(