b5cc11d8bbaab382885bffc053b12794c23da66c giardine Mon Nov 8 08:58:54 2010 -0800 Changed errAborts to lineFileAborts so includes line number in error messages. Improved pgSnp recognizer so type is not required in track line(#1595). diff --git src/hg/lib/pgSnp.c src/hg/lib/pgSnp.c index 44e0ba0..cfb4220 100644 --- src/hg/lib/pgSnp.c +++ src/hg/lib/pgSnp.c @@ -663,29 +663,29 @@ item->chromStart = lineFileNeedNum(lf, row, 1); item->chromEnd = lineFileNeedNum(lf, row, 2); if (item->chromEnd < 1) lineFileAbort(lf, "chromEnd less than 1 (%d)", item->chromEnd); if (item->chromEnd < item->chromStart) lineFileAbort(lf, "chromStart after chromEnd (%d > %d)", item->chromStart, item->chromEnd); /* use pattern match to check values and counts both */ /* alleles are separated by / and can be ACTG- */ item->name = cloneString(row[3]); /* allele count, positive integer matching # of alleles */ item->alleleCount = lineFileNeedNum(lf, row, 4); char alleles[128]; /* pattern to match alleles */ safef(alleles, sizeof(alleles), "^[ACTG-]+(\\/[ACTG-]+){%d}$", item->alleleCount - 1); if (! matchRegex(row[3], alleles)) - errAbort("invalid alleles %s", row[3]); + lineFileAbort(lf, "invalid alleles %s", row[3]); /* read count, comma separated list of numbers with above # of items */ item->alleleFreq = cloneString(row[5]); char pattern[128]; safef(pattern, sizeof(pattern), "^[0-9]+(,[0-9]+){%d}$", item->alleleCount - 1); if (! matchRegex(row[5], pattern)) - errAbort("invalid allele frequency, %s with count of %d", row[5], item->alleleCount); + lineFileAbort(lf, "invalid allele frequency, %s with count of %d", row[5], item->alleleCount); /* scores, comma separated list of numbers with above # of items */ item->alleleScores = cloneString(row[6]); safef(pattern, sizeof(pattern), "^[0-9.]+(,[0-9.]+){%d}$", item->alleleCount - 1); if (! matchRegex(row[6], pattern)) - errAbort("invalid allele scores, %s with count of %d", row[6], item->alleleCount); + lineFileAbort(lf, "invalid allele scores, %s with count of %d", row[6], item->alleleCount); return item; }