src/utils/qa/doGenbankTests 1.8
1.8 2009/05/14 01:03:15 rhead
Added special logic for getting the shortLabels for est and mrna tracks (which are special cases in trackDb). Changed some whitespace stuff.
Index: src/utils/qa/doGenbankTests
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/doGenbankTests,v
retrieving revision 1.7
retrieving revision 1.8
diff -b -B -U 4 -r1.7 -r1.8
--- src/utils/qa/doGenbankTests 22 Apr 2009 03:30:47 -0000 1.7
+++ src/utils/qa/doGenbankTests 14 May 2009 01:03:15 -0000 1.8
@@ -8,10 +8,9 @@
# Note: this script assumes the kent source tree is checked out in ~/kent/src
#
###############################################################################
-tableExists()
-{
+tableExists() {
local db=$1 table=$2
local res=$(hgsql -Ne "show tables like '$table'" $db)
if [ -z "$res" ]
then
@@ -20,10 +19,9 @@
return 0
fi
}
-databaseExists()
-{
+databaseExists() {
local db=$1
local res=$(hgsql -Ne "show databases like '$db'")
if [ -z "$res" ]
then
@@ -32,14 +30,26 @@
return 0
fi
}
-getShortLabel()
-{
+selectShortLabel() {
local db=$1 table=$2
hgsql -NBe "select shortLabel from trackDb where tableName='$table'" $db
}
+getShortLabel() {
+ local db=$1 table=$2
+ local res=$(selectShortLabel $db $table)
+ if [ -z "$res" -a "$table" = "all_mrna" ]
+ then
+ res=$(selectShortLabel $db mrna)
+ elif [ -z "$res" -a "$table" = "all_est" ]
+ then
+ res=$(selectShortLabel $db est)
+ fi
+ echo $res
+}
+
allOk=yes
# check host, set path to genbank table list
if [ "$HOST" != hgwdev -a "$HOST" != hgwbeta ]
@@ -83,9 +93,9 @@
echo -e "The following GenBank tracks are present in this assembly:\n"
for table in refGene xenoRefGene mgcFullMrna orfeomeMrna \
all_mrna intronEst all_est xenoMrna xenoEst
do
- tableExists $db && getShortLabel $db $table
+ tableExists $db $table && getShortLabel $db $table
done
echo
# run genePredChecks and pslChecks
@@ -134,13 +144,13 @@
echo
# run gbSanity
filename=${db}.sanity.$(date +%m.%d.%Y-%R%p)
-echo -e "--> Running gbSanity, and putting output in:\n"
+echo -e "--> Running gbSanity, and putting output in:"
echo -e "${HOST}:$sanityPath/misc/$filename"
# need to run in a subshell, since gbSanity wants to be run from this dir
(cd $sanityPath && bin/x86_64/gbSanity $db >& misc/$filename) || allOk=no
-echo -e "\nHere is the last line of that file:\n"
+echo -e "Here is the last line of that file:\n"
tail -1 $sanityPath/misc/$filename
echo -e "\nIf there are any errors here, consult Mark Diekhans.\n"
# run featureBits