{
List<int[]> skip = new ArrayList<>();
int[] skipint = null;
+
int npos = 0;
int vc = 0;
skip.add(skipint);
skipint = null;
}
- if (aa.equals("STOP"))
+ if (aa.equals(ResidueProperties.STOP))
{
aa = STOP_ASTERIX;
}
}
/**
+ * Answers the reverse complement of the input string
+ *
+ * @see #getComplement(char)
+ * @param s
+ * @return
+ */
+ public static String reverseComplement(String s)
+ {
+ StringBuilder sb = new StringBuilder(s.length());
+ for (int i = s.length() - 1; i >= 0; i--)
+ {
+ sb.append(Dna.getComplement(s.charAt(i)));
+ }
+ return sb.toString();
+ }
+
+ /**
* Returns dna complement (preserving case) for aAcCgGtTuU. Ambiguity codes
* are treated as on http://reverse-complement.com/. Anything else is left
* unchanged.