src/utils/qa/getChromFieldName.csh 1.2
1.2 2009/04/11 00:37:03 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/getChromFieldName.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/getChromFieldName.csh,v
retrieving revision 1.1
retrieving revision 1.2
diff -b -B -U 1000000 -r1.1 -r1.2
--- src/utils/qa/getChromFieldName.csh 21 Sep 2007 20:40:22 -0000 1.1
+++ src/utils/qa/getChromFieldName.csh 11 Apr 2009 00:37:03 -0000 1.2
@@ -1,39 +1,40 @@
#!/bin/tcsh
+source `which qaConfig.csh`
###############################################
# 09-20-07
#
# Finds the proper column names if "chrom", "tName" or "genoName".'
#
###############################################
set db=""
set table=""
set chr=""
if ( $#argv != 2 ) then
echo
echo ' Finds the proper column names if "chrom", "tName" or "genoName".'
echo
echo " usage: database, table"
echo
exit
else
set db=$argv[1]
set table=$argv[2]
endif
if ( "$HOST" != "hgwdev" ) then
echo "\n error: you must run this script on dev!\n"
exit 1
endif
set chr=`hgsql -N -e "DESC $table" $db | gawk '{print $1}' | egrep -w "chrom|tName|genoName"`
if ($status) then
echo '\n '$db.$table' has no "chrom", "tName" or "genoName" fields.\n'
echo ${0}:
$0
exit 1
endif
echo $chr
exit