ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/owl/trunk/scripts/updateUniprot.sh
(Generate patch)
# Line 21 | Line 21
21  
22  
23   COMPLETEKBDIR="databases/uniprot/current_release/knowledgebase/complete"
24 + UNIREFDIR="databases/uniprot/uniref/uniref100"
25  
26   SIFTSPDB2UNIPROTFTP="ftp://ftp.ebi.ac.uk/pub/databases/msd/sifts/text/pdb_chain_uniprot.lst"
27  
# Line 29 | Line 30
30   SPROTGZ="${SPROT}.gz"
31   TREMBL="uniprot_trembl.fasta"
32   TREMBLGZ="${TREMBL}.gz"
33 + UNIREF100="uniref100.fasta"
34 + UNIREF100GZ="uniref100.fasta.gz"
35   ALL="uniprot_all.fasta"
36   RELDATEFILE="reldate.txt"
37   SIFTSPDB2UNIPROT="pdb_chain_uniprot.lst"
38  
39   sproturl="$SITE/$COMPLETEKBDIR/$SPROTGZ"
40   tremblurl="$SITE/$COMPLETEKBDIR/$TREMBLGZ"
41 + uref100url="$SITE/$UNIREFDIR/$UNIREF100GZ"
42   reldateurl="$SITE/$COMPLETEKBDIR/$RELDATEFILE"
43  
44   # remove existing download directory if there was one
# Line 75 | Line 79
79          exit 1  
80   fi
81  
82 + curl -z $CURRENT/$UNIREF100 $uref100url > $DOWNLOAD/${UNIREF100}.gz
83 + if [ -s "$DOWNLOAD/${UNIREF100}.gz" ]
84 + then
85 +    echo "New Uniref100 version downloaded"
86 + else
87 +    echo "Remote Uniref100 file not newer than local one. Something wrong. Exiting"
88 +    exit 1
89 + fi
90  
91   # getting the SIFTS PDB to UNIPROT mapping file
92   curl $SIFTSPDB2UNIPROTFTP > $DOWNLOAD/$SIFTSPDB2UNIPROT
# Line 83 | Line 95
95   # uncompressing
96   gzip -df $DOWNLOAD/${SPROT}.gz
97   gzip -df $DOWNLOAD/${TREMBL}.gz
98 + gzip -df $DOWNLOAD/${UNIREF100}.gz
99   # creating the "all" file
100   cat $DOWNLOAD/$TREMBL $DOWNLOAD/$SPROT > $DOWNLOAD/$ALL
101          
# Line 99 | Line 112
112   logfile="$DOWNLOAD/formatdb.log"
113  
114   cd $DOWNLOAD
115 < $FORMATDB -p T -o T -l $logfile -i $SPROT
116 < $FORMATDB -p T -o T -l $logfile -i $TREMBL
115 > #$FORMATDB -p T -o T -l $logfile -i $SPROT
116 > #$FORMATDB -p T -o T -l $logfile -i $TREMBL
117   $FORMATDB -p T -o T -l $logfile -i $ALL
118 + $FORMATDB -p T -o T -l $logfile -i $UNIREF100
119  
120   #renaming DOWNLOAD dir to uniprot version and updating current symlink
121   echo "Creating new symlink..."

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines