src/utils/qa/checkOffend.csh 1.10
1.10 2009/04/11 00:37:02 rhead
Sourced new qaConfig file at the top. Changed -h hgwbeta lines to look for sql host stored in a variable, specified in the new qaConfig file.
Index: src/utils/qa/checkOffend.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/checkOffend.csh,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 1000000 -r1.9 -r1.10
--- src/utils/qa/checkOffend.csh 17 Oct 2007 16:39:52 -0000 1.9
+++ src/utils/qa/checkOffend.csh 11 Apr 2009 00:37:02 -0000 1.10
@@ -1,67 +1,68 @@
#!/bin/tcsh
+source `which qaConfig.csh`
###############################################
# 05-10-04
#
# Checks for table values off the end of chrom
#
###############################################
set db=""
set chr=""
set track=""
set end=""
if ($#argv != 2) then
echo
echo " checks for entries beyond the end of the chromsome."
echo ' finds the proper column names if "chrom", "tName" or "genoName".'
echo
echo " usage: database, table"
echo
exit
else
set db=$1
set track=$2
endif
set chr=""
set end=""
set chr=`getChromFieldName.csh $db $track`
if ($status) then
exit 1
endif
set end=`hgsql -N -e "DESC $track" $db | gawk '{print $1}' | egrep -w "chromEnd"`
if ($status) then
set end=`hgsql -N -e "DESC $track" $db | gawk '{print $1}' | egrep -w "tEnd"`
if ($status) then
set end=`hgsql -N -e "DESC $track" $db | gawk '{print $1}' | egrep -w "txEnd"`
if ($status) then
set end=`hgsql -N -e "DESC $track" $db | gawk '{print $1}' | egrep -w "genoEnd"`
if ($status) then
echo '\n '$db.$track' has no "chromEnd", "tEnd", "txEnd" or "genoEnd" fields.\n'
exit 1
endif
endif
endif
endif
echo
echo "Looking for off the end of each chrom"
# Will also use the chromInfo table
hgsql -e "SELECT chromInfo.chrom, chromInfo.size, MAX($track.$end) \
FROM chromInfo, $track \
WHERE chromInfo.chrom = $track.$chr \
GROUP BY chromInfo.chrom" $db > $db.$track.tx.offEnd
head -1 $db.$track.tx.offEnd
awk '{if($2<$3) {print $1, $2, $3} }' $db.$track.tx.offEnd
echo "expect blank. any chrom with annotations off the end would be printed."
echo
rm $db.$track.tx.offEnd