144522754f3e836dd0303944ada14c38ee9f28e3
rhead
  Mon Mar 12 14:38:54 2012 -0700
Added a new special case for rn4 (it now uses RGD Genes instead of a UCSC Genes build) and got rid of the checking the gdbPdb table to determine whether an assembly is a UCSC Genes assembly.  Added a comment to the usage that the script should be checked to see if it is using up-to-date tables.
diff --git src/utils/qa/makeUniProtFile.csh src/utils/qa/makeUniProtFile.csh
index 4ab2b80..ceb399b 100755
--- src/utils/qa/makeUniProtFile.csh
+++ src/utils/qa/makeUniProtFile.csh
@@ -10,60 +10,62 @@
 # Gene details pages.
 #
 ########################################
 
 onintr cleanup
 
 set db=''
 set org=''
 set hasKGs=''
 set num=''
 
 if ($#argv != 1 ) then
  echo
  echo "  Use this script to create a mapping of UniProt IDs to Gene IDs. \
   UniProt will pick it up from our download server and use it to \
-  create links from their web site to our gene details pages."
+  create links from their web site to our gene details pages. For the \
+  gene sets from outside sources, check this script first to be sure it is \
+  using the most up-to-date tables."
  echo
  echo "    usage: db"
  echo
  exit 1
 else
  set db=$argv[1]
 endif
 
 # run only from hgwdev
 if ( "$HOST" != "hgwdev" ) then
  echo "\nERROR: you must run this script on hgwdev!\n"
  exit 1
 endif
 
-
-# check to see if this assembly has UCSC Genes
-set hasKGs=`hgsql -Ne "SELECT genomeDb FROM gdbPdb" \
- hgcentraltest | grep "$db"`
-
-# based on whether or not this assembly has UCSC Genes, make the mapping file
-if ( '' != $hasKGs ) then
+# human and mouse use an official UCSC Genes build
+if ( $db =~ "hg*" || $db =~ "mm*" ) then
  # get the data from the two KG-related tables
  hgsql -Ne "SELECT displayId, kgId FROM kgProtAlias" \
   $db > $db.rawDataForUniProt
  hgsql -Ne "SELECT spId, kgId FROM kgSpAlias WHERE spId != ''" \
   $db >> $db.rawDataForUniProt
 
 else #non-UCSC Gene assembly
  # each of the non-KG assemblies are treated a little differently
+
+ if ( $db =~ "rn*" ) then
+  hgsql -Ne "hgsql -Ne "SELECT value, name FROM rgdGene2ToUniProt" $db > $db.rawDataForUniProt
+ endif
+
  if ( $db =~ "dm*" ) then
   hgsql -Ne "SELECT alias, a.name FROM flyBase2004Xref AS a, \
    flyBaseToUniProt AS b WHERE a.name=b.name AND alias != 'n/a'" \
    $db > $db.rawDataForUniProt 
  endif
 
  if ( $db =~ "ce*" ) then
   hgsql -Ne "SELECT acc, name FROM sangerGene AS a, uniProt.gene AS b \
    WHERE a.proteinID=b.val and acc != 'n/a'" $db > $db.rawDataForUniProt
  endif
  
  if ( $db =~ "danRer*" ) then
   echo " \nERROR: Although a file could be generated for danRer, uniProt has"
   echo " decided that they do not want to do that mapping...yet\n" 
   exit 1
