src/utils/qa/net.csh 1.19
1.19 2009/05/21 01:28:08 rhead
Changed getChromlist.csh so that it does not create a file, just prints results. Changed all of the scripts that call it to redirect output to a unique file name, and then remove only that file at the end. Added onintr command that allow for cleanup of files created if scripts are ended prematurely.
Index: src/utils/qa/net.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/net.csh,v
retrieving revision 1.18
retrieving revision 1.19
diff -b -B -U 4 -r1.18 -r1.19
--- src/utils/qa/net.csh 11 Apr 2009 00:37:04 -0000 1.18
+++ src/utils/qa/net.csh 21 May 2009 01:28:08 -0000 1.19
@@ -9,8 +9,9 @@
# Written by Bob Kuhn - augmented by Ann Zweig
#
###############################################
+onintr cleanup
set db=""
set trackname=""
set currDir=$cwd
@@ -91,9 +92,9 @@
# -------------------------------------------------
# get chroms from chromInfo:
-getChromlist.csh $db > /dev/null
+getChromlist.csh $db > $db.chromlist$$
# -------------------------------------------------
# check for each chrom having data:
@@ -104,9 +105,9 @@
echo 'if this list is long (as in scaffold assemblies), grep for "Look" \
to get past the list'
set var=""
-foreach chrom (`cat $db.chromlist`)
+foreach chrom (`cat $db.chromlist$$`)
set var=` hgsql -N -e 'SELECT COUNT(*) from 'net$Org' \
WHERE tName = "'$chrom'"' $db`
if ($var == 0) then
echo "$chrom is empty"
@@ -509,4 +510,6 @@
getTableSize.csh $db pushlist2 hgwdev
rm -f pushlist2
echo "the end."
+cleanup:
+rm -f $db.chromlist$$