src/hg/lib/wigAsciiToBinary.c 1.34
1.34 2010/05/25 19:45:34 kent
Making wigEncode default the span to the stepSize in fixedStep wigs.
Index: src/hg/lib/wigAsciiToBinary.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/wigAsciiToBinary.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -b -B -U 4 -r1.33 -r1.34
--- src/hg/lib/wigAsciiToBinary.c 30 Sep 2009 22:11:03 -0000 1.33
+++ src/hg/lib/wigAsciiToBinary.c 25 May 2010 19:45:34 -0000 1.34
@@ -441,9 +441,9 @@
output_row();
validLines = 0; /* to cause reset for first offset */
}
stepSize = 1; /* default step size */
- dataSpan = 1; /* default bases spanned per data point */
+ dataSpan = 0; /* this will match step size if not set*/
for(i = 1; i < wordCount; ++i)
{
if (startsWith("chrom",words[i]))
{
@@ -462,8 +462,10 @@
else
errAbort("illegal specification on variableStep at line %lu: %s",
lineCount, words[i]);
}
+ if (dataSpan == 0)
+ dataSpan = stepSize;
if (!foundChrom)
errAbort("missing chrom=<name> specification on fixedStep declaration at line %lu", lineCount);
if (!foundStart)
errAbort("missing start=<position> specification on fixedStep declaration at line %lu", lineCount);