src/hg/encode/validateFiles/validateFiles.c 1.29
1.29 2009/11/10 21:52:08 tdreszer
validateFiles.c
Index: src/hg/encode/validateFiles/validateFiles.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/validateFiles/validateFiles.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -b -B -U 4 -r1.28 -r1.29
--- src/hg/encode/validateFiles/validateFiles.c 30 Sep 2009 21:40:00 -0000 1.28
+++ src/hg/encode/validateFiles/validateFiles.c 10 Nov 2009 21:52:08 -0000 1.29
@@ -86,8 +86,9 @@
" -printOkLines Print lines which pass validation to stdout\n"
" -quick[=N] Just test the first N lines of each file (default 1000)\n"
" -printFailLines Print lines which fail validation to stdout\n"
" -isSort input is sorted by chrom\n"
+//" -acceptDot Accept '.' as 'N' in DNA sequence\n"
" -nMatch N's do not count as a mismatch\n"
" -version Print version\n"
, MAX_ERRORS);
}
@@ -108,8 +109,9 @@
{"mmPerPair", OPTION_BOOLEAN},
{"mmCheckOneInN", OPTION_INT},
{"quick", OPTION_INT},
{"nMatch", OPTION_BOOLEAN},
+// {"acceptDot", OPTION_BOOLEAN},
{"isSort", OPTION_BOOLEAN},
{"version", OPTION_BOOLEAN},
{NULL, 0},
};
@@ -708,11 +710,8 @@
int line = 0;
int errs = 0;
unsigned chromSize;
int size;
-// Dot in place of N for tagaligns from Larry's group. Maybe remove this later.
-int savedot = dnaChars[(int)'.'];
-dnaChars[(int)'.'] = 1;
verbose(2,"[%s %3d] paired=%d file(%s)\n", __func__, __LINE__, paired, file);
while (lineFileNext(lf, &row, &size))
{
unsigned start, end;
@@ -745,9 +744,8 @@
if (++errs >= maxErrors)
errAbort("Aborting .. found %d errors\n", errs);
}
}
-dnaChars[(int)'.'] = savedot;
return errs;
}
// tagAlign
@@ -1086,9 +1084,12 @@
isSort = optionExists("isSort");
mmCheckOneInN = optionInt("mmCheckOneInN", 1);
quick = optionExists("quick") ? optionInt("quick",QUICK_DEFAULT) : 0;
colorSpace = optionExists("colorSpace") || sameString(type, "csfasta");
+
initArrays();
+dnaChars[(int)'.'] = 1;//optionExists("acceptDot"); // I don't think this is worth adding another option. But it could be done.
+
// Get chromInfo from DB or file
if ( (chromDb = optionVal("chromDb", NULL)) != NULL)
{
if (!(ci = createChromInfoList(NULL, chromDb)))