src/utils/qa/doGenbankTests 1.11

1.11 2009/05/27 03:29:31 rhead
Added special handling for intronEst in split form. Also changed a variable name.
Index: src/utils/qa/doGenbankTests
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/doGenbankTests,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/utils/qa/doGenbankTests	26 May 2009 23:21:13 -0000	1.10
+++ src/utils/qa/doGenbankTests	27 May 2009 03:29:31 -0000	1.11
@@ -51,17 +51,8 @@
 
 # keep track of errors vs. no errors
 allOk=yes
 
-# specify tables that should get each test
-allTables="refGene xenoRefGene mgcFullMrna orfeomeMrna all_mrna intronEst /
-           all_est xenoMrna xenoEst"
-genePredTables="refGene xenoRefGene mgcGenes orfeomeGenes"
-pslTables="mgcFullMrna orfeomeMrna all_mrna xenoMrna all_est refSeqAli /
-           xenoRefSeqAli xenoEst"
-featureTables="refGene xenoRefGene mgcGenes mgcFullMrna orfeomeGenes /
-               orfeomeMrna all_mrna intronEst all_est xenoMrna xenoEst"
-
 # check host, set path to genbank sanity location 
 if [ "$HOST" != hgwdev -a "$HOST" != hgwbeta ]
 then
   echo "This script must be run from hgwdev or hgwbeta." >&2
@@ -91,19 +82,44 @@
     exec > "$2" 2>&1  # neat bash trick to redirect stdout (also redirecting error)
   fi
 fi
 
+# specify tables that should get each test
+# intronEst is a special case; it may exist only in split form
+tableExists $db intronEst 
+intronEstExists=$?
+if [ 1 -eq "$intronEstExists" ] # table is split
+then
+  intronEstTables=$(hgsql -Ne "show tables like '%intronEst'" $db)
+else
+  intronEstTables=intronEst
+fi
+
+trackTables="refGene xenoRefGene mgcFullMrna orfeomeMrna all_mrna intronEst /
+           all_est xenoMrna xenoEst"
+genePredTables="refGene xenoRefGene mgcGenes orfeomeGenes"
+pslTables="mgcFullMrna orfeomeMrna all_mrna xenoMrna all_est refSeqAli /
+           xenoRefSeqAli xenoEst $intronEstTables"
+featureTables="refGene xenoRefGene mgcGenes mgcFullMrna orfeomeGenes /
+               orfeomeMrna all_mrna intronEst all_est xenoMrna xenoEst"
+
+
 # print information about the script at the top of the output
 echo "$(basename $0) output on $db"
 date
 echo
 
 # get a list of all genbank tracks present in this assembly
 echo -e "The following GenBank tracks are present in this assembly:\n"
-for table in $allTables
+for table in $trackTables
 do
   tableExists $db $table && getShortLabel $db $table
 done
+# intronEst is a special case; it may exist only in split form
+if [ 1 -eq "$intronEstExists" ] # table is split
+then
+  getShortLabel $db intronEst
+fi
 echo
 
 # run genePredChecks and pslChecks
 echo -e "--> Running genePredCheck and pslCheck:\n"