- Timestamp:
- 05/14/10 00:48:42 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbbuilder/src/org/bridgedb/download/ensembl_download.sh
r251 r349 2 2 species_list=${1?"Usage: $0 species_list"} 3 3 4 mysql= mysql5 mysqlimport= mysqlimport4 mysql='mysql --host=mysql-dev.cgl.ucsf.edu --port=13308' 5 mysqlimport='mysqlimport --host=mysql-dev.cgl.ucsf.edu --port=13308' 6 6 7 7 cat $species_list | while read species_name … … 37 37 38 38 #create local mysql db 39 echo "create database if not exists ${mysql_go_name}" | ${mysql} -u genmapp -pfun4genmapp39 echo "create database if not exists genmapp_${mysql_go_name}" | ${mysql} -u genmapp -pfun4genmapp 40 40 #create schema 41 ${mysql} -u genmapp -pfun4genmapp ${mysql_go_name} < ./${mysql_go_name}.sql41 ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_go_name} < ./${mysql_go_name}.sql 42 42 #place in own scope due to "cd" command 43 43 ( … … 47 47 cp $table_name /tmp/ 48 48 49 ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_go_name} /tmp/${table_name}49 ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_go_name} /tmp/${table_name} 50 50 51 51 rm /tmp/${table_name} … … 77 77 for q in ./${mysql_core_name}/*.txt.gz 78 78 do 79 # skip huge, unused dna tables80 if [[ $q =~ 'dna' ]]79 # skip huge, unused dna and protein tables 80 if [[ $q =~ 'dna' || $q =~ 'protein' ]] 81 81 then 82 echo "Skip!: large, unused dna table: $q"82 echo "Skip!: large, unused dna and protein tables: $q" 83 83 continue 84 84 fi … … 90 90 91 91 #create local mysql db 92 echo "create database if not exists ${mysql_core_name}" | ${mysql} -u genmapp -pfun4genmapp92 echo "create database if not exists genmapp_${mysql_core_name}" | ${mysql} -u genmapp -pfun4genmapp 93 93 #create schema 94 ${mysql} -u genmapp -pfun4genmapp ${mysql_core_name} < ./${mysql_core_name}.sql94 ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_core_name} < ./${mysql_core_name}.sql 95 95 #place in own scope due to "cd" command 96 96 ( … … 100 100 cp $table_name /tmp/ 101 101 102 ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_core_name} /tmp/${table_name}102 ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_core_name} /tmp/${table_name} 103 103 104 104 rm /tmp/${table_name} … … 128 128 for q in ./${mysql_efg_name}/*.txt.gz 129 129 do 130 # skip huge, unused dna tables130 # skip huge, unused result table 131 131 if [[ $q =~ 'result' ]] 132 132 then … … 141 141 142 142 #create local mysql db 143 echo "create database if not exists ${mysql_efg_name}" | ${mysql} -u genmapp -pfun4genmapp143 echo "create database if not exists genmapp_${mysql_efg_name}" | ${mysql} -u genmapp -pfun4genmapp 144 144 #create schema 145 ${mysql} -u genmapp -pfun4genmapp ${mysql_efg_name} < ./${mysql_efg_name}.sql145 ${mysql} -u genmapp -pfun4genmapp genmapp_${mysql_efg_name} < ./${mysql_efg_name}.sql 146 146 #place in own scope due to "cd" command 147 147 ( … … 151 151 cp $table_name /tmp/ 152 152 153 ${mysqlimport} -u genmapp -pfun4genmapp ${mysql_efg_name} /tmp/${table_name}153 ${mysqlimport} -u genmapp -pfun4genmapp genmapp_${mysql_efg_name} /tmp/${table_name} 154 154 155 155 rm /tmp/${table_name}
