+
+ /**
+ *
+ * @param transition
+ * type of transition occuring
+ * @return index value representing position along stateTransition array.
+ */
+ public Integer getTransitionType(String transition)
+ {
+ Integer index;
+ switch (transition)
+ {
+ case "mm":
+ index = 0;
+ break;
+ case "mi":
+ index = 1;
+ break;
+ case "md":
+ index = 2;
+ break;
+ case "im":
+ index = 3;
+ break;
+ case "ii":
+ index = 4;
+ break;
+ case "dm":
+ index = 5;
+ break;
+ case "dd":
+ index = 6;
+ break;
+ default:
+ index = null;
+ }
+ return index;
+ }
+
+ /**
+ * find the index of the node in a hidden Markov model based on the column in
+ * the alignment
+ *
+ * @param alignmentColumn
+ */
+
+ public Integer findNodeIndex(int alignmentColumn)
+ {
+ Integer index;
+ index = nodeLookup.get(alignmentColumn);
+ return index;
+ }
+
+ public static String findStringFromBoolean(boolean value)
+ {
+ if (value)
+ {
+ return YES;
+ }
+ else
+ {
+ return NO;
+ }
+ }