src/utils/qa/graph.csh 1.4
1.4 2010/01/30 07:08:56 kuhn
added support for datasets where the largest data value is smaller than the width of graph. graph then shrinks to width of largest value
Index: src/utils/qa/graph.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/graph.csh,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/utils/qa/graph.csh 24 Jan 2010 19:42:51 -0000 1.3
+++ src/utils/qa/graph.csh 30 Jan 2010 07:08:56 -0000 1.4
@@ -40,9 +40,13 @@
# clean out blank lines
cat $file | egrep "." > Xfile$$
set max=`cat $file | grep "." | awk '{print $2}' | sort -nr | head -1`
-set binsize=`echo $max $width | awk '{printf("%3.0f", $1/$2)}'`
+if ( $width > $max ) then
+ set binsize=1
+else
+ set binsize=`echo $max $width | awk '{printf("%3.0f", $1/$2)}'`
+endif
# find width of first col for pretty output
foreach item ( `cat Xfile$$ | awk '{print $1}'` )
set len=`echo $item | awk '{print length($1)}'`