5da4fcae9d1a4302be00521ce479dcf678f6f08c angie Fri Mar 11 15:34:09 2011 -0800 Feature #2820 (tabix), #2821 (VCF parser): added basic test cases for VCF andtabix -- thanks Mark for the prod. diff --git src/lib/tests/tabixFetch.c src/lib/tests/tabixFetch.c index 135f31e..50f3b05 100644 --- src/lib/tests/tabixFetch.c +++ src/lib/tests/tabixFetch.c @@ -35,31 +35,31 @@ static void parsePosition(const char *position, char **retChrom, int *retStart, int *retEnd) /* Do we have a lib routine for this somewhere? Too lazy to look. */ { char *posDupe = cloneString(position); char *words[3]; int wordCount = chopByChar(posDupe, ':', words, ArraySize(words)); if (wordCount != 2) errAbort(BAD_POS_FORMAT, position); *retChrom = posDupe; stripChar(words[1], ','); char *range = cloneString(words[1]); wordCount = chopByChar(range, '-', words, ArraySize(words)); if (wordCount != 2) errAbort(BAD_POS_FORMAT, position); -*retStart = sqlUnsigned(words[0]); +*retStart = sqlUnsigned(words[0]) - 1; *retEnd = sqlUnsigned(words[1]); } void tabixFetch(char *fileOrUrl, char *position) /* tabixFetch - Test lineFileOnTabix and lineFileSetTabixRegion * (compare with cmd line tabix output). */ { udcSetDefaultDir("/data/tmp/angie/udcCache"); knetUdcInstall(); struct lineFile *lf = lineFileOnTabix(fileOrUrl, TRUE); if (lf == NULL) exit(1); int lineSize; char *line = NULL; boolean gotLine = FALSE;