7f423918b60e4bb692ba1f4c476caf51c8253193
hiram
  Fri Jan 9 10:06:30 2015 -0800
can not use commands that fail in a csh -fe script since any command that fails stops the script immediately refs #11174
diff --git src/utils/qa/makeCytoBandIdeo.csh src/utils/qa/makeCytoBandIdeo.csh
index af45525..7c800b7 100755
--- src/utils/qa/makeCytoBandIdeo.csh
+++ src/utils/qa/makeCytoBandIdeo.csh
@@ -33,32 +33,31 @@
 if ( `hgsql -N -e "SHOW TABLES LIKE 'cytoBandIdeo'" $db` == "cytoBandIdeo" ) then
   set ideoCount=`hgsql -N -e "SELECT COUNT(*) FROM cytoBandIdeo" $db` 
   echo
   echo "$db cytoBandIdeo table has $ideoCount rows"
   echo 'run program with "overwrite" argument to continue'
   $0
   exit
 endif 
 
 # get chroms and sizes
 hgsql -N -e 'SELECT chrom, size FROM chromInfo' $db > $db.chroms
 # find all chromnames with centromeres and the cen coords
 hgsql -N -e 'SELECT chrom, chromStart, chromEnd FROM gap WHERE type = "centromere"' $db \
   | sort > $db.cens
 
-file $db.cens | grep empty > /dev/null
-if ( $status ) then # process cens
+if ( -s $db.cens ) then # process cens
   # get the names only
   cat $db.cens | awk '{print $1}' > $db.cenNames
 
   # process cens into pieces
   rm -f $db.splitChroms
   foreach cenchrom (`cat $db.cenNames`)
     set   pEnd=`cat $db.cens   | grep -w $cenchrom | awk '{print $2}'`
     set qStart=`cat $db.cens   | grep -w $cenchrom | awk '{print $3}'`
     set   qEnd=`cat $db.chroms | grep -w $cenchrom | awk '{print $2}'`
     # make pArm
     if ( $pEnd != 0 ) then # no pArm if acrocentric
       echo $cenchrom 0 $pEnd p gneg | awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5}' \
         >> $db.splitChroms
     endif
     # make qArm