0b3af4a3872dc6650a9410229c55437a814bddd1 rhead Fri Apr 20 17:44:59 2012 -0700 On second thought, changed the copy at the end to a move, so that the new file will have the same ownership as the person who ran the script. Changed the final steps to look at the file in the new location, not the current directory. diff --git src/utils/qa/makeUniProtFile.csh src/utils/qa/makeUniProtFile.csh index 7b7b577..88d96c4 100755 --- src/utils/qa/makeUniProtFile.csh +++ src/utils/qa/makeUniProtFile.csh @@ -84,33 +84,35 @@ hgcentraltest | perl -wpe '$_ = lcfirst($_)'` # 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 -f $db.uniProtToUcscGenes.txt /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes/uniProtToUcscGenes.txt +set copyDir = /usr/local/apache/htdocs-hgdownload/goldenPath/$db/UCSCGenes +mkdir -p $copyDir +mv $db.uniProtToUcscGenes.txt $copyDir/uniProtToUcscGenes.txt # how big is the file -set num=`wc -l $db.uniProtToUcscGenes.txt | awk '{print $1}'` +set num=`wc -l $copyDir/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 +head $copyDir/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* exit 0