src/utils/qa/doGenbankTests 1.9

1.9 2009/05/15 02:24:02 rhead
Moved gbSanity test to the end, collected table names into variables for each test, clarified error message.
Index: src/utils/qa/doGenbankTests
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/doGenbankTests,v
retrieving revision 1.8
retrieving revision 1.9
diff -b -B -U 4 -r1.8 -r1.9
--- src/utils/qa/doGenbankTests	14 May 2009 01:03:15 -0000	1.8
+++ src/utils/qa/doGenbankTests	15 May 2009 02:24:02 -0000	1.9
@@ -49,8 +49,16 @@
   echo $res
 }
 
 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 table list
 if [ "$HOST" != hgwdev -a "$HOST" != hgwbeta ]
 then
@@ -90,28 +98,26 @@
 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 refGene xenoRefGene mgcFullMrna orfeomeMrna \
-             all_mrna intronEst all_est xenoMrna xenoEst
+for table in $allTables
 do
   tableExists $db $table && getShortLabel $db $table
 done
 echo
 
 # run genePredChecks and pslChecks
 echo -e "--> Running genePredCheck and pslCheck:\n"
-for table in refGene xenoRefGene mgcGenes orfeomeGenes
+for table in $genePredTables
 do
   tableExists $db $table && {
     cmd="nice genePredCheck -db=$db $table"
     echo $cmd
     $cmd || allOk=no
   }
 done
 echo
-for table in mgcFullMrna orfeomeMrna all_mrna xenoMrna all_est refSeqAli \
-             xenoRefSeqAli xenoEst
+for table in $pslTables
 do
   tableExists $db $table && {
     cmd="nice pslCheck -db=$db $table"
     echo $cmd
@@ -130,8 +136,9 @@
     echo $cmd
     $cmd || allOk=no
     echo
   }
+  return 0
 }
 doJoinerCheck gbCdnaInfo gbCdnas
 doJoinerCheck refGene refSeqId
 doJoinerCheck xenoRefGene xenoRefSeqId
@@ -142,22 +149,11 @@
 doJoinerCheck xenoMrna xenoMrnaAccession
 doJoinerCheck xenoEst xenoEstAccession
 echo
 
-# run gbSanity
-filename=${db}.sanity.$(date +%m.%d.%Y-%R%p)
-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 "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
 echo -e "--> Running featureBits.  Remember to paste this into the pushqueue:\n"
-for table in refGene xenoRefGene mgcGenes mgcFullMrna orfeomeGenes orfeomeMrna \
-             all_mrna intronEst all_est xenoMrna xenoEst
+for table in $featureTables
 do
   tableExists $db $table && {
     cmd="nice featureBits -countGaps $db $table"
     echo $cmd
@@ -169,17 +165,27 @@
   }
 done
 echo
 
+# run gbSanity
+filename=${db}.sanity.$(date +%m.%d.%Y-%R%p)
+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 "The last line of the gbSanity output gives a summary of errors. 
+Here is the last line of the file. If there are errors, consult Mark Diekhans:\n"
+tail -1 $sanityPath/misc/$filename
+
 # run countPerChrom??
 
 # give overall report of errors
 if [ $allOk = yes ]
 then
   echo No errors were encountered during $(basename $0).  Yay!
   date
 else
-  echo At least one ERROR occurred during $(basename $0).
+  echo "There was an ERROR in at least one test, but $(basename $0) ran successfully."
   date
   exit 2
 fi
 exit 0