File: update_cogs.sh

package info (click to toggle)
cct 20170919+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 333,956 kB
  • sloc: xml: 837,386; perl: 12,630; sh: 1,602; makefile: 17
file content (29 lines) | stat: -rwxr-xr-x 713 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash -e
#This script downloads files needed for COG assignment
wd=`pwd`

function error_exit {
        echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
        exit 1
}

if [ -z $CCT_HOME ]; then
    error_exit "Please set the \$CCT_HOME environment variable to the path to the cgview_comparison_tool directory"
fi

cct_home=$CCT_HOME

#COG files
if [ ! -d "$cct_home"/db/cogs ]; then
    mkdir -p "$cct_home"/db/cogs
fi

echo "Updating COG files"
cd "$cct_home"/db/cogs
wget -c -N -v ftp://ftp.ncbi.nih.gov/pub/COG/COG/myva
wget -c -N -v ftp://ftp.ncbi.nih.gov/pub/COG/COG/whog
echo "Formatting myva for BLAST"
formatdb -p T -i myva -o T -l "$cct_home"/db/cogs/formatdb.log
cd "$wd"

echo "Update complete."