X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FPCA.java;h=b481e89d32371720ecbf9e114cea8276ece749fa;hb=582493a5b56d3e01d901c6da9906685c31a32abb;hp=43f21615c10ba6c990997ef96ed0686a2311485a;hpb=9978c1241ac755844644fcef8a30b3313c01ea47;p=jalview.git diff --git a/src/jalview/analysis/PCA.java b/src/jalview/analysis/PCA.java index 43f2161..b481e89 100755 --- a/src/jalview/analysis/PCA.java +++ b/src/jalview/analysis/PCA.java @@ -223,8 +223,7 @@ public class PCA implements Runnable * Computes a pairwise similarity matrix for the given sequence regions using * the configured score model. If the score model is a similarity model, then * it computes the result directly. If it is a distance model, then use it to - * compute pairwise distances, and convert these to similarity scores by - * substracting from the maximum value. + * compute pairwise distances, and convert these to similarity scores. * * @param av * @return @@ -239,6 +238,10 @@ public class PCA implements Runnable } else if (scoreModel instanceof DistanceScoreModelI) { + /* + * find distances and convert to similarity scores + * reverseRange(false) preserves but reverses the min-max range + */ result = ((DistanceScoreModelI) scoreModel).findDistances(av, similarityParams); result.reverseRange(false);