src/hg/makeDb/hgLoadWiggle/wigTableStats.sh 1.4
1.4 2009/11/25 19:55:25 hiram
Allow it to work on multiple tables in a single database
Index: src/hg/makeDb/hgLoadWiggle/wigTableStats.sh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/makeDb/hgLoadWiggle/wigTableStats.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/hg/makeDb/hgLoadWiggle/wigTableStats.sh 25 Nov 2009 19:10:44 -0000 1.3
+++ src/hg/makeDb/hgLoadWiggle/wigTableStats.sh 25 Nov 2009 19:55:25 -0000 1.4
@@ -7,18 +7,21 @@
if [ "x${DB}y" = "xy" -o "x${T}y" = "xy" ]; then
echo "wigTableStats.sh - compute overall statistics for a wiggle table"
echo
- echo "usage: wigTableStats.sh <db> <table>"
- echo "expected table is a wiggle table"
+ echo "usage: wigTableStats.sh <db> <table> [other tables]"
+ echo "expected tables are wiggle tables"
echo "output is a summary of min, max, average, count, sumData, stdDev, viewLimits"
echo "the recommended viewLimits are: mean +- 5*stdDev limited by min,max"
echo "you will want to round those numbers to reasonable nearby values."
exit 255
fi
echo -e "# db.table\tmin max mean count sumData stdDev viewLimits"
+shift # eliminate the database argument
+for T in $*
+do
echo -e -n "${DB}.${T}\t"
hgsql -N ${DB} \
-e "select lowerLimit,dataRange,validCount,sumData,sumSquares from ${T}" \
@@ -62,4 +65,6 @@
printf "empty data set\n"
}
}
'
+
+done