JAL-1632 similarity options on TreeChooser panel affect tree by PID
[jalview.git] / src / jalview / analysis / scoremodels / SimilarityParams.java
index 8b6b7d0..b6f2ba2 100644 (file)
@@ -4,18 +4,45 @@ import jalview.api.analysis.SimilarityParamsI;
 
 public class SimilarityParams implements SimilarityParamsI
 {
+  /**
+   * Based on Jalview's Comparison.PID method, which includes gaps and counts
+   * them as matching; it counts over the length of the shorter sequence
+   */
   public static final SimilarityParamsI Jalview = new SimilarityParams(
           true, true, true, true);
 
+  /**
+   * 'SeqSpace' mode PCA calculation includes gaps but does not count them as
+   * matching; it uses the longest sequence length
+   */
+  public static final SimilarityParamsI SeqSpace = new SimilarityParams(
+          true, false, true, true);
+
+  /**
+   * as described in the Raghava-Barton paper; considers pairwise similarity
+   * only (excludes gap-gap) and does not match gaps
+   */
   public static final SimilarityParamsI PID1 = new SimilarityParams(false,
           false, true, false);
 
+  /**
+   * as described in the Raghava-Barton paper; considers pairwise similarity
+   * only (excludes gap-gap) and does not match gaps
+   */
   public static final SimilarityParamsI PID2 = new SimilarityParams(false,
           false, false, false);
 
+  /**
+   * as described in the Raghava-Barton paper; considers pairwise similarity
+   * only (excludes gap-gap) and does not match gaps
+   */
   public static final SimilarityParamsI PID3 = new SimilarityParams(false,
           false, false, true);
 
+  /**
+   * as described in the Raghava-Barton paper; considers pairwise similarity
+   * only (excludes gap-gap) and does not match gaps
+   */
   public static final SimilarityParamsI PID4 = new SimilarityParams(false,
           false, true, true);
 
@@ -38,7 +65,7 @@ public class SimilarityParams implements SimilarityParamsI
    *          if true, the denominator is the shorter sequence length (possibly
    *          including gaps)
    */
-  SimilarityParams(boolean includeGapGap, boolean matchGap,
+  public SimilarityParams(boolean includeGapGap, boolean matchGap,
           boolean includeGaps, boolean shortestLength)
   {
     includeGappedColumns = includeGapGap;