src/lib/bwgCreate.c 1.24

1.24 2010/05/25 19:24:16 kent
Making it so wigToBigWig will default span to step size.
Index: src/lib/bwgCreate.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/bwgCreate.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -b -B -U 4 -r1.23 -r1.24
--- src/lib/bwgCreate.c	6 Apr 2010 23:42:10 -0000	1.23
+++ src/lib/bwgCreate.c	25 May 2010 19:24:16 -0000	1.24
@@ -434,9 +434,9 @@
 else
     errAbort("Unknown type %s\n", typeWord);
 
 /* Set up defaults for values we hope to parse out of rest of line. */
-int span = 1;
+int span = 0;
 bits32 step = 0;
 bits32 start = 0;
 char *chrom = NULL;
 
@@ -481,8 +481,10 @@
     if (start == 0)
 	errAbort("Missing start= setting line %d of %s\n", lf->lineIx, lf->fileName);
     if (step == 0)
 	errAbort("Missing step= setting line %d of %s\n", lf->lineIx, lf->fileName);
+    if (span == 0)
+	span = step;
     parseFixedStepSection(lf, clipDontDie, lm, itemsPerSlot, 
     	chrom, chromSize, span, start-1, step, pSectionList);
     }
 else
@@ -490,8 +492,10 @@
     if (start != 0)
 	errAbort("Extra start= setting line %d of %s\n", lf->lineIx, lf->fileName);
     if (step != 0)
 	errAbort("Extra step= setting line %d of %s\n", lf->lineIx, lf->fileName);
+    if (span == 0)
+	span = 1;
     parseVariableStepSection(lf, clipDontDie, lm, itemsPerSlot, 
     	chrom, chromSize, span, pSectionList);
     }
 }