Show
Ignore:
Timestamp:
05/14/10 00:48:42 (2 years ago)
Author:
AlexanderPico
Message:

adapted to work with new 'genmapp_' prefixed databases

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/dbbuilder/src/org/bridgedb/download/ensembl_download.sh

    r251 r349  
    22species_list=${1?"Usage: $0 species_list"} 
    33 
    4 mysql=mysql 
    5 mysqlimport=mysqlimport 
     4mysql='mysql  --host=mysql-dev.cgl.ucsf.edu --port=13308' 
     5mysqlimport='mysqlimport  --host=mysql-dev.cgl.ucsf.edu --port=13308' 
    66 
    77cat $species_list | while read species_name 
     
    3737 
    3838  #create local mysql db 
    39   echo "create database if not exists ${mysql_go_name}" | ${mysql} -u genmapp -pfun4genmapp 
     39  echo "create database if not exists genmapp_${mysql_go_name}" | ${mysql} -u genmapp -pfun4genmapp 
    4040  #create schema 
    41   ${mysql} -u genmapp -pfun4genmapp ${mysql_go_name} < ./${mysql_go_name}.sql 
     41  ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_go_name} < ./${mysql_go_name}.sql 
    4242  #place in own scope due to "cd" command 
    4343  ( 
     
    4747    cp $table_name /tmp/ 
    4848     
    49     ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_go_name} /tmp/${table_name} 
     49    ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_go_name} /tmp/${table_name} 
    5050     
    5151    rm /tmp/${table_name} 
     
    7777  for q in ./${mysql_core_name}/*.txt.gz 
    7878  do 
    79     # skip huge, unused dna tables 
    80     if [[ $q =~ 'dna' ]] 
     79    # skip huge, unused dna and protein tables 
     80    if [[ $q =~ 'dna' || $q =~ 'protein' ]] 
    8181    then 
    82         echo "Skip!: large, unused dna table: $q" 
     82        echo "Skip!: large, unused dna and protein tables: $q" 
    8383        continue 
    8484    fi 
     
    9090 
    9191  #create local mysql db 
    92   echo "create database if not exists ${mysql_core_name}" | ${mysql} -u genmapp -pfun4genmapp 
     92  echo "create database if not exists genmapp_${mysql_core_name}" | ${mysql} -u genmapp -pfun4genmapp 
    9393  #create schema 
    94   ${mysql} -u genmapp -pfun4genmapp ${mysql_core_name} < ./${mysql_core_name}.sql 
     94  ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_core_name} < ./${mysql_core_name}.sql 
    9595  #place in own scope due to "cd" command 
    9696  ( 
     
    100100    cp $table_name /tmp/ 
    101101     
    102     ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_core_name} /tmp/${table_name} 
     102    ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_core_name} /tmp/${table_name} 
    103103 
    104104    rm /tmp/${table_name} 
     
    128128  for q in ./${mysql_efg_name}/*.txt.gz 
    129129  do 
    130     # skip huge, unused dna tables 
     130    # skip huge, unused result table 
    131131    if [[ $q =~ 'result' ]] 
    132132    then 
     
    141141 
    142142  #create local mysql db 
    143   echo "create database if not exists ${mysql_efg_name}" | ${mysql} -u genmapp -pfun4genmapp 
     143  echo "create database if not exists genmapp_${mysql_efg_name}" | ${mysql} -u genmapp -pfun4genmapp 
    144144  #create schema 
    145   ${mysql} -u genmapp -pfun4genmapp ${mysql_efg_name} < ./${mysql_efg_name}.sql 
     145  ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_efg_name} < ./${mysql_efg_name}.sql 
    146146  #place in own scope due to "cd" command 
    147147  ( 
     
    151151    cp $table_name /tmp/ 
    152152 
    153     ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_efg_name} /tmp/${table_name} 
     153    ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_efg_name} /tmp/${table_name} 
    154154 
    155155    rm /tmp/${table_name}