aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPjotr Prins2020-05-06 17:36:36 -0500
committerGitHub2020-05-06 17:36:36 -0500
commit464ee0ad2d527afa3bb1cf273f37e4188293bb25 (patch)
tree5b609afd3211c25d6917d6d24ce5844e03620f72 /scripts
parent2f7c557eaa2b09952494ee270058f7bd9662d33a (diff)
parenta5647d41c8814d67a6c2f0e5d4c237b330899c97 (diff)
downloadgenenetwork2-464ee0ad2d527afa3bb1cf273f37e4188293bb25.tar.gz
Merge pull request #388 from BonfaceKilz/build/missing_columns_script
Add missing columns to db downloaded from AWS
Diffstat (limited to 'scripts')
-rw-r--r--scripts/add_missing_columns.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/add_missing_columns.sh b/scripts/add_missing_columns.sh
new file mode 100644
index 00000000..70d5fdeb
--- /dev/null
+++ b/scripts/add_missing_columns.sh
@@ -0,0 +1,24 @@
+ #! /bin/bash
+ #
+ # Add missing columns to test db downloaded from:
+ # https://s3.amazonaws.com/genenetwork2/db_webqtl_s.zip
+
+ QUERY="
+ ALTER TABLE InbredSet
+ ADD Family varchar(20) AFTER FullName,
+ ADD FamilyOrder varchar(20) AFTER Family,
+ ADD MenuOrderId smallint(6) AFTER FamilyOrder,
+ ADD InbredSetCode varchar(5) AFTER MenuOrderId;
+
+ ALTER TABLE PublishXRef
+ ADD mean double AFTER DataId;
+
+ -- This takes some time
+ ALTER TABLE ProbeSet
+ ADD UniProtID varchar(20) AFTER ProteinName;
+ "
+
+ USER=gn2
+ DBNAME=db_webqtl_s
+ PASS=mysql_password
+ mysql -u"$USER" -p"$PASS" -h localhost -D "$DBNAME" -e "$QUERY"