diff options
author | Zachary Sloan | 2013-07-18 17:39:10 -0500 |
---|---|---|
committer | Zachary Sloan | 2013-07-18 17:39:10 -0500 |
commit | 0fcadee805a6d4a2007e57a69ab130eb9b1c1a3c (patch) | |
tree | c5c981b472d6d4754ad67cdb7e3682641fa6f35e | |
parent | 89c4dc078c6371e4bc56bf8708fc7dca6c49b350 (diff) | |
download | genenetwork2-0fcadee805a6d4a2007e57a69ab130eb9b1c1a3c.tar.gz |
Added Amelie's rat data genotypes
Got human mapping mostly working
Fixed dataset dropdown menus
-rw-r--r-- | misc/notes.txt | 5 | ||||
-rwxr-xr-x | web/genotypes/HSNIH.geno.gz | bin | 0 -> 63400027 bytes | |||
-rwxr-xr-x | wqflask/base/trait.py | 3 | ||||
-rwxr-xr-x | wqflask/base/webqtlConfig.py | 4 | ||||
-rw-r--r-- | wqflask/maintenance/gen_select_dataset.py | 15 | ||||
-rw-r--r-- | wqflask/wqflask/correlation/show_corr_results.py | 2 | ||||
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/lmm.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/static/new/javascript/dataset_menu_structure.json | 248 |
8 files changed, 136 insertions, 145 deletions
diff --git a/misc/notes.txt b/misc/notes.txt index 9da6c4ea..d9bd6e41 100644 --- a/misc/notes.txt +++ b/misc/notes.txt @@ -245,6 +245,11 @@ To iterate through dictionary items: for X, Y in MyDictionary.items(): =========================================== +Change import path from command line +export PYTHONPATH=~/gene/wqflask (or whatever) + +=========================================== + Create symbolic link: ln -s dir_to_link_to linking_dir diff --git a/web/genotypes/HSNIH.geno.gz b/web/genotypes/HSNIH.geno.gz Binary files differnew file mode 100755 index 00000000..96584768 --- /dev/null +++ b/web/genotypes/HSNIH.geno.gz diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 6648047c..a1e6b0d3 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -319,10 +319,9 @@ class GeneralTrait(object): #XZ: assign SQL query result to trait attributes. for i, field in enumerate(self.dataset.display_fields): - print(" mike: {} -> {} - {}".format(field, type(trait_info[i]), trait_info[i])) + #print(" mike: {} -> {} - {}".format(field, type(trait_info[i]), trait_info[i])) holder = trait_info[i] if isinstance(trait_info[i], basestring): - print("is basestring") holder = unicode(trait_info[i], "utf8") setattr(self, field, holder) diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py index 716986db..d4511212 100755 --- a/wqflask/base/webqtlConfig.py +++ b/wqflask/base/webqtlConfig.py @@ -53,8 +53,8 @@ GNROOT = "/home/zas1024/gene/" # Will remove this and dependent items later SECUREDIR = GNROOT + 'secure/' COMMON_LIB = GNROOT + 'support/admin' HTMLPATH = GNROOT + 'web/' -PYLMM_PATH = '/home/zas1024/' -SNP_PATH = '/mnt/xvdf1/snps/' +PYLMM_PATH = '/home/zas1024/plink/' +SNP_PATH = '/home/zas1024/snps/' IMGDIR = HTMLPATH +'image/' IMAGESPATH = HTMLPATH + 'images/' UPLOADPATH = IMAGESPATH + 'upload/' diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py index d653fd2d..8cb94f20 100644 --- a/wqflask/maintenance/gen_select_dataset.py +++ b/wqflask/maintenance/gen_select_dataset.py @@ -47,6 +47,15 @@ import urlparse from pprint import pformat as pf +#Engine = sa.create_engine(our_settings.SQLALCHEMY_DATABASE_URI) + +# build MySql database connection + +#conn = Engine.connect() + + + + def parse_db_uri(db_uri): """Converts a database URI to the db name, host name, user name, and password""" @@ -106,7 +115,7 @@ def build_types(species, group): (all types except phenotype/genotype are tissues) """ - Cursor.execute("""select distinct Tissue.Name, concat(Tissue.Name, ' mRNA') + Cursor.execute("""select distinct Tissue.Name, Tissue.Name from ProbeFreeze, ProbeSetFreeze, InbredSet, Tissue, Species where Species.Name = %s and Species.Id = InbredSet.SpeciesId and InbredSet.Name = %s and @@ -161,13 +170,9 @@ 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""" -<<<<<<< HEAD parse_db_uri(our_settings.DB_URI) -======= - ->>>>>>> 1a3a456eb7635337a966913f2e2e75c8a89bb92e species = get_species() groups = get_groups(species) types = get_types(groups) diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 422fa8af..07d70897 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -140,8 +140,6 @@ class CorrelationResults(object): this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values( this_trait_vals, target_vals) - print("num_overlap:", num_overlap) - if self.corr_method == 'pearson': sample_r, sample_p = scipy.stats.pearsonr(this_trait_vals, target_vals) else: diff --git a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py index 5bfc3a01..38a49f12 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/lmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/lmm.py @@ -138,8 +138,8 @@ def run_human(pheno_vector, #print("***** Added to {} queue *****".format(key)) for snp, this_id in plink_input: #with Bench("part before association"): - if count > 2000: - break + #if count > 2000: + # break count += 1 percent_complete = (float(count) / total_snps) * 100 diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index a4de53bd..49c44fbd 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -798,10 +798,6 @@ "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA" ], [ - "SA_M2_0905_R", - "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA" - ], - [ "SA_M2_0905_M", "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5" ], @@ -1052,10 +1048,6 @@ ], "Cerebellum mRNA": [ [ - "CB_M_1004_M", - "SJUT Cerebellum mRNA M430 (Oct04) MAS5" - ], - [ "CB_M_1004_R", "SJUT Cerebellum mRNA M430 (Oct04) RMA" ], @@ -1064,6 +1056,10 @@ "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" ], @@ -1552,10 +1548,6 @@ ], "Prefrontal Cortex mRNA": [ [ - "VCUEtOH_1206_R", - "VCU BXD PFC EtOH M430 2.0 (Dec06) RMA" - ], - [ "VCUSal_1206_R", "VCU BXD PFC Sal M430 2.0 (Dec06) RMA" ], @@ -1730,10 +1722,6 @@ "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **" ], [ - "VCUEtOH_0609_R", - "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **" - ], - [ "VCUSal_0609_R", "VCU BXD VTA Sal M430 2.0 (Jun09) RMA **" ], @@ -2018,10 +2006,6 @@ "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **" ], [ - "VCUEtOH_0806_R", - "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **" - ], - [ "VCUSal_0806_R", "VCU LXS PFC Sal M430A 2.0 (Aug06) RMA" ], @@ -2572,7 +2556,7 @@ ], [ "Leaf mRNA", - "Leaf mRNA mRNA" + "Leaf mRNA" ] ], "SXM": [ @@ -2586,11 +2570,11 @@ ], [ "Embryo mRNA", - "Embryo mRNA mRNA" + "Embryo mRNA" ], [ "Leaf mRNA", - "Leaf mRNA mRNA" + "Leaf mRNA" ] ] }, @@ -2606,7 +2590,7 @@ ], [ "Whole Body mRNA", - "Whole Body mRNA mRNA" + "Whole Body mRNA" ] ], "Oregon-R_x_2b3": [ @@ -2620,7 +2604,7 @@ ], [ "Whole Body mRNA", - "Whole Body mRNA mRNA" + "Whole Body mRNA" ] ] }, @@ -2636,7 +2620,7 @@ ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ] ], "AD-cases-controls-Myers": [ @@ -2650,7 +2634,7 @@ ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ] ], "CANDLE": [ @@ -2664,11 +2648,11 @@ ], [ "Methylation", - "Methylation mRNA" + "Methylation" ], [ "Newborn Cord Blood mRNA", - "Newborn Cord Blood mRNA mRNA" + "Newborn Cord Blood mRNA" ] ], "CEPH-2004": [ @@ -2682,7 +2666,7 @@ ], [ "Lymphoblast B-cell mRNA", - "Lymphoblast B-cell mRNA mRNA" + "Lymphoblast B-cell mRNA" ] ], "HB": [ @@ -2696,15 +2680,15 @@ ], [ "Cerebellum mRNA", - "Cerebellum mRNA mRNA" + "Cerebellum mRNA" ], [ "Prefrontal Cortex mRNA", - "Prefrontal Cortex mRNA mRNA" + "Prefrontal Cortex mRNA" ], [ "Primary Visual Cortex mRNA", - "Primary Visual Cortex mRNA mRNA" + "Primary Visual Cortex mRNA" ] ], "HLC": [ @@ -2718,7 +2702,7 @@ ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "HLT": [ @@ -2732,7 +2716,7 @@ ], [ "Lung mRNA", - "Lung mRNA mRNA" + "Lung mRNA" ] ], "HSB": [ @@ -2746,67 +2730,67 @@ ], [ "Amygdala mRNA", - "Amygdala mRNA mRNA" + "Amygdala mRNA" ], [ "Cerebellar Cortex mRNA", - "Cerebellar Cortex mRNA mRNA" + "Cerebellar Cortex mRNA" ], [ "Dorsolateral Prefrontal Cortex mRNA", - "Dorsolateral Prefrontal Cortex mRNA mRNA" + "Dorsolateral Prefrontal Cortex mRNA" ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Inferior Temporal Cortex mRNA", - "Inferior Temporal Cortex mRNA mRNA" + "Inferior Temporal Cortex mRNA" ], [ "Medial Prefrontal Cortex mRNA", - "Medial Prefrontal Cortex mRNA mRNA" + "Medial Prefrontal Cortex mRNA" ], [ "Mediodorsal Nucleus of Thalamus mRNA", - "Mediodorsal Nucleus of Thalamus mRNA mRNA" + "Mediodorsal Nucleus of Thalamus mRNA" ], [ "Orbital Prefrontal Cortex mRNA", - "Orbital Prefrontal Cortex mRNA mRNA" + "Orbital Prefrontal Cortex mRNA" ], [ "Posterior Inferior Parietal Cortex mRNA", - "Posterior Inferior Parietal Cortex mRNA mRNA" + "Posterior Inferior Parietal Cortex mRNA" ], [ "Posterior Superior Temporal Cortex mRNA", - "Posterior Superior Temporal Cortex mRNA mRNA" + "Posterior Superior Temporal Cortex mRNA" ], [ "Primary Auditory (A1) Cortex mRNA", - "Primary Auditory (A1) Cortex mRNA mRNA" + "Primary Auditory (A1) Cortex mRNA" ], [ "Primary Motor (M1) Cortex mRNA", - "Primary Motor (M1) Cortex mRNA mRNA" + "Primary Motor (M1) Cortex mRNA" ], [ "Primary Somatosensory (S1) Cortex mRNA", - "Primary Somatosensory (S1) Cortex mRNA mRNA" + "Primary Somatosensory (S1) Cortex mRNA" ], [ "Primary Visual Cortex mRNA", - "Primary Visual Cortex mRNA mRNA" + "Primary Visual Cortex mRNA" ], [ "Striatum mRNA", - "Striatum mRNA mRNA" + "Striatum mRNA" ], [ "Ventrolateral Prefrontal Cortex mRNA", - "Ventrolateral Prefrontal Cortex mRNA mRNA" + "Ventrolateral Prefrontal Cortex mRNA" ] ] }, @@ -2822,23 +2806,23 @@ ], [ "Amygdala mRNA", - "Amygdala mRNA mRNA" + "Amygdala mRNA" ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Nucleus Accumbens mRNA", - "Nucleus Accumbens mRNA mRNA" + "Nucleus Accumbens mRNA" ], [ "Prefrontal Cortex mRNA", - "Prefrontal Cortex mRNA mRNA" + "Prefrontal Cortex mRNA" ] ] }, @@ -2854,7 +2838,7 @@ ], [ "Mammary Tumors mRNA", - "Mammary Tumors mRNA mRNA" + "Mammary Tumors mRNA" ] ], "AXBXA": [ @@ -2868,19 +2852,19 @@ ], [ "Bone Femur mRNA", - "Bone Femur mRNA mRNA" + "Bone Femur mRNA" ], [ "Eye mRNA", - "Eye mRNA mRNA" + "Eye mRNA" ], [ "Heart mRNA", - "Heart mRNA mRNA" + "Heart mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "B6BTBRF2": [ @@ -2894,7 +2878,7 @@ ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "B6D2F2": [ @@ -2908,7 +2892,7 @@ ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ] ], "B6D2F2-PSU": [ @@ -2922,7 +2906,7 @@ ], [ "Muscle mRNA", - "Muscle mRNA mRNA" + "Muscle mRNA" ] ], "B6D2RI": [ @@ -2936,7 +2920,7 @@ ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ] ], "BDF2-1999": [ @@ -2950,7 +2934,7 @@ ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "BDF2-2005": [ @@ -2964,7 +2948,7 @@ ], [ "Striatum mRNA", - "Striatum mRNA mRNA" + "Striatum mRNA" ] ], "BHF2": [ @@ -2978,19 +2962,19 @@ ], [ "Adipose mRNA", - "Adipose mRNA mRNA" + "Adipose mRNA" ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Muscle mRNA", - "Muscle mRNA mRNA" + "Muscle mRNA" ] ], "BHHBF2": [ @@ -3004,19 +2988,19 @@ ], [ "Adipose mRNA", - "Adipose mRNA mRNA" + "Adipose mRNA" ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Muscle mRNA", - "Muscle mRNA mRNA" + "Muscle mRNA" ] ], "BXD": [ @@ -3030,119 +3014,119 @@ ], [ "Adrenal Gland mRNA", - "Adrenal Gland mRNA mRNA" + "Adrenal Gland mRNA" ], [ "Amygdala mRNA", - "Amygdala mRNA mRNA" + "Amygdala mRNA" ], [ "Bone Femur mRNA", - "Bone Femur mRNA mRNA" + "Bone Femur mRNA" ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ], [ "Cartilage mRNA", - "Cartilage mRNA mRNA" + "Cartilage mRNA" ], [ "Cerebellum mRNA", - "Cerebellum mRNA mRNA" + "Cerebellum mRNA" ], [ "Eye mRNA", - "Eye mRNA mRNA" + "Eye mRNA" ], [ "Hematopoietic Cells mRNA", - "Hematopoietic Cells mRNA mRNA" + "Hematopoietic Cells mRNA" ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Hypothalamus mRNA", - "Hypothalamus mRNA mRNA" + "Hypothalamus mRNA" ], [ "Kidney mRNA", - "Kidney mRNA mRNA" + "Kidney mRNA" ], [ "Leucocytes mRNA", - "Leucocytes mRNA mRNA" + "Leucocytes mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Liver Proteome", - "Liver Proteome mRNA" + "Liver Proteome" ], [ "Lung mRNA", - "Lung mRNA mRNA" + "Lung mRNA" ], [ "Midbrain mRNA", - "Midbrain mRNA mRNA" + "Midbrain mRNA" ], [ "Muscle mRNA", - "Muscle mRNA mRNA" + "Muscle mRNA" ], [ "Neocortex mRNA", - "Neocortex mRNA mRNA" + "Neocortex mRNA" ], [ "Nucleus Accumbens mRNA", - "Nucleus Accumbens mRNA mRNA" + "Nucleus Accumbens mRNA" ], [ "Pituitary Gland mRNA", - "Pituitary Gland mRNA mRNA" + "Pituitary Gland mRNA" ], [ "Popliteal Lymph Node mRNA", - "Popliteal Lymph Node mRNA mRNA" + "Popliteal Lymph Node mRNA" ], [ "Prefrontal Cortex mRNA", - "Prefrontal Cortex mRNA mRNA" + "Prefrontal Cortex mRNA" ], [ "Retina mRNA", - "Retina mRNA mRNA" + "Retina mRNA" ], [ "Spleen mRNA", - "Spleen mRNA mRNA" + "Spleen mRNA" ], [ "Striatum mRNA", - "Striatum mRNA mRNA" + "Striatum mRNA" ], [ "T Cell (helper) mRNA", - "T Cell (helper) mRNA mRNA" + "T Cell (helper) mRNA" ], [ "T Cell (regulatory) mRNA", - "T Cell (regulatory) mRNA mRNA" + "T Cell (regulatory) mRNA" ], [ "Thymus mRNA", - "Thymus mRNA mRNA" + "Thymus mRNA" ], [ "Ventral Tegmental Area mRNA", - "Ventral Tegmental Area mRNA mRNA" + "Ventral Tegmental Area mRNA" ] ], "BXH": [ @@ -3156,15 +3140,15 @@ ], [ "Bone Femur mRNA", - "Bone Femur mRNA mRNA" + "Bone Femur mRNA" ], [ "Cartilage mRNA", - "Cartilage mRNA mRNA" + "Cartilage mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "C57BL-6JxC57BL-6NJF2": [ @@ -3188,19 +3172,19 @@ ], [ "Adipose mRNA", - "Adipose mRNA mRNA" + "Adipose mRNA" ], [ "Brain mRNA", - "Brain mRNA mRNA" + "Brain mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Muscle mRNA", - "Muscle mRNA mRNA" + "Muscle mRNA" ] ], "CXB": [ @@ -3214,11 +3198,11 @@ ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Spleen mRNA", - "Spleen mRNA mRNA" + "Spleen mRNA" ] ], "HS": [ @@ -3232,15 +3216,15 @@ ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Lung mRNA", - "Lung mRNA mRNA" + "Lung mRNA" ] ], "HS-CC": [ @@ -3254,7 +3238,7 @@ ], [ "Striatum mRNA", - "Striatum mRNA mRNA" + "Striatum mRNA" ] ], "LXS": [ @@ -3268,11 +3252,11 @@ ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Prefrontal Cortex mRNA", - "Prefrontal Cortex mRNA mRNA" + "Prefrontal Cortex mRNA" ] ], "MDP": [ @@ -3286,19 +3270,19 @@ ], [ "Bone Femur mRNA", - "Bone Femur mRNA mRNA" + "Bone Femur mRNA" ], [ "Dorsal Root Ganglia mRNA", - "Dorsal Root Ganglia mRNA mRNA" + "Dorsal Root Ganglia mRNA" ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ] ], "NZBXFVB-N2": [ @@ -3312,7 +3296,7 @@ ], [ "Mammary Tumors mRNA", - "Mammary Tumors mRNA mRNA" + "Mammary Tumors mRNA" ] ], "SOTNOT-OHSU": [ @@ -3336,7 +3320,7 @@ ], [ "Anterior Cingulate Cortex mRNA", - "Anterior Cingulate Cortex mRNA mRNA" + "Anterior Cingulate Cortex mRNA" ] ] }, @@ -3362,27 +3346,27 @@ ], [ "Adrenal Gland mRNA", - "Adrenal Gland mRNA mRNA" + "Adrenal Gland mRNA" ], [ "Heart mRNA", - "Heart mRNA mRNA" + "Heart mRNA" ], [ "Hippocampus mRNA", - "Hippocampus mRNA mRNA" + "Hippocampus mRNA" ], [ "Kidney mRNA", - "Kidney mRNA mRNA" + "Kidney mRNA" ], [ "Liver mRNA", - "Liver mRNA mRNA" + "Liver mRNA" ], [ "Peritoneal Fat mRNA", - "Peritoneal Fat mRNA mRNA" + "Peritoneal Fat mRNA" ] ], "SRxSHRSPF2": [ @@ -3396,7 +3380,7 @@ ], [ "Eye mRNA", - "Eye mRNA mRNA" + "Eye mRNA" ] ] }, |