aboutsummaryrefslogtreecommitdiff
path: root/scripts/add_missing_columns.sh
diff options
context:
space:
mode:
authorDanny Arends2020-05-07 02:50:23 -0500
committerDanny Arends2020-05-07 02:50:23 -0500
commit44ae636436c0fc577dfb72e0d7f93178a966f572 (patch)
tree661cf5f0f196593c3cce9daf2707f29bee4406ef /scripts/add_missing_columns.sh
parentbcd0110bbf8d3e290023891852c21de3d5b7ebc6 (diff)
parent464ee0ad2d527afa3bb1cf273f37e4188293bb25 (diff)
downloadgenenetwork2-44ae636436c0fc577dfb72e0d7f93178a966f572.tar.gz
Merge branch 'testing' of https://github.com/genenetwork/genenetwork2 into testing
Diffstat (limited to 'scripts/add_missing_columns.sh')
-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"