src/utils/qa/qaEncodeTracks.csh 1.13
1.13 2010/05/27 00:25:18 ann
needed to trap the case of missing entry in trackDb file
Index: src/utils/qa/qaEncodeTracks.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/qaEncodeTracks.csh,v
retrieving revision 1.12
retrieving revision 1.13
diff -b -B -U 4 -r1.12 -r1.13
--- src/utils/qa/qaEncodeTracks.csh 25 Mar 2010 16:36:12 -0000 1.12
+++ src/utils/qa/qaEncodeTracks.csh 27 May 2010 00:25:18 -0000 1.13
@@ -109,15 +109,19 @@
echo "it can't find a shortLabel at all)"
foreach table ( $tables )
set num=`tdbQuery "select shortLabel from $db where track = '$table'" \
| sed -e 's/shortLabel //' | sed -e '/^[ ]*$/d' | awk '{print length}'`
+ if ( '' == $num ) then
+ echo "ERROR: can't find entry in trackDb for $table"
+ else
if ( $maxShortLabel < $num || 0 == $num ) then
if ( 0 == $num ) then
echo "ERROR: can't find a shortLabel for $table"
else
echo "ERROR: $table shortLabel is $num characters"
endif
endif
+ endif
end
# check the length of the longLabel for each track
echo "\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
@@ -126,15 +130,19 @@
echo "it can't find a longLabel at all)"
foreach table ( $tables )
set num=`tdbQuery "select longLabel from $db where track = '$table'" \
| sed -e 's/longLabel //' | sed -e '/^[ ]*$/d' | awk '{print length}'`
+ if ( '' == $num ) then
+ echo "ERROR: can't find entry in trackDb for $table"
+ else
if ( $maxLongLabel < $num || 0 == $num ) then
if ( 0 == $num ) then
echo "ERROR: can't find a longLabel for $table"
else
echo "ERROR: $table longLabel is $num characters"
endif
endif
+ endif
end
# countPerChrom for all tables
echo "\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"