b50a4586bd9b4cf56a85705bd1b00b415803b5ab
kent
  Fri May 11 07:21:49 2012 -0700
Adding support for IUPAC nucleotide ambiguity codes to 'short match' track.  Made iupac.c library module.
diff --git src/inc/iupac.h src/inc/iupac.h
new file mode 100644
index 0000000..2ff3318
--- /dev/null
+++ src/inc/iupac.h
@@ -0,0 +1,42 @@
+/* iupac - routines to help cope with IUPAC ambiguity codes in DNA sequence. */
+
+#ifndef IUPAC_H
+#define IUPAC_H
+
+boolean iupacMatch(char iupac, char dna);
+/* See if iupac ambiguity code matches dna character */
+
+boolean iupacMatchLower(char iupac, char dna);
+/* See if iupac ambiguity code matches dna character where
+ * both are lower case */
+
+boolean isIupac(char c);
+/* See if iupac c is a legal iupac char */
+
+boolean isIupacLower(char c);
+/* See if iupac c is a legal (lower case) iupac char */
+
+void iupacFilter(char *in, char *out);
+/* Filter out non-DNA non-UIPAC ambiguity code characters and change to lower case. */
+
+boolean anyIupac(char *s);
+/* Return TRUE if there are any IUPAC ambiguity codes in s */
+
+char iupacComplementBaseLower(char iupac);
+/* Return IUPAC complement for a single base */
+
+void iupacComplementLower(char *iupac, int iuSize);
+/* Return IUPAC complement many bases. Assumes iupac is lower case. */
+
+void iupacReverseComplement(char *iu, int iuSize);
+/* Reverse complement a string containing DNA and IUPAC codes. Result will be always
+ * lower case. */
+
+boolean iupacMatchStart(char *iupacPrefix, char *dnaString);
+/* Return TRUE if start of DNA is compatible with iupac */
+
+char *iupacIn(char *needle, char *haystack);
+/* Return first place in haystack (DNA) that matches needle that may contain IUPAC codes. */
+
+#endif /* IUPAC_H */
+