From 99e1151d5603b1bbf52141166d72e6e32203bb62 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Tue, 16 Jul 2013 23:24:57 +0000 Subject: Wrote code that can get a dataset's type for every single GN dataset; previously we could not view traits in datasets that were not in the DBType table in the database --- misc/gn_installation_notes.txt | 148 +++++++++++++++++++++++++++++++---------- 1 file changed, 113 insertions(+), 35 deletions(-) (limited to 'misc') diff --git a/misc/gn_installation_notes.txt b/misc/gn_installation_notes.txt index 2607f2b5..7545a5b8 100644 --- a/misc/gn_installation_notes.txt +++ b/misc/gn_installation_notes.txt @@ -47,15 +47,6 @@ git pull origin flask(or whatever the branch is) Search for package with a specified file that can be installed with apt-get apt-file search _______ -============================================ - -Install pip: -sudo apt-get install python-pip - -Install from requirements.txt: -pip install -r gene/wqflask/requirements.txt -t ve27 - - ============================================ Create trash directory: @@ -70,19 +61,6 @@ dpkg -l | less =========================================== -Using Yolk - -Install Yolk: -pip install yolk - -Check packages installed in this virtual environment: -yolk -l - -Checks packages that have updates available: -yolk -U - -=========================================== - Installing virtualenv: sudo pip install virtualenv @@ -94,20 +72,31 @@ source ~/ve27/bin/activate =========================================== -Installing yaml +Install libmysqlclient-dev (Mysql-Python dependency) +sudo apt-get install libmysqlclient-dev -Install libyaml-dev: -sudo apt-get install libyaml-dev +Install python-dev (numpy dependency) +sudo apt-get install python-dev -Install yaml: -pip install pyyaml +Install scipy dependencies: +sudo apt-get install libatlas-base-dev gfortran g++ =========================================== -Install MySQL Client +Install pip: +sudo apt-get install python-pip -To fix error "mysql_config not found" while installing packages with pip: -sudo apt-get install libmysqlclient-dev +REMEMBER TO SOURCE VE BEFORE INSTALLING + +Comment out in requirements.txt: +Reaper +numarray + +Before installing from requirements.txt, install numpy separately: +pip install numpy==1.7.0 (or whatever version we're using) + +Install from requirements.txt (after activating virtualenv): +pip install -r gene/misc/requirements.txt =========================================== @@ -116,10 +105,7 @@ Installing QTL Reaper wget http://downloads.sourceforge.net/project/qtlreaper/qtlreaper/1.1.1/qtlreaper-1.1.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fqtlreaper%2Ffiles%2Flatest%2Fdownload&ts=1358975786&use_mirror=iweb mv -v qtlreaper-1.1.1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fqtlreaper%2Ffiles%2Flatest%2Fdownload&ts=1358975786&use_mirror=iweb qtlreaper-1.1.1.tar.gz tar xvf qtlreaper-1.1.1.tar.gz (to unzip) -python setup.py build -sudo mkdir /home/zas1024/ve27/include/python2.7/Reaper -sudo chown /home/zas1024/ve27/include/python2.7/Reaper (or whereever the directory is; the problem -involved the fact that doing "sudo python setup.py install" doesn't install within the virtualenv) +mkdir /home/zas1024/ve27/include/python2.7/Reaper python setup.py install =========================================== @@ -133,6 +119,98 @@ sudo python setup.py install =========================================== +Installing nginx + +sudo -s +nginx=stable # use nginx=development for latest development version +echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu lucid main" > /etc/apt/sources.list.d/nginx-$nginx-lucid.list +apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C +apt-get update +apt-get install nginx + +Create configuration file in ~/gene/wqflask/other_config/nginx_conf/ (modeled off of the others) +Create symbolic link to config file in /etc/nginx/sites-enabled/: +ln -s dir_to_link_to linking_dir + +Run nginx: +sudo /usr/sbin/nginx + +============================================ + +Copy over zach_settings.py to /home/zas1024 directory (or whatever is home directory) + +export WQFLASK_SETTINGS=~/gene/wqflask/cfg/zach_settings.py (or wherever file is located) + +============================================ + +Install MySQL Server + +sudo apt-get install mysql-server + +mkdir /mnt/big +fdisk /dev/sdb +m: for help +n: new partion +... +w: write to table and exit + +Start MySQL server: +service mysql start + +Stop MySQL server: +service mysql stop + +Change root password: +mysql> UPDATE mysql.user SET Password=PASSWORD('your password') WHERE User='root'; + +Setup accounts in MySQL (first need to delete anonymous/non-root accounts): +#; use mysql; +#; select * from user; +#; delete from user where Host!="localhost"; +#; delete from user where User!="root"; +#; update user set Password = Password('yourpassword') where User='root'; +#; GRANT ALL ON *.* TO 'yourusername'@'%' IDENTIFIED BY 'yourpassword'; +#; select * from user; + +============================================ + +Check RSA key: +ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key + +03:2c:d7:01:01:f0:31:3a:c8:df:e4:98:62:2c:59:d2 root@penguin (RSA) + +============================================ + +Using Yolk + +Install Yolk: +pip install yolk + +Check packages installed in this virtual environment: +yolk -l + +Checks packages that have updates available: +yolk -U + +=========================================== + +Installing yaml + +Install libyaml-dev: +sudo apt-get install libyaml-dev + +Install yaml: +pip install pyyaml + +=========================================== + +Install MySQL Client + +To fix error "mysql_config not found" while installing packages with pip: +sudo apt-get install libmysqlclient-dev + +=========================================== + Installing R sudo apt-get install r-base-dev @@ -173,7 +251,7 @@ Start up virtual environment: source ~/ve27/bin/activate To set WQFLASK_SETTINGS environment variable: -export WQFLASK_SETTINGS=~/gene/wqflask/cfg/zach_settings.py (or wherever file is located) +export WQFLASK_SETTINGS=~/zach_settings.py (or wherever file is located) To change screen environment variable (if man not working or to get color, for example): export TERM=screen -- cgit v1.2.3 From 1a3a456eb7635337a966913f2e2e75c8a89bb92e Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Wed, 17 Jul 2013 23:06:32 +0000 Subject: Fixed gen_select_dataset.py Appended redis installation info to notes --- misc/gn_installation_notes.txt | 40 +++++ wqflask/base/webqtlConfigLocal.py | 4 +- wqflask/maintenance/gen_select_dataset.py | 2 +- .../new/javascript/dataset_menu_structure.json | 176 ++++++++++----------- 4 files changed, 131 insertions(+), 91 deletions(-) (limited to 'misc') diff --git a/misc/gn_installation_notes.txt b/misc/gn_installation_notes.txt index 7545a5b8..913021db 100644 --- a/misc/gn_installation_notes.txt +++ b/misc/gn_installation_notes.txt @@ -181,6 +181,46 @@ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key ============================================ +Installing redis server + +In the dls directory: +$ wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz +$ tar xzf redis-2.6.14.tar.gz +$ cd redis-2.6.14 +$ make + +Run redis (from inside redis-2.6.14 directory): +src/redis-server + +For the rest of the installation instructions, refer to: +http://redis.io/topics/quickstart + +To continue installation (from the README): + +In order to install Redis binaries into /usr/local/bin just use: + + % make install + +Make install will just install binaries in your system, but will not configure +init scripts and configuration files in the appropriate place. This is not +needed if you want just to play a bit with Redis, but if you are installing +it the proper way for a production system, we have a script doing this +for Ubuntu and Debian systems: + + % cd utils + % ./install_server + +The script will ask you a few questions and will setup everything you need +to run Redis properly as a background daemon that will start again on +system reboots. + +In the redis config file (/etc/redis/6379.conf) uncomment the following line: +bind 127.0.0.1 + +This is so only the local computer has access + +============================================ + Using Yolk Install Yolk: diff --git a/wqflask/base/webqtlConfigLocal.py b/wqflask/base/webqtlConfigLocal.py index abaeff93..cc53866b 100755 --- a/wqflask/base/webqtlConfigLocal.py +++ b/wqflask/base/webqtlConfigLocal.py @@ -5,12 +5,12 @@ MYSQL_SERVER = 'gn.cazhbciu2y1i.us-east-1.rds.amazonaws.com' DB_NAME = 'db_webqtl' DB_USER = 'webqtl' -DB_PASSWD = 'f2ZypIflRM' +DB_PASSWD = 'zK150dVzyvclGY5aCzavcK' MYSQL_UPDSERVER = 'gn.cazhbciu2y1i.us-east-1.rds.amazonaws.com' DB_UPDNAME = 'db_webqtl' DB_UPDUSER = 'webqtl' -DB_UPDPASSWD = 'f2ZypIflRM' +DB_UPDPASSWD = 'zK150dVzyvclGY5aCzavcK' GNROOT = '/home/zas1024/gene/' ROOT_URL = 'http://50.16.251.170' diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index 4c544192..b6bf5bfd 100644 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -41,7 +41,6 @@ from pprint import pformat as pf from base import webqtlConfig - # build MySql database connection Con = MySQLdb.Connect(db=webqtlConfig.DB_NAME, host=webqtlConfig.MYSQL_SERVER, @@ -148,6 +147,7 @@ def build_datasets(species, group, type_name): def main(): """Generates and outputs (as json file) the data for the main dropdown menus on the home page""" + species = get_species() groups = get_groups(species) types = get_types(groups) diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index 88bdcb11..a4d88ab2 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -63,14 +63,14 @@ ] ], "Leaf": [ - [ - "B1LI0809M5", - "Barley1 Leaf INOC TTKS (Aug09) MAS5" - ], [ "B1LI0809R", "Barley1 Leaf INOC TTKS (Aug09) RMA" ], + [ + "B1LI0809M5", + "Barley1 Leaf INOC TTKS (Aug09) MAS5" + ], [ "B1MI0809M5", "Barley1 Leaf MOCK TTKS (Aug09) MAS5" @@ -113,13 +113,13 @@ "B30_K_1206_M", "Barley1 Leaf MAS 5.0 SCRI (Dec06)" ], - [ - "B30_K_1206_R", - "Barley1 Leaf gcRMA SCRI (Dec06)" - ], [ "B30_K_1206_Rn", "Barley1 Leaf gcRMAn SCRI (Dec06)" + ], + [ + "B30_K_1206_R", + "Barley1 Leaf gcRMA SCRI (Dec06)" ] ], "Phenotypes": [ @@ -211,14 +211,14 @@ }, "AD-cases-controls-Myers": { "Brain": [ - [ - "GSE15222_F_N_RI_0409", - "GSE15222 Human Brain Normal Myers (Apr09) RankInv" - ], [ "GSE15222_F_A_RI_0409", "GSE15222 Human Brain Alzheimer Myers (Apr09) RankInv" ], + [ + "GSE15222_F_N_RI_0409", + "GSE15222 Human Brain Normal Myers (Apr09) RankInv" + ], [ "GSE15222_F_RI_0409", "GSE15222 Human Brain Myers (Apr09) RankInv" @@ -547,13 +547,13 @@ "NCI_Agil_Mam_Tum_RMA_0409", "NCI Mammary LMT miRNA v2 (Apr09) RMA" ], - [ - "MA_M_0704_M", - "NCI Mammary mRNA M430 (July04) MAS5" - ], [ "MA_M_0704_R", "NCI Mammary mRNA M430 (July04) RMA" + ], + [ + "MA_M_0704_M", + "NCI Mammary mRNA M430 (July04) MAS5" ] ], "Phenotypes": [ @@ -597,13 +597,13 @@ ] ], "Liver": [ - [ - "LVF2_M_0704_M", - "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5" - ], [ "LVF2_M_0704_R", "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA" + ], + [ + "LVF2_M_0704_M", + "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5" ] ], "Phenotypes": [ @@ -631,13 +631,13 @@ "BRF2_M_0304_P", "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) PDNN" ], - [ - "BRF2_M_0304_M", - "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5" - ], [ "BRF2_M_0304_R", "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA" + ], + [ + "BRF2_M_0304_M", + "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5" ] ], "Genotypes": [ @@ -727,6 +727,10 @@ ] ], "Striatum": [ + [ + "SA_M2_0905_R", + "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA" + ], [ "SA_M2_0905_M", "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5" @@ -734,37 +738,33 @@ [ "SA_M2_0905_P", "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN" - ], - [ - "SA_M2_0905_R", - "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA" ] ] }, "BHF2": { "Adipose": [ - [ - "UCLA_BHF2_ADIPOSE_FEMALE", - "UCLA BHF2 Adipose Female mlratio" - ], [ "UCLA_BHF2_ADIPOSE_MALE", "UCLA BHF2 Adipose Male mlratio" ], + [ + "UCLA_BHF2_ADIPOSE_FEMALE", + "UCLA BHF2 Adipose Female mlratio" + ], [ "UCLA_BHF2_ADIPOSE_0605", "UCLA BHF2 Adipose (June05) mlratio" ] ], "Brain": [ - [ - "UCLA_BHF2_BRAIN_FEMALE", - "UCLA BHF2 Brain Female mlratio" - ], [ "UCLA_BHF2_BRAIN_MALE", "UCLA BHF2 Brain Male mlratio" ], + [ + "UCLA_BHF2_BRAIN_FEMALE", + "UCLA BHF2 Brain Female mlratio" + ], [ "UCLA_BHF2_BRAIN_0605", "UCLA BHF2 Brain (June05) mlratio" @@ -777,28 +777,28 @@ ] ], "Liver": [ - [ - "UCLA_BHF2_LIVER_FEMALE", - "UCLA BHF2 Liver Female mlratio" - ], [ "UCLA_BHF2_LIVER_MALE", "UCLA BHF2 Liver Male mlratio" ], + [ + "UCLA_BHF2_LIVER_FEMALE", + "UCLA BHF2 Liver Female mlratio" + ], [ "UCLA_BHF2_LIVER_0605", "UCLA BHF2 Liver (June05) mlratio" ] ], "Muscle": [ - [ - "UCLA_BHF2_MUSCLE_FEMALE", - "UCLA BHF2 Muscle Female mlratio **" - ], [ "UCLA_BHF2_MUSCLE_MALE", "UCLA BHF2 Muscle Male mlratio **" ], + [ + "UCLA_BHF2_MUSCLE_FEMALE", + "UCLA BHF2 Muscle Female mlratio **" + ], [ "UCLA_BHF2_MUSCLE_0605", "UCLA BHF2 Muscle (June05) mlratio **" @@ -923,6 +923,10 @@ "BR_U_1105_P", "UTHSC Brain mRNA U74Av2 (Nov05) PDNN" ], + [ + "BR_U_0805_M", + "UTHSC Brain mRNA U74Av2 (Aug05) MAS5" + ], [ "BR_U_0805_R", "UTHSC Brain mRNA U74Av2 (Aug05) RMA" @@ -931,10 +935,6 @@ "BR_U_0805_P", "UTHSC Brain mRNA U74Av2 (Aug05) PDNN" ], - [ - "BR_U_0805_M", - "UTHSC Brain mRNA U74Av2 (Aug05) MAS5" - ], [ "CB_M_0204_P", "INIA Brain mRNA M430 (Feb04) PDNN" @@ -955,6 +955,10 @@ ] ], "Cerebellum": [ + [ + "CB_M_1004_M", + "SJUT Cerebellum mRNA M430 (Oct04) MAS5" + ], [ "CB_M_1004_R", "SJUT Cerebellum mRNA M430 (Oct04) RMA" @@ -963,10 +967,6 @@ "CB_M_1004_P", "SJUT Cerebellum mRNA M430 (Oct04) PDNN" ], - [ - "CB_M_1004_M", - "SJUT Cerebellum mRNA M430 (Oct04) MAS5" - ], [ "CB_M_1003_M", "SJUT Cerebellum mRNA M430 (Oct03) MAS5" @@ -1131,13 +1131,13 @@ "MA_M2_0806_P", "Mouse Kidney M430v2 Sex Balanced (Aug06) PDNN" ], - [ - "MA_M2_0706_R", - "Mouse Kidney M430v2 (Jul06) RMA" - ], [ "MA_M2_0706_P", "Mouse Kidney M430v2 (Jul06) PDNN" + ], + [ + "MA_M2_0706_R", + "Mouse Kidney M430v2 (Jul06) RMA" ] ], "Leucocytes": [ @@ -1155,6 +1155,10 @@ "GenEx_BXD_liverEt_M5_0912", "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Both Sexes **" ], + [ + "GenEx_BXD_liverSal_RMA_F_0211", + "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females **" + ], [ "GenEx_BXD_liverEt_M5F_0912", "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Females **" @@ -1163,10 +1167,6 @@ "GenEx_BXD_liverEt_M5M_0912", "GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Males **" ], - [ - "GenEx_BXD_liverSal_RMA_F_0211", - "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females **" - ], [ "GenEx_BXD_liverSal_RMA_M_0211", "GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Males **" @@ -1227,14 +1227,14 @@ ] ], "Neocortex": [ - [ - "DevNeocortex_ILM6.2P3RInv_1111", - "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv" - ], [ "DevNeocortex_ILM6.2P14RInv_1111", "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv" ], + [ + "DevNeocortex_ILM6.2P3RInv_1111", + "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv" + ], [ "HQFNeoc_1210v2_RankInv", "HQF BXD Neocortex ILM6v1.1 (Dec10v2) RankInv" @@ -1247,13 +1247,13 @@ "HQFNeoc_0208_RankInv", "HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv" ], - [ - "DevNeocortex_ILM6.2P14RInv_1110", - "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv" - ], [ "DevNeocortex_ILM6.2P3RInv_1110", "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv" + ], + [ + "DevNeocortex_ILM6.2P14RInv_1110", + "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv" ] ], "Nucleus Accumbens": [ @@ -1293,6 +1293,10 @@ ] ], "Prefrontal Cortex": [ + [ + "VCUEtOH_1206_R", + "VCU BXD PFC EtOH M430 2.0 (Dec06) RMA" + ], [ "VCUSal_1206_R", "VCU BXD PFC Sal M430 2.0 (Dec06) RMA" @@ -1301,10 +1305,6 @@ "VCUSal_1006_R", "VCU BXD PFC Et vs Sal M430 2.0 (Dec06) Sscore" ], - [ - "VCUEtOH_1206_R", - "VCU BXD PFC EtOH M430 2.0 (Dec06) RMA" - ], [ "VCU_PF_Air_0111_R", "VCU BXD PFC CIE Air M430 2.0 (Jan11) RMA **" @@ -1447,6 +1447,10 @@ ] ], "Ventral Tegmental Area": [ + [ + "VCUEtOH_0609_R", + "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **" + ], [ "VCUSal_0609_R", "VCU BXD VTA Sal M430 2.0 (Jun09) RMA **" @@ -1454,10 +1458,6 @@ [ "VCUEtvsSal_0609_R", "VCU BXD VTA Et vs Sal M430 2.0 (Jun09) Sscore **" - ], - [ - "VCUEtOH_0609_R", - "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **" ] ] }, @@ -1573,13 +1573,13 @@ ] ], "Hippocampus": [ - [ - "HC_M2CB_1205_P", - "Hippocampus Consortium M430v2 CXB (Dec05) PDNN" - ], [ "HC_M2CB_1205_R", "Hippocampus Consortium M430v2 CXB (Dec05) RMA" + ], + [ + "HC_M2CB_1205_P", + "Hippocampus Consortium M430v2 CXB (Dec05) PDNN" ] ], "Phenotypes": [ @@ -1711,6 +1711,10 @@ ] ], "Prefrontal Cortex": [ + [ + "VCUEtOH_0806_R", + "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **" + ], [ "VCUSal_0806_R", "VCU LXS PFC Sal M430A 2.0 (Aug06) RMA" @@ -1718,10 +1722,6 @@ [ "VCUEt_vs_Sal_0806_R", "VCU LXS PFC Et vs Sal M430A 2.0 (Aug06) Sscore **" - ], - [ - "VCUEtOH_0806_R", - "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **" ] ] }, @@ -1733,13 +1733,13 @@ ] ], "Hippocampus": [ - [ - "HC_M2_0606_MDP", - "Hippocampus Consortium M430v2 (Jun06) RMA MDP" - ], [ "UMUTAffyExon_0209_RMA_MDP", "UMUTAffy Hippocampus Exon (Feb09) RMA MDP" + ], + [ + "HC_M2_0606_MDP", + "Hippocampus Consortium M430v2 (Jun06) RMA MDP" ] ], "Liver": [ -- cgit v1.2.3