Merge branch 'features/JAL-2393customMatrices' into develop
[jalview.git] / src / jalview / api / analysis / SimilarityParamsI.java
diff --git a/src/jalview/api/analysis/SimilarityParamsI.java b/src/jalview/api/analysis/SimilarityParamsI.java
new file mode 100644 (file)
index 0000000..581449f
--- /dev/null
@@ -0,0 +1,43 @@
+package jalview.api.analysis;
+
+/**
+ * A description of options when computing percentage identity of two aligned
+ * sequences
+ */
+public interface SimilarityParamsI
+{
+  /**
+   * Answers true if gap-gap aligned positions should be included in the
+   * calculation
+   * 
+   * @return
+   */
+  boolean includeGappedColumns();
+
+  /**
+   * Answers true if gap-residue alignment is considered a match
+   * 
+   * @return
+   */
+  // TODO is this specific to a PID score only?
+  // score matrix will compute whatever is configured for gap-residue
+  boolean matchGaps();
+
+  /**
+   * Answers true if gaps are included in the calculation. This may affect the
+   * calculated score, the denominator (normalisation factor) of the score, or
+   * both. Gap-gap positions are included if this and includeGappedColumns both
+   * answer true.
+   * 
+   * @return
+   */
+  boolean includeGaps();
+
+  /**
+   * Answers true if only the shortest sequence length is used to divide the
+   * total score, false if the longest sequence length
+   * 
+   * @return
+   */
+  boolean denominateByShortestLength();
+}