src/utils/qa/makeUniProtFile.csh 1.4
1.4 2009/05/19 18:53:29 ann
UniProt has decided that they want to connect using 'org' names rather than 'db' names. I have cautioned them. This fixes the script to produce only 'org' names.
Index: src/utils/qa/makeUniProtFile.csh
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/utils/qa/makeUniProtFile.csh,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/utils/qa/makeUniProtFile.csh 18 May 2009 18:43:08 -0000 1.3
+++ src/utils/qa/makeUniProtFile.csh 19 May 2009 18:53:29 -0000 1.4
@@ -48,16 +48,8 @@
$db > $db.rawDataForUniProt
hgsql -Ne "SELECT spId, kgId FROM kgSpAlias WHERE spId != ''" \
$db >> $db.rawDataForUniProt
- # find out the name of the organism for this database
- set org=`hgsql -Ne 'SELECT organism FROM dbDb where name = "'$db'" LIMIT 1' \
- hgcentraltest | perl -wpe '$_ = lcfirst($_)'`
-
- # now add the organism name to every row
- cat $db.rawDataForUniProt | sed -e 's/$/ '"$org"'/g' \
- > $db.rawDataForUniProt.plus
-
else #non-UCSC Gene assembly
# strip off the trailing digit(s)
set d=`echo $db | sed -e 's/[1-9]*$//'`
# each of the non-KG assemblies are treated a little differently
@@ -82,14 +74,19 @@
echo " \nERROR: Although a file could be generated for sacCer, uniProt has"
echo " decided that they do not want to do that mapping...yet\n"
exit 1
endif
+endif
+
+if ( -e $db.rawDataForUniProt ) then
+ # find out the name of the organism for this database
+ set org=`hgsql -Ne 'SELECT organism FROM dbDb where name = "'$db'" LIMIT 1' \
+ hgcentraltest | perl -wpe '$_ = lcfirst($_)'`
- if ( -e $db.rawDataForUniProt ) then
- # now add the db name to every row (same for each of the orgs in the 'else')
- cat $db.rawDataForUniProt \
- | sed -e 's/$/ '"$db"'/g' > $db.rawDataForUniProt.plus
- else
+ # now add the organism name to every row
+ cat $db.rawDataForUniProt | sed -e 's/$/ '"$org"'/g' \
+ > $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