831b00bde923c1a051d40704e8d9d016f5b51783
rhead
  Fri Apr 20 16:46:09 2012 -0700
Added -e so that the script will exit on errors, and changed the cp at the end to cp -f to force a copy of the file for cases where the existing file is not group writeable.
diff --git src/utils/qa/makeUniProtFile.csh src/utils/qa/makeUniProtFile.csh
index d9d53f7..7b7b577 100755
--- src/utils/qa/makeUniProtFile.csh
+++ src/utils/qa/makeUniProtFile.csh
@@ -1,16 +1,16 @@
-#!/bin/tcsh
+#!/bin/tcsh -e
 source `which qaConfig.csh`
 
 ########################################
 # 
 # Ann Zweig 05-2009
 #
 # Use this script to create a file for the folks at UnitProt.
 # They will use the file to create links from their web site back to our
 # Gene details pages.
 #
 ########################################
 
 onintr cleanup
 
 set db=''
@@ -85,31 +85,31 @@
 
  # now add the organism name to every row
  sed -e 's/$/ '$org'/' $db.rawDataForUniProt > $db.rawDataForUniProt.plus
 
 else
   echo " \nERROR: It is not possible to make a mapping file for UniProt from"
   echo " the database you entered: $db\n"
   exit 1
 endif
 
 # make sure there is only one Gene ID - UniProt ID pair
 sort -k1,1 -u $db.rawDataForUniProt.plus > $db.uniProtToUcscGenes.txt
 
 # make the new directory and copy the file there
 mkdir -p /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes
-cp $db.uniProtToUcscGenes.txt /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes/uniProtToUcscGenes.txt
+cp -f $db.uniProtToUcscGenes.txt /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes/uniProtToUcscGenes.txt
 
 # how big is the file
 set num=`wc -l $db.uniProtToUcscGenes.txt | awk '{print $1}'`
 
 # explain the output to the user
 echo "\nSUCCESS!\n"
 echo "Here's a sample of the ${num}-line file you just created"
 echo " (expect: UniProtId ucscGeneId orgName)"
 head $db.uniProtToUcscGenes.txt
 echo " \nAsk for a push of your new file to hgdownload:\n"
 echo " /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes/uniProtToUcscGenes.txt"
 # clean up old files (except the real one)
 cleanup:
 rm -f $db.rawDataForUniProt*
 
