diff options
Diffstat (limited to 'wqflask')
29 files changed, 752 insertions, 98 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index ebf3f021..cab708ef 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -56,7 +56,7 @@ from pprint import pformat as pf from db.gn_server import menu_main from db.call import fetchall,fetchone,fetch1 -from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists +from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists, GN2_BASE_URL from utility.logger import getLogger logger = getLogger(__name__ ) @@ -64,10 +64,9 @@ logger = getLogger(__name__ ) # Each subclass will add to this DS_NAME_MAP = {} -def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_samplelist = True, group_name = None): +def create_dataset(dataset_name, dataset_type = None, get_samplelist = True, group_name = None): if not dataset_type: dataset_type = Dataset_Getter(dataset_name) - logger.debug("dataset_type", dataset_type) dataset_ob = DS_NAME_MAP[dataset_type] dataset_class = globals()[dataset_ob] @@ -78,7 +77,7 @@ def create_dataset(dataset_name, rebuild=True, dataset_type = None, get_sampleli class Dataset_Types(object): - def __init__(self, rebuild=False): + def __init__(self): """Create a dictionary of samples where the value is set to Geno, Publish or ProbeSet. E.g. @@ -94,33 +93,96 @@ Publish or ProbeSet. E.g. """ self.datasets = {} - if rebuild: #ZS: May make this the only option - data = json.loads(requests.get("http://gn2.genenetwork.org/api/v_pre1/gen_dropdown").content) - logger.debug("THE DATA:", data) - #data = gen_menu.gen_dropdown_json() - else: - file_name = "wqflask/static/new/javascript/dataset_menu_structure.json" - with open(file_name, 'r') as fh: - data = json.load(fh) - - for species in data['datasets']: - for group in data['datasets'][species]: - for dataset_type in data['datasets'][species][group]: - for dataset in data['datasets'][species][group][dataset_type]: - short_dataset_name = dataset[1] - if dataset_type == "Phenotypes": - new_type = "Publish" - elif dataset_type == "Genotypes": - new_type = "Geno" - else: - new_type = "ProbeSet" - self.datasets[short_dataset_name] = new_type + + data = Redis.get("dataset_structure") + if data: + self.datasets = json.loads(data) + else: #ZS: I don't think this should ever run unless Redis is emptied + try: + data = json.loads(requests.get(GN2_BASE_URL + "/api/v_pre1/gen_dropdown", timeout = 5).content) + for species in data['datasets']: + for group in data['datasets'][species]: + for dataset_type in data['datasets'][species][group]: + for dataset in data['datasets'][species][group][dataset_type]: + short_dataset_name = dataset[1] + if dataset_type == "Phenotypes": + new_type = "Publish" + elif dataset_type == "Genotypes": + new_type = "Geno" + else: + new_type = "ProbeSet" + self.datasets[short_dataset_name] = new_type + except: + pass + + Redis.set("dataset_structure", json.dumps(self.datasets)) # Set LOG_LEVEL_DEBUG=5 to see the following: logger.debugf(5, "datasets",self.datasets) def __call__(self, name): - return self.datasets[name] + if name not in self.datasets: + mrna_expr_query = """ + SELECT + ProbeSetFreeze.Id + FROM + ProbeSetFreeze + WHERE + ProbeSetFreeze.Name = "{0}" + """.format(name) + + results = g.db.execute(geno_query).fetchall() + if len(results): + self.datasets[name] = "ProbeSet" + Redis.set("dataset_structure", json.dumps(self.datasets)) + return self.datasets[name] + + group_name = name.replace("Publish", "") + + pheno_query = """SELECT InfoFiles.GN_AccesionId + FROM InfoFiles, PublishFreeze, InbredSet + WHERE InbredSet.Name = '{0}' AND + PublishFreeze.InbredSetId = InbredSet.Id AND + InfoFiles.InfoPageName = PublishFreeze.Name""".format(group_name) + + results = g.db.execute(pheno_query).fetchall() + if len(results): + self.datasets[name] = "Publish" + Redis.set("dataset_structure", json.dumps(self.datasets)) + return self.datasets[name] + + #ZS: For when there isn't an InfoFiles ID; not sure if this and the preceding query are both necessary + other_pheno_query = """SELECT PublishFreeze.Name + FROM PublishFreeze, InbredSet + WHERE InbredSet.Name = '{}' AND + PublishFreeze.InbredSetId = InbredSet.Id""".format(group_name) + + results = g.db.execute(other_pheno_query).fetchall() + if len(results): + self.datasets[name] = "Publish" + Redis.set("dataset_structure", json.dumps(self.datasets)) + return self.datasets[name] + + geno_query = """ + SELECT + GenoFreezeId + FROM + GenoFreeze + WHERE + GenoFreeze.Name = "{0}" + {1} + """.format(name) + + results = g.db.execute(geno_query).fetchall() + if len(results): + self.datasets[name] = "Geno" + Redis.set("dataset_structure", json.dumps(self.datasets)) + return self.datasets[name] + + #ZS: It shouldn't ever reach this + return None + else: + return self.datasets[name] # Do the intensive work at startup one time only Dataset_Getter = Dataset_Types() diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 5525472e..e454c593 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -14,6 +14,7 @@ from base.data_set import create_dataset from db import webqtlDatabaseFunction from utility import webqtlUtil from utility import hmac +from utility.tools import GN2_BASE_URL from wqflask import app @@ -135,9 +136,9 @@ class GeneralTrait(object): alias = 'Not available' if self.symbol: - human_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.upper()) - mouse_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.capitalize()) - other_response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol.lower()) + human_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.upper()) + mouse_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.capitalize()) + other_response = requests.get(GN2_BASE_URL + "gn3/gene/aliases/" + self.symbol.lower()) if human_response and mouse_response and other_response: alias_list = json.loads(human_response.content) + json.loads(mouse_response.content) + json.loads(other_response.content) diff --git a/wqflask/runserver.py b/wqflask/runserver.py index 7c06356b..15572d97 100644 --- a/wqflask/runserver.py +++ b/wqflask/runserver.py @@ -9,6 +9,7 @@ from wqflask import app + import logging import utility.logger logger = utility.logger.getLogger(__name__ ) diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py index 0fbedccb..2914d354 100644 --- a/wqflask/utility/tools.py +++ b/wqflask/utility/tools.py @@ -233,7 +233,10 @@ def show_settings(): # Cached values GN_VERSION = get_setting('GN_VERSION') HOME = get_setting('HOME') +SERVER_PORT = get_setting('SERVER_PORT') WEBSERVER_MODE = get_setting('WEBSERVER_MODE') +GN2_BASE_URL = get_setting('GN2_BASE_URL') +GN2_BRANCH_URL = get_setting('GN2_BRANCH_URL') GN_SERVER_URL = get_setting('GN_SERVER_URL') SERVER_PORT = get_setting_int('SERVER_PORT') SQL_URI = get_setting('SQL_URI') diff --git a/wqflask/wqflask/__init__.py b/wqflask/wqflask/__init__.py index 399e794d..62e98b36 100644 --- a/wqflask/wqflask/__init__.py +++ b/wqflask/wqflask/__init__.py @@ -21,5 +21,5 @@ app.jinja_env.globals.update( numify = formatting.numify ) -import wqflask.views -from wqflask.api import router
\ No newline at end of file +from wqflask.api import router +import wqflask.views
\ No newline at end of file diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 7d2d243c..c7bcb65d 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -1,7 +1,6 @@ from __future__ import print_function, division import sys -import json from flask import g @@ -23,31 +22,17 @@ def gen_dropdown_json(): types = get_types(groups) datasets = get_datasets(types) - #species.append(('All Species', 'All Species')) - #groups['All Species'] = [('All Groups', 'All Groups')] - #types['All Species'] = {} - #types['All Species']['All Groups'] = [('Phenotypes', 'Phenotypes')] - #datasets['All Species'] = {} - #datasets['All Species']['All Groups'] = {} - #datasets['All Species']['All Groups']['Phenotypes'] = [('All Phenotypes','All Phenotypes')] - data = dict(species=species, groups=groups, types=types, datasets=datasets) - output_file = """./wqflask/static/new/javascript/dataset_menu_structure.json""" - - with open(output_file, 'w') as fh: - json.dump(data, fh, indent=3, sort_keys=True) - return data def get_species(): """Build species list""" results = g.db.execute("""SELECT Name, MenuName FROM Species - WHERE Species.Name != 'macaque monkey' ORDER BY OrderId""").fetchall() species = [] @@ -61,15 +46,6 @@ def get_groups(species): groups = {} for species_name, _species_full_name in species: groups[species_name] = [] - # results = g.db.execute("""SELECT InbredSet.Name, InbredSet.FullName - # FROM InbredSet, Species, ProbeFreeze, GenoFreeze, PublishFreeze - # WHERE Species.Name = '{}' AND - # InbredSet.SpeciesId = Species.Id AND - # (PublishFreeze.InbredSetId = InbredSet.Id OR - # GenoFreeze.InbredSetId = InbredSet.Id OR - # ProbeFreeze.InbredSetId = InbredSet.Id) - # GROUP by InbredSet.Name - # ORDER BY InbredSet.FullName""".format(species_name)).fetchall() results = g.db.execute("""SELECT InbredSet.Name, InbredSet.FullName, IFNULL(InbredSet.Family, 'None') FROM InbredSet, Species diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 1d74b699..b22e0004 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -185,7 +185,7 @@ def delete_collection(): if len(uc_id.split(":")) > 1: flash("We've deleted the selected collections.", "alert-info") else: - flash("We've deleted the collection: {}.".format(uc_id), "alert-info") + flash("We've deleted the selected collection.", "alert-info") else: flash("We've deleted the collection: {}.".format(collection_name), "alert-info") diff --git a/wqflask/wqflask/ctl/ctl_analysis.py b/wqflask/wqflask/ctl/ctl_analysis.py index 6fda02fd..4415b86a 100644 --- a/wqflask/wqflask/ctl/ctl_analysis.py +++ b/wqflask/wqflask/ctl/ctl_analysis.py @@ -20,7 +20,7 @@ from base import data_set from base import trait as TRAIT from utility import helper_functions -from utility.tools import locate +from utility.tools import locate, GN2_BRANCH_URL from rpy2.robjects.packages import importr @@ -56,6 +56,8 @@ class CTL(object): self.edges_list = [] logger.info("Obtained pointers to CTL functions") + self.gn2_url = GN2_BRANCH_URL + def addNode(self, gt): node_dict = { 'data' : {'id' : str(gt.name) + ":" + str(gt.dataset.name), 'sid' : str(gt.name), diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index 05caa100..b0ca5ced 100644 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -13,6 +13,7 @@ import sys # sys.path.append("..") Never in a running webserver from db import webqtlDatabaseFunction +from utility.tools import GN2_BASE_URL import logging from utility.logger import getLogger @@ -919,7 +920,7 @@ def get_aliases(symbol, species): return [] filtered_aliases = [] - response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + symbol_string) + response = requests.get(GN2_BASE_URL + "/gn3/gene/aliases/" + symbol_string) if response: alias_list = json.loads(response.content) diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index a7e11738..2a53b60e 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -166,6 +166,7 @@ class DisplayMappingResults(object): #Needing for form submission when doing single chr mapping or remapping after changing options self.samples = start_vars['samples'] self.vals = start_vars['vals'] + self.transform = start_vars['transform'] self.mapping_method = start_vars['mapping_method'] self.mapping_results_path = start_vars['mapping_results_path'] if self.mapping_method == "rqtl_geno": @@ -233,6 +234,8 @@ class DisplayMappingResults(object): self.covariates = start_vars['covariates'] if 'maf' in start_vars.keys(): self.maf = start_vars['maf'] + else: + self.maf = "" if 'output_files' in start_vars.keys(): self.output_files = start_vars['output_files'] if 'use_loco' in start_vars.keys() and self.mapping_method == "gemma": diff --git a/wqflask/wqflask/marker_regression/rqtl_mapping.py b/wqflask/wqflask/marker_regression/rqtl_mapping.py index aae8e602..e1aa290b 100644 --- a/wqflask/wqflask/marker_regression/rqtl_mapping.py +++ b/wqflask/wqflask/marker_regression/rqtl_mapping.py @@ -36,7 +36,10 @@ def run_rqtl_geno(vals, samples, dataset, method, model, permCheck, num_perm, pe generate_cross_from_geno(dataset) GENOtoCSVR = ro.r["GENOtoCSVR"] # Map the local GENOtoCSVR function crossfilelocation = TMPDIR + crossname + ".cross" - genofilelocation = locate(dataset.group.genofile, "genotype") + if dataset.group.genofile: + genofilelocation = locate(dataset.group.genofile, "genotype") + else: + genofilelocation = locate(dataset.group.name + ".geno", "genotype") cross_object = GENOtoCSVR(genofilelocation, crossfilelocation) # TODO: Add the SEX if that is available if manhattan_plot: @@ -91,9 +94,11 @@ def run_rqtl_geno(vals, samples, dataset, method, model, permCheck, num_perm, pe perm_data_frame = scanone(cross_object, pheno_col = "the_pheno", n_perm = num_perm, model=model, method=method) perm_output, suggestive, significant = process_rqtl_perm_results(num_perm, perm_data_frame) # Functions that sets the thresholds for the webinterface - return perm_output, suggestive, significant, process_rqtl_results(result_data_frame, dataset.group.species) + the_scale = check_mapping_scale(genofilelocation) + return perm_output, suggestive, significant, process_rqtl_results(result_data_frame, dataset.group.species), the_scale else: - return process_rqtl_results(result_data_frame, dataset.group.species) + the_scale = check_mapping_scale(genofilelocation) + return process_rqtl_results(result_data_frame, dataset.group.species), the_scale def generate_cross_from_rdata(dataset): rdata_location = locate(dataset.group.name + ".RData", "genotype/rdata") @@ -286,4 +291,20 @@ def process_rqtl_results(result, species_name): # TODO: how to make this marker['lod_score'] = output[i][2] qtl_results.append(marker) - return qtl_results
\ No newline at end of file + return qtl_results + +def check_mapping_scale(genofile_location): + scale = "physic" + with open(genofile_location, "r") as geno_fh: + for line in geno_fh: + if line[0] == "@" or line[0] == "#": + + if "@scale" in line: + scale = line.split(":")[1].strip() + break + else: + continue + else: + break + + return scale
\ No newline at end of file diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py index e191902c..589be702 100644 --- a/wqflask/wqflask/marker_regression/run_mapping.py +++ b/wqflask/wqflask/marker_regression/run_mapping.py @@ -150,6 +150,10 @@ class RunMapping(object): self.suggestive = "" self.significant = "" self.pair_scan = False # Initializing this since it is checked in views to determine which template to use + if 'transform' in start_vars: + self.transform = start_vars['transform'] + else: + self.transform = "" self.score_type = "LRS" #ZS: LRS or LOD self.mapping_scale = "physic" self.num_perm = 0 @@ -241,7 +245,6 @@ class RunMapping(object): perm_strata = get_perm_strata(self.this_trait, primary_samples, self.categorical_vars, self.samples) self.score_type = "LOD" - #self.mapping_scale = "morgan" self.control_marker = start_vars['control_marker'] self.do_control = start_vars['do_control'] if 'mapmethod_rqtl_geno' in start_vars: @@ -252,9 +255,9 @@ class RunMapping(object): #if start_vars['pair_scan'] == "true": # self.pair_scan = True if self.permCheck and self.num_perm > 0: - self.perm_output, self.suggestive, self.significant, results = rqtl_mapping.run_rqtl_geno(self.vals, self.samples, self.dataset, self.method, self.model, self.permCheck, self.num_perm, perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.pair_scan, self.covariates) + self.perm_output, self.suggestive, self.significant, results, self.mapping_scale = rqtl_mapping.run_rqtl_geno(self.vals, self.samples, self.dataset, self.method, self.model, self.permCheck, self.num_perm, perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.pair_scan, self.covariates) else: - results = rqtl_mapping.run_rqtl_geno(self.vals, self.samples, self.dataset, self.method, self.model, self.permCheck, self.num_perm, perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.pair_scan, self.covariates) + results, self.mapping_scale = rqtl_mapping.run_rqtl_geno(self.vals, self.samples, self.dataset, self.method, self.model, self.permCheck, self.num_perm, perm_strata, self.do_control, self.control_marker, self.manhattan_plot, self.pair_scan, self.covariates) elif self.mapping_method == "reaper": if "startMb" in start_vars: #ZS: Check if first time page loaded, so it can default to ON if "additiveCheck" in start_vars: diff --git a/wqflask/wqflask/network_graph/network_graph.py b/wqflask/wqflask/network_graph/network_graph.py index a332db46..152e4168 100644 --- a/wqflask/wqflask/network_graph/network_graph.py +++ b/wqflask/wqflask/network_graph/network_graph.py @@ -47,6 +47,7 @@ from utility.TDCell import TDCell from base.trait import GeneralTrait from base import data_set from utility import webqtlUtil, helper_functions, corr_result_helpers +from utility.tools import GN2_BRANCH_URL from db import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. from wqflask.correlation import correlation_functions @@ -195,6 +196,7 @@ class NetworkGraph(object): self.nodes_list.append(node_dict) self.elements = json.dumps(self.nodes_list + self.edges_list) + self.gn2_url = GN2_BRANCH_URL groups = [] for sample in self.all_sample_list: diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index 698389ab..8f702d58 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -28,6 +28,7 @@ from flask import render_template, Flask, g from utility import formatting from utility import hmac +from utility.tools import GN2_BASE_URL from utility.type_checking import is_float, is_int, is_str, get_float, get_int, get_string from utility.logger import getLogger @@ -295,7 +296,7 @@ def get_aliases(symbol_list, species): symbols_string = ",".join(updated_symbols) filtered_aliases = [] - response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases2/" + symbols_string) + response = requests.get(GN2_BASE_URL + "/gn3/gene/aliases2/" + symbols_string) if response: alias_lists = json.loads(response.content) seen = set() diff --git a/wqflask/wqflask/static/new/javascript/ctl_graph.js b/wqflask/wqflask/static/new/javascript/ctl_graph.js index 94bd7e9d..bd950592 100644 --- a/wqflask/wqflask/static/new/javascript/ctl_graph.js +++ b/wqflask/wqflask/static/new/javascript/ctl_graph.js @@ -82,18 +82,12 @@ window.onload=function() { function create_qtips(cy){ cy.nodes().qtip({ content: function(){ - gn_link = '<b>'+'<a href="http://gn2.genenetwork.org/show_trait?trait_id=' + this.data().sid + '&dataset=' + this.data().dataset + '" >'+this.data().id +'</a>'+'</b><br>' + gn_link = '<b>'+'<a href="' + gn2_url + '/show_trait?trait_id=' + this.data().sid + '&dataset=' + this.data().dataset + '" >'+this.data().id +'</a>'+'</b><br>' ncbi_link = '<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=' + this.data().geneid + '" >NCBI<a>'+'<br>' omim_link = '<a href="http://www.ncbi.nlm.nih.gov/omim/' + this.data().omim + '" >OMIM<a>'+'<br>' qtip_content = gn_link + ncbi_link + omim_link return qtip_content - //return '<b>'+'<a href="http://gn2.genenetwork.org/show_trait?trait_id=' + this.data().id + '&dataset=' + this.data().dataset + '" >'+this.data().id +'<a>'+'</b>' }, - // content: { - // title: '<b>'+'<a href="http://gn2.genenetwork.org/show_trait?trait_id=' + this.target() + '&dataset=' + this.dataset() + '" >'+this.target() +'<a>'+'</b>', - // text: this.target, - // button: true - // }, position: { my: 'top center', at: 'bottom center' diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json index 4eb43144..2699afdc 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json +++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json @@ -1930,6 +1930,7 @@ ] }, "HCP": { +<<<<<<< HEAD "Phenotypes": [ [ "None", @@ -2116,6 +2117,233 @@ ] }, "TIGEM-Retina-RNA-Seq": { +======= +>>>>>>> penguin2 + "Phenotypes": [ + [ + "None", + "HCPPublish", + "HCP Private Phenotypes" + ] + ] + }, + "HLC": { + "Liver mRNA": [ + [ + "320", + "HLC_0311", + "GSE9588 Human Liver Normal (Mar11) Both Sexes" + ], + [ + "384", + "HLCF_0311", + "GSE9588 Human Liver Normal (Mar11) Females" + ], + [ + "383", + "HLCM_0311", + "GSE9588 Human Liver Normal (Mar11) Males" + ] + ], + "Phenotypes": [ + [ + "635", + "HLCPublish", + "HLC Published Phenotypes" + ] + ] +<<<<<<< HEAD + } + }, + "macaque monkey": { + "Macaca-fasicularis": { + "Amygdala mRNA": [ + [ + "255", + "INIA_MacFas_AMG_RMA_0110", + "INIA Macaca fasicularis Amygdala (Jan10) RMA" + ] + ], + "Brain mRNA": [ + [ + "251", + "INIA_MacFas_brain_RMA_0110", + "INIA Macaca fasicularis Brain (Jan10) RMA" + ] + ], + "Hippocampus mRNA": [ + [ + "254", + "INIA_MacFas_Hc_RMA_0110", + "INIA Macaca fasicularis Hippocampus (Jan10) RMA" + ] + ], + "Nucleus Accumbens mRNA": [ + [ + "253", + "INIA_MacFas_Ac_RMA_0110", + "INIA Macaca fasicularis Nucleus Accumbens (Jan10) RMA" + ] + ], + "Prefrontal Cortex mRNA": [ + [ + "252", + "INIA_MacFas_Pf_RMA_0110", + "INIA Macaca fasicularis Prefrontal Cortex (Jan10) RMA" +======= + }, + "HLT": { + "Lung mRNA": [ + [ + "455", + "GSE23546HLT0613", + "Super Series GSE23546 Whole-Genome GXD Non-Tumorous Human Lung Tissues Affy HuRSTA array (Jun11) RMA" + ], + [ + "454", + "GRNG-GSE23545HLT0613", + "GRNG/GSE23545 Whole-Genome GXD Non-Tumorous Human Lung Tissues Affy HuRSTA array (Jun11) RMA" + ] + ] + }, + "HSB": { + "Amygdala mRNA": [ + [ + "330", + "KIN_YSM_AMY_0711", + "GN330 Human Amygdala Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Cerebellar Cortex mRNA": [ + [ + "331", + "KIN_YSM_CBC_0711", + "Human Cerebellar Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Dorsolateral Prefrontal Cortex mRNA": [ + [ + "333", + "KIN_YSM_DFC_0711", + "Human Dorsolateral Prefrontal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Hippocampus mRNA": [ + [ + "337", + "KIN_YSM_HIP_0711", + "Human Hippocampus Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Inferior Temporal Cortex mRNA": [ + [ + "339", + "KIN_YSM_ITC_0711", + "Human Inferior Temporal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Medial Prefrontal Cortex mRNA": [ + [ + "343", + "KIN_YSM_MFC_0711", + "Human Medial Prefrontal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Mediodorsal Nucleus of Thalamus mRNA": [ + [ + "342", + "KIN_YSM_MD_0711", + "Human Mediodorsal Nucleus of Thalamus Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Orbital Prefrontal Cortex mRNA": [ + [ + "347", + "KIN_YSM_OFC_0711", + "Human Orbital Prefrontal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Phenotypes": [ + [ + "None", + "HSBPublish", + "HSB Published Phenotypes" + ] + ], + "Posterior Inferior Parietal Cortex mRNA": [ + [ + "338", + "KIN_YSM_IPC_0711", + "Human Posterior Inferior Parietal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Posterior Superior Temporal Cortex mRNA": [ + [ + "350", + "KIN_YSM_STC_0711", + "Human Posterior Superior Temporal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Primary Auditory (A1) Cortex mRNA": [ + [ + "329", + "KIN_YSM_A1C_0711", + "Human Primary Auditory (A1) Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Primary Motor (M1) Cortex mRNA": [ + [ + "341", + "KIN_YSM_M1C_0711", + "Human Primary Motor (M1) Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Primary Somatosensory (S1) Cortex mRNA": [ + [ + "349", + "KIN_YSM_S1C_0711", + "Human Primary Somatosensory (S1) Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Primary Visual Cortex mRNA": [ + [ + "354", + "KIN_YSM_V1C_0711", + "Human Primary Visual Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Striatum mRNA": [ + [ + "351", + "KIN_YSM_STR_0711", + "Human Striatum Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ], + "Ventrolateral Prefrontal Cortex mRNA": [ + [ + "356", + "KIN_YSM_VFC_0711", + "Human Ventrolateral Prefrontal Cortex Affy Hu-Exon 1.0 ST (Jul11) Quantile" + ] + ] + }, + "Islets-Gerling": { + "Islets mRNA": [ + [ + "824", + "UTHSC_HuIslets_Mar17", + "UTHSC Human Islets Affy Human Gene 2.0 ST (Mar17) RMA" + ] + ], + "Phenotypes": [ + [ + "None", + "Islets-GerlingPublish", + "Islets-Gerling Phenotypes" + ] + ] + }, + "TIGEM-Retina-RNA-Seq": { "Phenotypes": [ [ "None", @@ -2128,6 +2356,7 @@ "802", "TIGEM_hg38_ret_rna-seq_0916", "TIGEM Human Retina RNA-Seq (Sep16) RPKM log2" +>>>>>>> penguin2 ] ] } @@ -3832,6 +4061,7 @@ "135", "VCUSal_1206_R", "VCU BXD PFC Sal M430 2.0 (Dec06) RMA" +<<<<<<< HEAD ], [ "136", @@ -3874,6 +4104,50 @@ "VCU BXD PFC CIE EtOH M430 2.0 (Jan11) RMA" ], [ +======= + ], + [ + "136", + "VCUEtOH_1206_R", + "VCU BXD PFC EtOH M430 2.0 (Dec06) RMA" + ], + [ + "137", + "VCUSal_1006_R", + "VCU BXD PFC Et vs Sal M430 2.0 (Dec06) Sscore" + ], + [ + "788", + "VCU_BXD_PFC_CIE_Air_0416", + "VCU BXD PFC CIE Air Masked ComBat M430 2.0 (Apr16) RMA" + ], + [ + "789", + "VCU_BXD_PFC_CIE_AirZ_0416", + "VCU BXD PFC CIE Air Masked ComBat M430 2.0 (Apr16) RMA Z-score" + ], + [ + "790", + "VCU_BXD_PFC_CIE_Et_0416", + "VCU BXD PFC CIE EtOH Masked ComBat M430 2.0 (Apr16) RMA" + ], + [ + "791", + "VCU_BXD_PFC_CIE_EtZ_0416", + "VCU BXD PFC CIE EtOH Masked ComBat M430 2.0 (Apr16) RMA Z-score" + ], + [ + "299", + "VCU_PF_AvE_0111_Ss", + "VCU BXD PFC EtOH vs CIE Air M430 2.0 (Jan11) Sscore*" + ], + [ + "300", + "VCU_PF_Et_0111_R", + "VCU BXD PFC CIE EtOH M430 2.0 (Jan11) RMA" + ], + [ +>>>>>>> penguin2 "301", "VCU_PF_Air_0111_R", "VCU BXD PFC CIE Air M430 2.0 (Jan11) RMA" @@ -5133,6 +5407,23 @@ "HSNIH-Rat-PL-RSeq-0818", "HSNIH-Palmer Prelimbic Cortex RNA-Seq (Aug18) rlog" ] + ], + "Prefrontal Cortex mRNA": [ + [ + "864", + "HSNIH-Rat-VoLo-RSeq-0818", + "HSNIH-Palmer Orbitofrontal Cortex RNA-Seq (Aug18) rlog" + ], + [ + "863", + "HSNIH-Rat-PL-RSeq-0818", + "HSNIH-Palmer Prelimbic Cortex RNA-Seq (Aug18) rlog" + ], + [ + "861", + "HSNIH-Rat-IL-RSeq-0818", + "HSNIH-Palmer Infralimbic Cortex RNA-Seq (Aug18) rlog" + ] ] }, "HSNIH-RGSMC": { @@ -5395,6 +5686,16 @@ "TIGEM-Retina-RNA-Seq", "Retina: Normal Adult Gene Expression, RNA-Seq (TIGEM)", "Family:None" +<<<<<<< HEAD + ] + ], + "macaque monkey": [ + [ + "Macaca-fasicularis", + "Macaca fasicularis (Cynomolgus monkey)", + "Family:None" +======= +>>>>>>> penguin2 ] ], "mouse": [ @@ -5432,6 +5733,7 @@ "LXS", "ILSXISS (LXS) Family", "Family:Reference Populations" +<<<<<<< HEAD ], [ "MDP", @@ -5599,6 +5901,175 @@ "Family:Non-genetic Cohort" ], [ +======= + ], + [ + "MDP", + "Mouse Diversity Panel", + "Family:Reference Populations" + ], + [ + "B6D2RI", + "BXD Aged Hippocampus", + "Family:BXD Individual Data" + ], + [ + "BXD-Bone", + "BXD Bone Individual Data", + "Family:BXD Individual Data" + ], + [ + "DOD-BXD-GWI", + "BXD DOD Gulf War Illness", + "Family:BXD Individual Data" + ], + [ + "BXD-Harvested", + "BXD NIA Longevity Study", + "Family:BXD Individual Data" + ], + [ + "UTHSC-Cannabinoid", + "BXD UTHSC Cannabinoid Pilot", + "Family:BXD Individual Data" + ], + [ + "B6BTBRF2", + "B6BTBRF2", + "Family:Crosses, AIL, HS" + ], + [ + "BHHBF2", + "B6C3HF2 UCLA Metabolism", + "Family:Crosses, AIL, HS" + ], + [ + "BHF2", + "B6C3HF2(APOE-) UCLA Metabolism", + "Family:Crosses, AIL, HS" + ], + [ + "Linsenbardt-Boehm", + "B6D2 EtOH Selected Advanced Intercross", + "Family:Crosses, AIL, HS" + ], + [ + "B6D2F2", + "B6D2F2 OHSU Brain", + "Family:Crosses, AIL, HS" + ], + [ + "BDF2-2005", + "B6D2F2 OHSU Striatum", + "Family:Crosses, AIL, HS" + ], + [ + "B6D2F2-PSU", + "B6D2F2 PSU Muscle", + "Family:Crosses, AIL, HS" + ], + [ + "BDF2-1999", + "B6D2F2 UCLA Liver", + "Family:Crosses, AIL, HS" + ], + [ + "CTB6F2", + "CastB6/B6Cast F2 UCLA", + "Family:Crosses, AIL, HS" + ], + [ + "CFW", + "CFW Outbred GWAS", + "Family:Crosses, AIL, HS" + ], + [ + "HET3-ITP", + "HET3 ITP Longevity", + "Family:Crosses, AIL, HS" + ], + [ + "HS", + "Heterogeneous Stock", + "Family:Crosses, AIL, HS" + ], + [ + "HS-CC", + "Heterogeneous Stock Collaborative Cross", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AI-G34_39-43-GBS", + "LGSM AI G34 G39-43 Palmer (GBS)", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AI-G34-A", + "LGSM AI G34 Palmer (Array)", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AI-G34-GBS", + "LGSM AI G34 Palmer (GBS)", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AIG34_50-56-GBS", + "LGSM AI G34/50-56 Lionikas (GBS)", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AI-G39-43-GBS", + "LGSM AI G39-43 Palmer (GBS)", + "Family:Crosses, AIL, HS" + ], + [ + "LGSM-AI", + "LGSM AI Palmer", + "Family:Crosses, AIL, HS" + ], + [ + "SOTNOT-OHSU", + "SOTNOT-OHSU", + "Family:Crosses, AIL, HS" + ], + [ + "B6-Lens", + "B6 Lens", + "Family:Non-genetic Cohort" + ], + [ + "CIE-INIA", + "Chronic Intermittent Ethanol Phase 1", + "Family:Non-genetic Cohort" + ], + [ + "CIE-RMA", + "Chronic Intermittent Ethanol Phase 2", + "Family:Non-genetic Cohort" + ], + [ + "CMS", + "Chronic Mild Stress", + "Family:Non-genetic Cohort" + ], + [ + "D2GM", + "D2 Glaucoma Model", + "Family:Non-genetic Cohort" + ], + [ + "JAX-D2-Mono-RNA-Seq", + "D2 Glaucoma Monocyte JAX", + "Family:Non-genetic Cohort" + ], + [ + "EMSR", + "Ethanol-Medicated Stress Reduction", + "Family:Non-genetic Cohort" + ], + [ +>>>>>>> penguin2 "B6D2", "Glaucoma and Aged Retina UTHSC", "Family:Non-genetic Cohort" @@ -5684,6 +6155,10 @@ "Human (hg19)" ], [ + "macaque monkey", + "Macaque monkey" + ], + [ "mouse", "Mouse (mm10)" ], @@ -6607,6 +7082,33 @@ ] ] }, +<<<<<<< HEAD + "macaque monkey": { + "Macaca-fasicularis": [ + [ + "Amygdala mRNA", + "Amygdala mRNA" + ], + [ + "Brain mRNA", + "Brain mRNA" + ], + [ + "Hippocampus mRNA", + "Hippocampus mRNA" + ], + [ + "Nucleus Accumbens mRNA", + "Nucleus Accumbens mRNA" + ], + [ + "Prefrontal Cortex mRNA", + "Prefrontal Cortex mRNA" + ] + ] + }, +======= +>>>>>>> penguin2 "mouse": { "AKXD": [ [ @@ -7490,4 +7992,4 @@ ] } } -}
\ No newline at end of file +} diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js index fad600d2..ee7be68c 100644 --- a/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js +++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu_orig.js @@ -6,6 +6,7 @@ process_json = function(data) { return apply_default(); } }; + $.ajax('/api/v_pre1/gen_dropdown', { dataType: 'json', success: process_json @@ -74,7 +75,6 @@ redo_dropdown = function(dropdown, items) { this_opt_group = null for (_i = 0, _len = group_family_list.length; _i < _len; _i++) { item = group_family_list[_i]; - console.log("THE ITEM:", item) if (item[2] != "None" && current_family == ""){ current_family = item[2] this_opt_group = $("<optgroup label=\"" + item[2] + "\">") diff --git a/wqflask/wqflask/static/new/javascript/network_graph.js b/wqflask/wqflask/static/new/javascript/network_graph.js index 4d507a18..02c3b817 100644 --- a/wqflask/wqflask/static/new/javascript/network_graph.js +++ b/wqflask/wqflask/static/new/javascript/network_graph.js @@ -85,7 +85,7 @@ window.onload=function() { cy.nodes().qtip({ content: function(){ qtip_content = '' - gn_link = '<b>'+'<a href="http://gn2.genenetwork.org/show_trait?trait_id=' + this.data().id.split(":")[0] + '&dataset=' + this.data().id.split(":")[1] + '" >'+this.data().id +'</a>'+'</b><br>' + gn_link = '<b>'+'<a href="' + gn2_url + '/show_trait?trait_id=' + this.data().id.split(":")[0] + '&dataset=' + this.data().id.split(":")[1] + '" >'+this.data().id +'</a>'+'</b><br>' qtip_content += gn_link if (typeof(this.data().geneid) !== 'undefined'){ ncbi_link = '<a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=' + this.data().geneid + '" >NCBI<a>'+'<br>' @@ -115,7 +115,7 @@ window.onload=function() { correlation_line = '<b>Sample r: ' + this.data().correlation + '</b><br>' p_value_line = 'Sample p(r): ' + this.data().p_value + '<br>' overlap_line = 'Overlap: ' + this.data().overlap + '<br>' - scatter_plot = '<a href="http://gn2-zach.genenetwork.org/corr_scatter_plot?dataset_1=' + this.data().source.split(":")[1] + '&dataset_2=' + this.data().target.split(":")[1] + '&trait_1=' + this.data().source.split(":")[0] + '&trait_2=' + this.data().target.split(":")[0] + '" >View Scatterplot</a>' + scatter_plot = '<a href="' + gn2_url + '/corr_scatter_plot?dataset_1=' + this.data().source.split(":")[1] + '&dataset_2=' + this.data().target.split(":")[1] + '&trait_1=' + this.data().source.split(":")[0] + '&trait_2=' + this.data().target.split(":")[0] + '" >View Scatterplot</a>' return correlation_line + p_value_line + overlap_line + scatter_plot }, position: { diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js index 28d13345..d94a2347 100644 --- a/wqflask/wqflask/static/new/javascript/show_trait.js +++ b/wqflask/wqflask/static/new/javascript/show_trait.js @@ -367,6 +367,8 @@ make_table = function() { var header, key, row, row_line, table, the_id, the_rows, value, _i, _len, _ref, _ref1; if (js_data.trait_symbol != null) { header = "<thead><tr><th style=\"color: white; background-color: #369; text-align: center;\" colspan=\"100%\">Trait " + js_data.trait_id + " - " + js_data.trait_symbol + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>"; + } else if (js_data.dataset_type == "Geno"){ + header = "<thead><tr><th style=\"color: white; background-color: #369; text-align: center;\" colspan=\"100%\">Marker " + js_data.trait_id + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>"; } else { header = "<thead><tr><th style=\"color: white; background-color: #369; text-align: center;\" colspan=\"100%\">Trait " + js_data.trait_id + ": " + js_data.short_description + "</th></tr><tr><th style=\"text-align: right; padding-left: 5px;\">Statistic</th>"; } diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index abe14831..07c1b48e 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -134,13 +134,15 @@ This site is currently operated by <a href="mailto:rwilliams@uthsc.edu">Rob Williams</a>, <a href="http://thebird.nl/">Pjotr Prins</a>, + <a href="http://www.senresearch.org">Saunak Sen</a>, <a href="mailto:zachary.a.sloan@gmail.com">Zachary Sloan</a>, <a href="mailto:acenteno@uthsc.edu">Arthur Centeno</a>, and <a href="mailto:cfische7@uthsc.edu">Christian Fischer</a>. </p> <p>Design and code by Pjotr Prins, Zach Sloan, Arthur Centeno, Christan Fischer, Danny Arends, Sam Ockman, Lei Yan, Xiaodong Zhou, Christian Fernandez, - Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, and Robert W. Williams, - <a href="http://genenetwork.org/credit.html">colleagues</a>.</p> + Ning Liu, Rudi Alberts, Elissa Chesler, Sujoy Roy, Evan G. Williams, Alexander G. Williams, Kenneth Manly, Jintao Wang, Robert W. Williams, and + <!--<a href="http://genenetwork.org/credit.html">colleagues</a>.</p>--> + <a href="/credits">colleagues</a>.</p> <br /> <p>GeneNetwork support from:</p> <ul> diff --git a/wqflask/wqflask/templates/credits.html b/wqflask/wqflask/templates/credits.html new file mode 100644 index 00000000..95c424cc --- /dev/null +++ b/wqflask/wqflask/templates/credits.html @@ -0,0 +1,55 @@ +{% extends "base.html" %} +{% block title %}Credit{% endblock %} +{% block content %} + +<Table width= "100%" cellSpacing=0 cellPadding=5><TR> +<!-- Body Start from Here --> +<TD valign="top" height="200" width="100%"> + <P class="title"><H2>Web site design and coding</H2></P> + <UL> +<LI> <A HREF="mailto:rwilliams@uthsc.edu">Robert W Williams</a> +<LI>Kenneth Manly (design and QTL mapping, 1995-2007) +<LI>Jintao Wang (lead programmer, 2001–2006) +<LI><a href="http://www.nervenet.org/main/people.html">Arthur G. Centeno (IT Analyst III, 2001–present)</a> +<LI><a href="http://www.nervenet.org/main/people.html">Zachary Sloan (IT Analyst III, 2009–present)</a> +<LI><a href="http://www.nervenet.org/main/people.html">Lei Yan (systems and web services interface 2008-2018)</a> +<LI><a href="http://www.nervenet.org/main/people.html">Xusheng Wang (data analysis, 2008-2012)</a> +<LI><a href="http://www.nervenet.org/main/people.html">Xiaodong Zhou (lead programmer 2009–2011)</a> +<LI>Ning Liu (programmer 2008–2009)</LI> +<LI>Zhaohui Sun (SNP browser, programmer 2007) +<LI>Yanhua Qu (data entry, 2005-2008) +<LI>Stephen Pitts (programmer) +<LI>Hongqiang Li (lead programmer, 2007-2009) +<LI><A HREF="http://www.jax.org/news/archives/2009/chesler.html">Elissa Chesler</A> (design of QTL Heat Map, Compare Correlations, 2004-2006) +<LI>Kevitt Adler (systems, 2006-2008) +<LI>Robert Crowell (SNP Browser, 2006-2007) +<LI>David Crowell (partial correlations, 2008-2009) +<LI>Evan G. Williams (SNP and Variant Browser, data entry, 2004-2006) +<LI>Alex G Williams (QTL Maps GUI, 2003-2006) + </UL> + <P class="title"><H2>Published and Unpublished Phenotype Data</H2></P> + <UL> + <LI><A HREF="http://www.nervenet.org/people/lulu_cv.html">Lu Lu</A> + <LI> <A HREF="http://www.jax.org/news/archives/2009/chesler.html">Elissa J. Chesler</A> + <LI><a href="http://www.ohsu.edu/som-BehNeuro/Faculty/Crabbe.html">John C Crabbe</a>, OHSU + <LI><a href="http://www.ohsu.edu/som-BehNeuro/Faculty/Belknap.html">John K Belknap</a>, OHSU + <LI>Mary-Kathleen Sullivan + <LI>Emily English + <LI>Byron Jones + <LI>Ryan McNieve + <LI>Nathan Copeland + </UL> + <P class="title"><H2>Genotype / Genomic Data</H2></P> + <UL> + <LI> <A HREF="http://www.nervenet.org/people/lulu_cv.html">Lu Lu</A> + <LI><a href="http://www.nervenet.org/people/Gu_cv.html">Jing Gu</a> + <LI>Shuhua Qi + <LI>John Hogenesch + <LI>Timothy Wiltshire + <LI><a href="http://www.nervenet.org/people/Yanhua_cv.html">Yanhua Qu</a> + </UL> + <P></P> +</TD> +</TR></TABLE> + +{% endblock %} diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html index d85075a9..0108d93a 100644 --- a/wqflask/wqflask/templates/ctl_results.html +++ b/wqflask/wqflask/templates/ctl_results.html @@ -61,6 +61,7 @@ <script> elements_list = {{ elements | safe }} + gn2_url = "{{ gn2_url | safe }}" </script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script> diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index 0116245d..f8720d39 100644 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -219,9 +219,9 @@ <h3>GN1 Mirror and development sites</h3> <ul> - <li><a href="http://www.genenetwork.org/">Main GN1 site at UTHSC</a> (main site)</li> + <li><a href="http://gn1.genenetwork.org/">Main GN1 site at UTHSC</a> (main site)</li> <li><a href="http://genenetwork.helmholtz-hzi.de/">Germany at the HZI</a></li> - <li><a href="http://gn2.genenetwork.org/">Memphis at the U of M</a></li> + <li><a href="http://genenetwork.org/">Memphis at the U of M</a></li> </ul> </section> diff --git a/wqflask/wqflask/templates/index_page_orig.html b/wqflask/wqflask/templates/index_page_orig.html index 963531cb..06b71f53 100755 --- a/wqflask/wqflask/templates/index_page_orig.html +++ b/wqflask/wqflask/templates/index_page_orig.html @@ -254,8 +254,8 @@ </div> <h3>GeneNetwork v2:</h3> <ul> - <li><a href="http://gn2.genenetwork.org/">Main website</a> at UTHSC</li> - <!--<li><a href="http://test-gn2.genenetwork.org/">Testing website</a> at UTHSC</li>--> + <li><a href="http://genenetwork.org/">Main website</a> at UTHSC</li> + <!--<li><a href="http://test-genenetwork.org/">Testing website</a> at UTHSC</li>--> </ul> <h3>GeneNetwork v1:</h3> <ul> diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html index ba0ebef9..7e05be18 100644 --- a/wqflask/wqflask/templates/mapping_results.html +++ b/wqflask/wqflask/templates/mapping_results.html @@ -36,7 +36,7 @@ <input type="hidden" name="value:{{ sample }}" value="{{ vals[loop.index - 1] }}"> {% endfor %} <input type="hidden" name="num_vals" value="{{ n_samples }}"> - <input type="hidden" name="maf"> + <input type="hidden" name="maf" value="{{ maf }}"> <input type="hidden" name="use_loco" value="{{ use_loco }}"> <input type="hidden" name="selected_chr" value="{{ selectedChr }}"> <input type="hidden" name="manhattan_plot" value="{{ manhattan_plot }}"> @@ -45,10 +45,14 @@ <input type="hidden" name="num_bootstrap" value="{{ nboot }}"> <input type="hidden" name="do_control" value="{{ doControl }}"> <input type="hidden" name="control_marker" value="{{ controlLocus }}"> - <input type="hidden" name="covariates" values="{{ covariates }}"> + <input type="hidden" name="covariates" value="{{ covariates }}"> <input type="hidden" name="mapmethod_rqtl_geno" value="{{ mapmethod_rqtl_geno }}"> <input type="hidden" name="mapmodel_rqtl_geno" value="{{ mapmodel_rqtl_geno }}"> <input type="hidden" name="pair_scan" value="{{ pair_scan }}"> + <input type="hidden" name="transform" value="{{ transform }}"> + <input type="hidden" name="tool_used" value="Mapping"> + <input type="hidden" name="wanted_inputs" value=""> + <input type="hidden" name="form_url" value="/run_mapping"> <div class="container"> <div class="col-xs-5"> @@ -422,11 +426,19 @@ }); + var mapping_input_list = ['temp_uuid', 'trait_id', 'dataset', 'tool_used', 'form_url', 'method', 'transform', 'trimmed_markers', 'selected_chr', 'chromosomes', 'mapping_scale', + 'score_type', 'suggestive', 'significant', 'num_perm', 'permCheck', 'perm_output', 'perm_strata', 'categorical_vars', 'num_bootstrap', 'bootCheck', 'bootstrap_results', + 'LRSCheck', 'covariates', 'maf', 'use_loco', 'manhattan_plot', 'control_marker', 'control_marker_db', 'do_control', 'genofile', + 'pair_scan', 'startMb', 'endMb', 'graphWidth', 'lrsMax', 'additiveCheck', 'showSNP', 'showGenes', 'viewLegend', 'haplotypeAnalystCheck', + 'mapmethod_rqtl_geno', 'mapmodel_rqtl_geno', 'temp_trait', 'group', 'species', 'reaper_version', 'primary_samples', 'num_vals'] + + $('input[name=wanted_inputs]').val(mapping_input_list.join(",")); + chrView = function(this_chr, chr_mb_list) { $('input[name=selected_chr]').val(this_chr) $('input[name=chr_mb_list]').val(chr_mb_list) - $('#marker_regression_form').attr('action', '/run_mapping'); + $('#marker_regression_form').attr('action', '/loading'); return $('#marker_regression_form').submit(); }; @@ -436,13 +448,13 @@ $('input[name=endMb]').val(end_mb) //$('input[name=mb_range]').val(start_mb + "," + end_mb) - $('#marker_regression_form').attr('action', '/run_mapping'); + $('#marker_regression_form').attr('action', '/loading'); return $('#marker_regression_form').submit(); }; remap = function() { $('input[name=selected_chr]').val($('select[name=chromosomes]').val()); - $('#marker_regression_form').attr('action', '/run_mapping'); + $('#marker_regression_form').attr('action', '/loading'); return $('#marker_regression_form').submit(); }; diff --git a/wqflask/wqflask/templates/network_graph.html b/wqflask/wqflask/templates/network_graph.html index 4492dd3f..25af7bb1 100644 --- a/wqflask/wqflask/templates/network_graph.html +++ b/wqflask/wqflask/templates/network_graph.html @@ -137,6 +137,7 @@ <script> elements_list = {{ elements | safe }} + gn2_url = "{{ gn2_url | safe }}" </script> <script language="javascript" type="text/javascript" src="/static/new/packages/DataTables/js/jquery.js"></script> diff --git a/wqflask/wqflask/templates/show_trait_mapping_tools.html b/wqflask/wqflask/templates/show_trait_mapping_tools.html index 777d4a2d..777d4a2d 100644..100755 --- a/wqflask/wqflask/templates/show_trait_mapping_tools.html +++ b/wqflask/wqflask/templates/show_trait_mapping_tools.html diff --git a/wqflask/wqflask/user_login.py b/wqflask/wqflask/user_login.py index 40d9925c..edd272c2 100644 --- a/wqflask/wqflask/user_login.py +++ b/wqflask/wqflask/user_login.py @@ -42,9 +42,6 @@ def basic_info(): user_agent = request.headers.get('User-Agent')) def encode_password(pass_gen_fields, unencrypted_password): - logger.debug("THE TYPE:", type(pass_gen_fields)) - logger.debug("pass_gen_fields:", pass_gen_fields) - logger.debug("hashfunc:", pass_gen_fields['hashfunc']) hashfunc = getattr(hashlib, pass_gen_fields['hashfunc']) salt = base64.b64decode(pass_gen_fields['salt']) diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index ef295b5b..44752246 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -306,6 +306,12 @@ def tutorials(): #return render_template("docs.html", **doc.__dict__) return render_template("tutorials.html") +@app.route("/credits") +def credits(): + #doc = docs.Docs("links", request.args) + #return render_template("docs.html", **doc.__dict__) + return render_template("credits.html") + @app.route("/environments") def environments(): doc = docs.Docs("environments", request.args) @@ -584,18 +590,23 @@ def loading_page(): if key in wanted or key.startswith(('value:')): start_vars[key] = value - if 'primary_samples' in start_vars: - samples = start_vars['primary_samples'].split(",") - for sample in samples: - value = start_vars.get('value:' + sample) - if value != "x": - num_vals += 1 + if 'num_vals' in start_vars: + num_vals = int(start_vars['num_vals']) + else: + if 'primary_samples' in start_vars: + samples = start_vars['primary_samples'].split(",") + for sample in samples: + value = start_vars.get('value:' + sample) + if value != "x": + num_vals += 1 start_vars['num_vals'] = num_vals + start_vars['wanted_inputs'] = initial_start_vars['wanted_inputs'] start_vars_container['start_vars'] = start_vars else: start_vars_container['start_vars'] = initial_start_vars + rendered_template = render_template("loading.html", **start_vars_container) return rendered_template @@ -659,7 +670,8 @@ def mapping_results_page(): 'mapmodel_rqtl_geno', 'temp_trait', 'reaper_version', - 'num_vals' + 'num_vals', + 'transform' ) start_vars = {} for key, value in initial_start_vars.iteritems(): |