2e206d7863e94079e3defe181a0c9a6599ff6600
markd
  Mon Sep 19 23:18:25 2016 -0700
changed assert to errAbort so get useful message on invalid bigPsl

diff --git src/hg/lib/bigPsl.c src/hg/lib/bigPsl.c
index f244a1f..5af5d32 100644
--- src/hg/lib/bigPsl.c
+++ src/hg/lib/bigPsl.c
@@ -281,31 +281,32 @@
 fprintf(f, "%u", el->repMatch);
 fputc(sep,f);
 fprintf(f, "%u", el->nCount);
 fputc(lastSep,f);
 }
 
 /* -------------------------------- End autoSql Generated Code -------------------------------- */
 
 struct psl  *pslFromBigPsl( char *chrom, struct bigBedInterval *bb,  char **seq, char **cds)
 /* build a psl from a bigPsl */
 {
 char *extra = cloneString(bb->rest);
 int numCols = 12 + 12 - 3;
 char *row[numCols];
 int wordCount = chopByChar(extra, '\t', row, numCols);
-assert(wordCount == numCols);
+if (wordCount != numCols)
+    errAbort("pslFromBigPsl: expected %d columns in `rest' field, found %d columns", numCols, wordCount);
 
 struct psl *psl;
 int ii;
 int sizeOne;
 AllocVar(psl);
 
 psl->qName = cloneString(row[0]); 
 psl->strand[0] = *row[2];
 if ((cds != NULL) && row[15] != NULL)
     *cds = cloneString(row[15]);
 
 if ((seq != NULL) && row[14] != NULL)
     *seq = cloneString(row[14]);
 psl->tSize = sqlUnsigned(row[16]);
 psl->match = sqlUnsigned(row[17]);