aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.DS_Storebin0 -> 6148 bytes
-rw-r--r--.gitignore1
-rwxr-xr-xgenotype_files/genotypes/HSNIH.geno4
-rw-r--r--wqflask/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-xwqflask/base/data_set.py5
-rwxr-xr-xwqflask/base/mrna_assay_tissue_data.py10
-rwxr-xr-xwqflask/base/webqtlConfig.py2
-rwxr-xr-xwqflask/htmlgen.py14
-rwxr-xr-xwqflask/maintenance/gen_select_dataset.py21
-rw-r--r--wqflask/utility/tools.py2
-rw-r--r--wqflask/wqflask/.DS_Storebin0 -> 6148 bytes
-rwxr-xr-xwqflask/wqflask/correlation_matrix/show_corr_matrix.py51
-rwxr-xr-xwqflask/wqflask/do_search.py5
-rwxr-xr-xwqflask/wqflask/marker_regression/marker_regression.py16
-rw-r--r--wqflask/wqflask/marker_regression/marker_regression_gn1.py2785
-rwxr-xr-xwqflask/wqflask/my_pylmm/data/genofile_parser.py10
-rwxr-xr-xwqflask/wqflask/search_results.py26
-rwxr-xr-xwqflask/wqflask/show_trait/show_trait.py2
-rw-r--r--wqflask/wqflask/static/dbdoc/TODO.md1
-rwxr-xr-xwqflask/wqflask/static/new/css/corr_matrix.css18
-rw-r--r--wqflask/wqflask/static/new/javascript/chr_lod_chart.js19
-rw-r--r--wqflask/wqflask/static/new/javascript/create_lodchart.js4
-rwxr-xr-xwqflask/wqflask/static/new/javascript/dataset_menu_structure.json687
-rw-r--r--wqflask/wqflask/static/new/javascript/dataset_select_menu.js12
-rw-r--r--wqflask/wqflask/static/new/javascript/lod_chart.js13
-rw-r--r--wqflask/wqflask/static/new/javascript/panelutil.js12
-rwxr-xr-xwqflask/wqflask/templates/correlation_matrix.html45
-rwxr-xr-xwqflask/wqflask/templates/correlation_page.html4
-rwxr-xr-xwqflask/wqflask/templates/index_page.html16
-rwxr-xr-xwqflask/wqflask/templates/marker_regression.html14
-rw-r--r--wqflask/wqflask/templates/marker_regression_gn1.html204
-rwxr-xr-xwqflask/wqflask/templates/search_result_page.html74
-rwxr-xr-xwqflask/wqflask/templates/show_trait_details.html2
-rwxr-xr-xwqflask/wqflask/templates/show_trait_statistics_new.html4
-rw-r--r--wqflask/wqflask/templates/wgcna_setup.html66
-rwxr-xr-xwqflask/wqflask/views.py22
36 files changed, 3898 insertions, 273 deletions
diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 00000000..d992942f
--- /dev/null
+++ b/.DS_Store
Binary files differ
diff --git a/.gitignore b/.gitignore
index 1ab1e727..f4693a9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
web/new_genotypes/HSNIH.json
wqflask/secure_server.py
wqflask/base/webqtlConfig.py
+wqflask/output/*
diff --git a/genotype_files/genotypes/HSNIH.geno b/genotype_files/genotypes/HSNIH.geno
index 525f0183..1817e252 100755
--- a/genotype_files/genotypes/HSNIH.geno
+++ b/genotype_files/genotypes/HSNIH.geno
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:550df9276046d5aef116e9ab3dff6a03a137e74ba0c21cc0ae59d1f83e9b9673
-size 22560
+oid sha256:719bbdea26ebc969ce82bb4f668630e179ddb796e9e4095b44a0fa9b7b9da22d
+size 23006
diff --git a/wqflask/.DS_Store b/wqflask/.DS_Store
new file mode 100644
index 00000000..d992942f
--- /dev/null
+++ b/wqflask/.DS_Store
Binary files differ
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index d6a46c2e..5603fe2e 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -158,7 +158,10 @@ class Markers(object):
"""Todo: Build in cacheing so it saves us reading the same file more than once"""
def __init__(self, name):
json_data_fh = open(os.path.join(webqtlConfig.NEWGENODIR + name + '.json'))
- markers = json.load(json_data_fh)
+ try:
+ markers = json.load(json_data_fh)
+ except:
+ markers = []
for marker in markers:
if (marker['chr'] != "X") and (marker['chr'] != "Y"):
diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py
index 54a7ce8e..ba82057a 100755
--- a/wqflask/base/mrna_assay_tissue_data.py
+++ b/wqflask/base/mrna_assay_tissue_data.py
@@ -19,7 +19,7 @@ class MrnaAssayTissueData(object):
if self.gene_symbols == None:
self.gene_symbols = []
- print("self.gene_symbols:", self.gene_symbols)
+ #print("self.gene_symbols:", self.gene_symbols)
self.data = collections.defaultdict(Bunch)
@@ -57,9 +57,15 @@ class MrnaAssayTissueData(object):
results = g.db.execute(query).fetchall()
+ lower_symbols = []
+ for gene_symbol in gene_symbols:
+ if gene_symbol != None:
+ lower_symbols.append(gene_symbol.lower())
+
for result in results:
symbol = result[0]
- if symbol.lower() in [gene_symbol.lower() for gene_symbol in gene_symbols]:
+ #if symbol.lower() in [gene_symbol.lower() for gene_symbol in gene_symbols]:
+ if symbol.lower() in lower_symbols:
#gene_symbols.append(symbol)
symbol = symbol.lower()
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index 330fec56..4f9b3af3 100755
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -55,7 +55,7 @@ COMMON_LIB = GNROOT + 'support/admin'
HTMLPATH = GNROOT + 'genotype_files/'
PYLMM_PATH = '/home/zas1024/plink_gemma/'
SNP_PATH = '/home/zas1024/snps/'
-IMGDIR = GNROOT + '/wqflask/wqflask/images/'
+IMGDIR = GNROOT + '/wqflask/output/'
IMAGESPATH = HTMLPATH + 'images/'
UPLOADPATH = IMAGESPATH + 'upload/'
TMPDIR = '/home/zas1024/tmp/' # Will remove this and dependent items later
diff --git a/wqflask/htmlgen.py b/wqflask/htmlgen.py
deleted file mode 100755
index 8406d925..00000000
--- a/wqflask/htmlgen.py
+++ /dev/null
@@ -1,14 +0,0 @@
-from __future__ import absolute_import, division, print_function
-
-class HTMLgen(object):
- """A redefined HT until we manage to completely eliminate it"""
- def __getattr__(self, name):
- return ""
-
- def Item(self, *args, **kw):
- print("This way of generating html is obsolete!")
- return "foo"
-
- Href = Span = TD = Blockquote = Image = Item
-
-HTMLgen2 = HTMLgen()
diff --git a/wqflask/maintenance/gen_select_dataset.py b/wqflask/maintenance/gen_select_dataset.py
index a2ad8c91..fda46792 100755
--- a/wqflask/maintenance/gen_select_dataset.py
+++ b/wqflask/maintenance/gen_select_dataset.py
@@ -123,12 +123,12 @@ def get_types(groups):
def phenotypes_exist(group_name):
- print("group_name:", group_name)
+ #print("group_name:", group_name)
Cursor.execute("""select Name from PublishFreeze
where PublishFreeze.Name = %s""", (group_name+"Publish"))
results = Cursor.fetchone()
- print("RESULTS:", results)
+ #print("RESULTS:", results)
if results != None:
return True
@@ -136,12 +136,12 @@ def phenotypes_exist(group_name):
return False
def genotypes_exist(group_name):
- print("group_name:", group_name)
+ #print("group_name:", group_name)
Cursor.execute("""select Name from GenoFreeze
where GenoFreeze.Name = %s""", (group_name+"Geno"))
results = Cursor.fetchone()
- print("RESULTS:", results)
+ #print("RESULTS:", results)
if results != None:
return True
@@ -220,7 +220,7 @@ def build_datasets(species, group, type_name):
# and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
# InbredSet.Id and ProbeSetFreeze.public > 0 order by
# ProbeSetFreeze.CreateTime desc""".format(species, group, type_name))
- Cursor.execute("""select ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
+ Cursor.execute("""select ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName from
ProbeSetFreeze, ProbeFreeze, InbredSet, Tissue, Species where
Species.Name = %s and Species.Id = InbredSet.SpeciesId and
InbredSet.Name = %s and
@@ -228,7 +228,16 @@ def build_datasets(species, group, type_name):
and ProbeFreeze.TissueId = Tissue.Id and ProbeFreeze.InbredSetId =
InbredSet.Id and ProbeSetFreeze.public > 0 order by
ProbeSetFreeze.CreateTime desc""", (species, group, type_name))
- return Cursor.fetchall()
+
+ dataset_results = Cursor.fetchall()
+ datasets = []
+ for dataset_info in dataset_results:
+ this_dataset_info = []
+ for info in dataset_info:
+ this_dataset_info.append(str(info))
+ datasets.append(this_dataset_info)
+
+ return datasets
def main():
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 760ded7c..b8a41f60 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -63,7 +63,7 @@ def plink_command(default=None):
else:
None
- guess = os.environ.get('HOME')+'/plink'
+ guess = os.environ.get('HOME')+'/plink_gemma'
path = get_setting('PLINK_PATH',default,guess,get_valid_path)
plink_command = path+'/plink'
return path,plink_command
diff --git a/wqflask/wqflask/.DS_Store b/wqflask/wqflask/.DS_Store
new file mode 100644
index 00000000..a119e235
--- /dev/null
+++ b/wqflask/wqflask/.DS_Store
Binary files differ
diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
index 2cdd989f..6bc0ef77 100755
--- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
+++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py
@@ -95,35 +95,24 @@ class CorrelationMatrix(object):
#self.sample_data[this_trait.name].append('')
self.sample_data.append(this_trait_vals)
+ self.lowest_overlap = 8 #ZS: Variable set to the lowest overlapping samples in order to notify user, or 8, whichever is lower (since 8 is when we want to display warning)
+
self.corr_results = []
- self.corr_results_for_pca = []
+ self.pca_corr_results = []
for trait_db in self.trait_list:
this_trait = trait_db[0]
this_db = trait_db[1]
this_db_samples = this_db.group.samplelist
-
- #for sample in this_db_samples:
- # if sample not in self.samples:
- # self.samples.append(sample)
-
this_sample_data = this_trait.data
- print("this_sample_data", len(this_sample_data))
-
- #for sample in this_sample_data:
- # if sample not in self.all_sample_list:
- # self.all_sample_list.append(sample)
corr_result_row = []
+ pca_corr_result_row = []
is_spearman = False #ZS: To determine if it's above or below the diagonal
for target in self.trait_list:
target_trait = target[0]
target_db = target[1]
target_samples = target_db.group.samplelist
-
- #if this_trait == target_trait and this_db == target_db:
- # corr_result_row.append(1)
- # continue
target_sample_data = target_trait.data
print("target_samples", len(target_samples))
@@ -139,19 +128,26 @@ class CorrelationMatrix(object):
target_vals.append(target_sample_value)
this_trait_vals, target_vals, num_overlap = corr_result_helpers.normalize_values(this_trait_vals, target_vals)
+
+ if num_overlap < self.lowest_overlap:
+ self.lowest_overlap = num_overlap
if num_overlap == 0:
corr_result_row.append([target_trait, 0, num_overlap])
+ pca_corr_result_row.append(0)
else:
+ pearson_r, pearson_p = scipy.stats.pearsonr(this_trait_vals, target_vals)
if is_spearman == False:
- sample_r, sample_p = scipy.stats.pearsonr(this_trait_vals, target_vals)
+ sample_r, sample_p = pearson_r, pearson_p
if sample_r == 1:
is_spearman = True
else:
sample_r, sample_p = scipy.stats.spearmanr(this_trait_vals, target_vals)
corr_result_row.append([target_trait, sample_r, num_overlap])
+ pca_corr_result_row.append(pearson_r)
self.corr_results.append(corr_result_row)
+ self.pca_corr_results.append(pca_corr_result_row)
print("corr_results:", pf(self.corr_results))
@@ -159,8 +155,9 @@ class CorrelationMatrix(object):
for sample in self.all_sample_list:
groups.append(1)
- #pca = self.calculate_pca(self.corr_results, range(len(self.traits)))
+ pca = self.calculate_pca(self.pca_corr_results, range(len(self.traits)))
+ self.loadings_array = self.process_loadings()
self.js_data = dict(traits = [trait.name for trait in self.traits],
groups = groups,
@@ -211,8 +208,24 @@ class CorrelationMatrix(object):
print("eigen:", eigen)
pca = stats.princomp(m, cor = "TRUE")
print("pca:", pca)
- print("loadings:", pca.rx('loadings'))
+ self.loadings = pca.rx('loadings')
+ self.scores = pca.rx('scores')
+ self.scale = pca.rx('scale')
print("scores:", pca.rx('scores'))
print("scale:", pca.rx('scale'))
- return pca \ No newline at end of file
+ return pca
+
+ def process_loadings(self):
+ loadings_array = []
+ loadings_row = []
+ print("before loop:", self.loadings[0])
+ for i in range(len(self.trait_list)):
+ loadings_row = []
+ for j in range(3):
+ position = i + len(self.trait_list)*j
+ loadings_row.append(self.loadings[0][position])
+ loadings_array.append(loadings_row)
+ print("loadings:", loadings_array)
+ return loadings_array
+
diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py
index 617d7942..a6f9c949 100755
--- a/wqflask/wqflask/do_search.py
+++ b/wqflask/wqflask/do_search.py
@@ -861,7 +861,10 @@ class PositionSearch(DoSearch):
try:
self.chr = int(self.chr)
except:
- self.chr = int(self.chr.replace('chr', ''))
+ if 'chr' in self.chr:
+ self.chr = int(self.chr.replace('chr', ''))
+ else:
+ self.chr = int(self.chr.replace('CHR', ''))
def run(self):
diff --git a/wqflask/wqflask/marker_regression/marker_regression.py b/wqflask/wqflask/marker_regression/marker_regression.py
index b33efc1f..05bb5b60 100755
--- a/wqflask/wqflask/marker_regression/marker_regression.py
+++ b/wqflask/wqflask/marker_regression/marker_regression.py
@@ -74,6 +74,8 @@ class MarkerRegression(object):
self.significant = ""
self.pair_scan = False # Initializing this since it is checked in views to determine which template to use
self.score_type = "LRS" #ZS: LRS or LOD
+ self.mapping_scale = "physic"
+ self.num_perm = 0
self.dataset.group.get_markers()
if self.mapping_method == "gemma":
@@ -86,13 +88,13 @@ class MarkerRegression(object):
results = self.run_rqtl_plink()
elif self.mapping_method == "rqtl_geno":
self.score_type = "LOD"
+ self.mapping_scale = "morgan"
if start_vars['num_perm'] == "":
self.num_perm = 0
else:
self.num_perm = start_vars['num_perm']
self.control = start_vars['control_marker']
self.do_control = start_vars['do_control']
- print("StartVars:", start_vars)
self.method = start_vars['mapmethod_rqtl_geno']
self.model = start_vars['mapmodel_rqtl_geno']
@@ -100,7 +102,7 @@ class MarkerRegression(object):
self.pair_scan = True
results = self.run_rqtl_geno()
- print("qtl_results:", results)
+ #print("qtl_results:", results)
elif self.mapping_method == "plink":
results = self.run_plink()
#print("qtl_results:", pf(results))
@@ -136,6 +138,7 @@ class MarkerRegression(object):
data_set = self.dataset.name,
maf = self.maf,
manhattan_plot = self.manhattan_plot,
+ mapping_scale = self.mapping_scale,
qtl_results = self.qtl_results,
)
@@ -160,8 +163,8 @@ class MarkerRegression(object):
#Need to convert the QTL objects that qtl reaper returns into a json serializable dictionary
for index, qtl in enumerate(self.qtl_results):
- if index<40:
- print("lod score is:", qtl['lod_score'])
+ #if index<40:
+ # print("lod score is:", qtl['lod_score'])
if qtl['chr'] == highest_chr and highest_chr != "X" and highest_chr != "X/Y":
print("changing to X")
self.json_data['chr'].append("X")
@@ -191,6 +194,7 @@ class MarkerRegression(object):
data_set = self.dataset.name,
maf = self.maf,
manhattan_plot = self.manhattan_plot,
+ mapping_scale = self.mapping_scale,
chromosomes = chromosome_mb_lengths,
qtl_results = self.qtl_results,
)
@@ -237,7 +241,7 @@ class MarkerRegression(object):
included_markers.append(line.split("\t")[1])
p_values.append(float(line.split("\t")[10]))
#p_values[line.split("\t")[1]] = float(line.split("\t")[10])
- print("p_values: ", p_values)
+ #print("p_values: ", p_values)
return included_markers, p_values
def gen_pheno_txt_file(self):
@@ -780,7 +784,7 @@ class MarkerRegression(object):
json_results = Redis.blpop("pylmm:results:" + temp_uuid, 45*60)
results = json.loads(json_results[1])
p_values = [float(result) for result in results['p_values']]
- print("p_values:", p_values[:10])
+ #print("p_values:", p_values[:10])
#p_values = self.trim_results(p_values)
t_stats = results['t_stats']
diff --git a/wqflask/wqflask/marker_regression/marker_regression_gn1.py b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
new file mode 100644
index 00000000..c2cd5e97
--- /dev/null
+++ b/wqflask/wqflask/marker_regression/marker_regression_gn1.py
@@ -0,0 +1,2785 @@
+# Copyright (C) University of Tennessee Health Science Center, Memphis, TN.
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU Affero General Public License
+# as published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Affero General Public License for more details.
+#
+# This program is available from Source Forge: at GeneNetwork Project
+# (sourceforge.net/projects/genenetwork/).
+#
+# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010)
+# at rwilliams@uthsc.edu and xzhou15@uthsc.edu
+#
+#
+#
+# This module is used by GeneNetwork project (www.genenetwork.org)
+#
+# Created by GeneNetwork Core Team 2010/08/10
+#
+# Last updated by Zach 12/14/2010
+
+
+import time
+import string
+from math import *
+import piddle as pid
+import sys,os
+import cPickle
+import httplib, urllib
+
+from flask import Flask, g
+
+from htmlgen import HTMLgen2 as HT
+
+
+from utility import helper_functions
+from utility import Plot
+from base import webqtlConfig
+#from intervalAnalyst import GeneUtil
+#from base.webqtlTrait import webqtlTrait
+#from base.templatePage import templatePage
+from utility import webqtlUtil
+#from utility.THCell import THCell
+#from utility.TDCell import TDCell
+#from dbFunction import webqtlDatabaseFunction
+#from base.GeneralObject import GeneralObject
+
+#import logging
+#logging.basicConfig(filename="/tmp/gn_leiyan.log", level=logging.INFO)
+#_log = logging.getLogger("gn\web\webqtl\intervalMapping\IntervalMappingPage.py")
+
+#########################################
+# Inteval Mapping Plot Page
+#########################################
+class MarkerRegression(object):
+ cMGraphInterval = 5
+ maxBootStrap = 50
+ GRAPH_MIN_WIDTH = 900
+ GRAPH_MAX_WIDTH = 10000 # Don't set this too high
+ GRAPH_DEFAULT_WIDTH = 1280
+ MULT_GRAPH_DEFAULT_WIDTH = 2000
+ MULT_GRAPH_MIN_WIDTH = 1400
+ MULT_GRAPH_DEFAULT_WIDTH = 1600
+ GRAPH_DEFAULT_HEIGHT = 600
+
+
+ # Display order:
+ # UCSC BAND =========
+ # ENSEMBL BAND -=-=-=
+ # ** GENES **********
+ BAND_SPACING = 4
+
+ #ENSEMBL_BAND_Y = UCSC_BAND_Y + UCSC_BAND_HEIGHT + BAND_SPACING
+ UCSC_BAND_HEIGHT = 10
+ ENSEMBL_BAND_HEIGHT = 10
+ WEBQTL_BAND_HEIGHT = 10
+
+ #GENE_START_Y = ENSEMBL_BAND_Y + ENSEMBL_BAND_HEIGHT + BAND_SPACING
+ NUM_GENE_ROWS = 10
+ EACH_GENE_HEIGHT = 6 # number of pixels tall, for each gene to display
+ EACH_GENE_ARROW_WIDTH = 5
+ EACH_GENE_ARROW_SPACING = 14
+ DRAW_DETAIL_MB = 4
+ DRAW_UTR_LABELS_MB = 4
+
+ MIN_PIXELS_BETWEEN_LABELS = 50
+
+ qmarkImg = HT.Image('/images/qmarkBoxBlue.gif', width=10, height=13, border=0, alt='Glossary')
+ # Note that "qmark.gif" is a similar, smaller, rounded-edges question mark. It doesn't look
+ # like the ones on the image, though, which is why we don't use it here.
+
+ HELP_WINDOW_NAME = 'helpWind'
+
+ ## BEGIN HaplotypeAnalyst
+ NR_INDIVIDUALS = 0
+ ## END HaplotypeAnalyst
+
+ ALEX_DEBUG_BOOL_COLORIZE_GENES = 1 # 0=don't colorize, 1=colorize
+ ALEX_DEBUG_BOOL_PRINT_GENE_LIST = 1
+
+ kWIDTH_DEFAULT=1
+
+ kONE_MILLION = 1000000
+
+ LODFACTOR = 4.61
+
+ SNP_COLOR = pid.orange # Color for the SNP "seismograph"
+ TRANSCRIPT_LOCATION_COLOR = pid.mediumpurple
+
+ GENE_FILL_COLOR = pid.HexColor(0x6666FF)
+ GENE_OUTLINE_COLOR = pid.HexColor(0x000077)
+ BOOTSTRAP_BOX_COLOR = pid.yellow
+ LRS_COLOR = pid.HexColor(0x0000FF)
+ LRS_LINE_WIDTH = 2
+ SIGNIFICANT_COLOR = pid.HexColor(0xEBC7C7)
+ SUGGESTIVE_COLOR = pid.gainsboro
+ SIGNIFICANT_WIDTH = 5
+ SUGGESTIVE_WIDTH = 5
+ ADDITIVE_COLOR_POSITIVE = pid.green
+ ADDITIVE_COLOR_NEGATIVE = pid.red
+ ADDITIVE_COLOR = ADDITIVE_COLOR_POSITIVE
+ DOMINANCE_COLOR_POSITIVE = pid.darkviolet
+ DOMINANCE_COLOR_NEGATIVE = pid.orange
+
+ ## BEGIN HaplotypeAnalyst
+ HAPLOTYPE_POSITIVE = pid.green
+ HAPLOTYPE_NEGATIVE = pid.red
+ HAPLOTYPE_HETEROZYGOUS = pid.blue
+ HAPLOTYPE_RECOMBINATION = pid.darkgray
+ ## END HaplotypeAnalyst
+
+ QMARK_EDGE_COLOR = pid.HexColor(0x718118)
+ QMARK_FILL_COLOR = pid.HexColor(0xDEE3BB)
+
+ TOP_RIGHT_INFO_COLOR = pid.black
+ X_AXIS_LABEL_COLOR = pid.black #HexColor(0x505050)
+
+ MINI_VIEW_MAGNIFIED_REGION_COLOR = pid.HexColor(0xCC0000)
+ MINI_VIEW_OUTSIDE_REGION_COLOR = pid.HexColor(0xEEEEEE)
+ MINI_VIEW_BORDER_COLOR = pid.black
+
+ CLICKABLE_WEBQTL_REGION_COLOR = pid.HexColor(0xF5D3D3)
+ CLICKABLE_WEBQTL_REGION_OUTLINE_COLOR = pid.HexColor(0xFCE9E9)
+ CLICKABLE_WEBQTL_TEXT_COLOR = pid.HexColor(0x912828)
+
+ CLICKABLE_UCSC_REGION_COLOR = pid.HexColor(0xDDDDEE)
+ CLICKABLE_UCSC_REGION_OUTLINE_COLOR = pid.HexColor(0xEDEDFF)
+ CLICKABLE_UCSC_TEXT_COLOR = pid.HexColor(0x333366)
+
+ CLICKABLE_ENSEMBL_REGION_COLOR = pid.HexColor(0xEEEEDD)
+ CLICKABLE_ENSEMBL_REGION_OUTLINE_COLOR = pid.HexColor(0xFEFEEE)
+ CLICKABLE_ENSEMBL_TEXT_COLOR = pid.HexColor(0x555500)
+
+ GRAPH_BACK_LIGHT_COLOR = pid.HexColor(0xFBFBFF)
+ GRAPH_BACK_DARK_COLOR = pid.HexColor(0xF1F1F9)
+
+ HELP_PAGE_REF = '/glossary.html'
+
+ DRAW_UTR_LABELS=0
+
+ def __init__(self, start_vars):
+
+ #templatePage.__init__(self, fd)
+
+ #if not self.openMysql():
+ # return
+
+ #helper_functions.get_species_dataset_trait(self, start_vars)
+
+ self.dataset = start_vars['dataset']
+ self.this_trait = start_vars['this_trait']
+ self.species = start_vars['species']
+
+ #ZS: Think I can just get all this from dataset object now
+ #RISet and Species
+ #if not fd.genotype:
+ # fd.readGenotype()
+ #
+ #fd.parentsf14regression = fd.formdata.getvalue('parentsf14regression')
+ #
+ #if ((fd.parentsf14regression == 'on') and fd.genotype_2):
+ # fd.genotype = fd.genotype_2
+ #else:
+ # fd.genotype = fd.genotype_1
+ #fd.strainlist = list(fd.genotype.prgy)
+ #
+ #self.species = webqtlDatabaseFunction.retrieveSpecies(cursor=self.cursor, RISet=fd.RISet)
+
+ if self.dataset.species == "rat":
+ self._ucscDb = "rn3"
+ elif self.dataset.species == "mouse":
+ self._ucscDb = "mm9"
+ else:
+ self._ucscDb = ""
+
+ #####################################
+ # Options
+ #####################################
+ #Mapping options
+ self.plotScale = start_vars['mapping_scale']
+ #self.plotScale = fd.formdata.getvalue('scale', 'physic')
+ #if self.plotScale == 'physic' and not fd.genotype.Mbmap: #ZS: Not sure where "Mbmap" is stored, if at all; should be fine without this though
+ # self.plotScale = 'morgan'
+ if start_vars['num_perm'] != "":
+ self.nperm = int(start_vars['num_perm'])
+ else:
+ self.nperm = 0
+ if (start_vars['num_perm'] == "") or (start_vars['num_perm'] < 1):
+ self.permChecked = False
+ else:
+ self.permChecked = True
+ #self.permChecked = fd.formdata.getvalue('permCheck', True)
+ self.bootChecked = False #ZS: For now setting to False, I'll add this option later once rest of figure works
+ #self.bootChecked = fd.formdata.getvalue('bootCheck', '')
+ if 'control' in start_vars.keys():
+ self.controlLocus = start_vars['control']
+ else:
+ self.controlLocus = ""
+ #self.controlLocus = fd.formdata.getvalue('controlLocus', '')
+
+ #try:
+ # self.selectedChr = int(fd.formdata.getvalue('chromosomes', "-1"))
+ #except:
+ self.selectedChr = -1
+
+ #whether include parents and F1 for InbredSet
+ #fd.parentsf14regression = fd.formdata.getvalue('parentsf14regression')
+ #if ((fd.parentsf14regression == 'on') and fd.genotype_2):
+ # fd.genotype = fd.genotype_2
+ #else:
+ # fd.genotype = fd.genotype_1
+
+ self.strainlist = self.dataset.group.samplelist
+ self.genotype = self.dataset.group.read_genotype_file()
+
+ #Darwing Options
+ try:
+ if self.selectedChr > -1:
+ self.graphWidth = min(self.GRAPH_MAX_WIDTH, self.GRAPH_MIN_WIDTH)
+ else:
+ self.graphWidth = min(self.GRAPH_MAX_WIDTH, self.MULT_GRAPH_MIN_WIDTH)
+ except:
+ if self.selectedChr > -1:
+ self.graphWidth = self.GRAPH_DEFAULT_WIDTH
+ else:
+ self.graphWidth = self.MULT_GRAPH_DEFAULT_WIDTH
+
+ #try:
+ # if self.selectedChr > -1:
+ # self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.GRAPH_MIN_WIDTH, int(fd.formdata.getvalue('graphWidth'))))
+ # else:
+ # self.graphWidth = min(self.GRAPH_MAX_WIDTH, max(self.MULT_GRAPH_MIN_WIDTH, int(fd.formdata.getvalue('graphWidth'))))
+ #except:
+ # if self.selectedChr > -1:
+ # self.graphWidth = self.GRAPH_DEFAULT_WIDTH
+ # else:
+ # self.graphWidth = self.MULT_GRAPH_DEFAULT_WIDTH
+
+## BEGIN HaplotypeAnalyst
+ #self.haplotypeAnalystChecked = fd.formdata.getvalue('haplotypeAnalystCheck')
+ self.haplotypeAnalystChecked = False
+## END HaplotypeAnalyst
+
+
+ self.graphHeight = self.GRAPH_DEFAULT_HEIGHT
+ self.additiveChecked = False
+ self.dominanceChecked = False
+ self.LRS_LOD = start_vars['score_type']
+ self.intervalAnalystChecked = False
+ self.legendChecked = False
+ self.geneChecked = False
+ self.SNPChecked = False
+ self.draw2X = False
+ self.lrsMax = 0
+ self.startMb = -1
+ self.endMb = -1
+
+ #self.additiveChecked = fd.formdata.getvalue('additiveCheck')
+ #self.dominanceChecked = fd.formdata.getvalue('dominanceCheck')
+ #self.LRS_LOD = fd.formdata.getvalue('LRSCheck', 'LRS')
+ #self.intervalAnalystChecked = fd.formdata.getvalue('intervalAnalystCheck')
+ #self.legendChecked = fd.formdata.getvalue('viewLegend')
+ #self.geneChecked = fd.formdata.getvalue('showGenes')
+ #self.SNPChecked = fd.formdata.getvalue('showSNP')
+ #self.draw2X = fd.formdata.getvalue('draw2X')
+ #self.lrsMax = float(fd.formdata.getvalue('lrsMax', 0))
+ #self.startMb = fd.formdata.getvalue('startMb', "-1")
+ #self.endMb = fd.formdata.getvalue('endMb', "-1")
+
+ #try:
+ # self.startMb = float(self.startMb)
+ # self.endMb = float(self.endMb)
+ # if self.startMb > self.endMb:
+ # temp = self.startMb
+ # self.startMb = self.endMb
+ # self.endMb = temp
+ # #minimal distance 10bp
+ # if self.endMb - self.startMb < 0.00001:
+ # self.endMb = self.startMb + 0.00001
+ #except:
+ # self.startMb = self.endMb = -1
+
+ #Trait Infos
+ self.identification = ""
+ #self.identification = fd.formdata.getvalue('identification', "")
+
+ ################################################################
+ # Generate Chr list and Retrieve Length Information
+ ################################################################
+ self.ChrList = [("All", -1)]
+ for i, indChr in enumerate(self.genotype):
+ self.ChrList.append((indChr.name, i))
+
+
+
+ self.ChrLengthMbList = g.db.execute("""
+ Select
+ Length from Chr_Length, InbredSet
+ where
+ Chr_Length.SpeciesId = InbredSet.SpeciesId AND
+ InbredSet.Name = '%s' AND
+ Chr_Length.Name in (%s)
+ Order by
+ Chr_Length.OrderId
+ """ % (self.dataset.group.name, string.join(map(lambda X: "'%s'" % X[0], self.ChrList[1:]), ", ")))
+
+ self.ChrLengthMbList = map(lambda x: x[0]/1000000.0, self.ChrLengthMbList)
+ self.ChrLengthMbSum = reduce(lambda x, y:x+y, self.ChrLengthMbList, 0.0)
+ if self.ChrLengthMbList:
+ self.MbGraphInterval = self.ChrLengthMbSum/(len(self.ChrLengthMbList)*12) #Empirical Mb interval
+ else:
+ self.MbGraphInterval = 1
+
+ self.ChrLengthCMList = []
+ for i, _chr in enumerate(self.genotype):
+ self.ChrLengthCMList.append(_chr[-1].cM - _chr[0].cM)
+ self.ChrLengthCMSum = reduce(lambda x, y:x+y, self.ChrLengthCMList, 0.0)
+
+ if self.plotScale == 'physic':
+ self.GraphInterval = self.MbGraphInterval #Mb
+ else:
+ self.GraphInterval = self.cMGraphInterval #cM
+
+ ################################################################
+ # Get Trait Values and Infomation
+ ################################################################
+ ##input from search page or selection page
+ #self.searchResult = fd.formdata.getvalue('searchResult')
+ ##convert single selection into a list
+ #if type("1") == type(self.searchResult):
+ # self.searchResult = string.split(self.searchResult,'\t')
+ #
+ #self.traitList = []
+ #if self.searchResult and len(self.searchResult) > webqtlConfig.MULTIPLEMAPPINGLIMIT:
+ # heading = 'Multiple Interval Mapping'
+ # detail = ['In order to get clear result, do not select more than %d traits for \
+ # Multiple Interval Mapping analysis.' % webqtlConfig.MULTIPLEMAPPINGLIMIT]
+ # self.error(heading=heading,detail=detail)
+ # return
+ #elif self.searchResult:
+ # self.dataSource = 'selectionPage'
+ # for item in self.searchResult:
+ # thisTrait = webqtlTrait(fullname=item, cursor=self.cursor)
+ # thisTrait.retrieveInfo()
+ # thisTrait.retrieveData(fd.strainlist)
+ # self.traitList.append(thisTrait)
+ #else:
+
+ #input from data editing page
+ #fd.readData()
+ #if not fd.allTraitData:
+ # heading = "Mapping"
+ # detail = ['No trait data was selected for %s data set. No mapping attempted.' % fd.RISet]
+ # self.error(heading=heading,detail=detail)
+ # return
+
+ self.dataSource = 'editingPage'
+ self.traitList = []
+ thisTrait = start_vars['this_trait']
+ #fullname = fd.formdata.getvalue('fullname', '')
+ #if fullname:
+ # thisTrait = webqtlTrait(fullname=fullname, data=fd.allTraitData, cursor=self.cursor)
+ # thisTrait.retrieveInfo()
+ #else:
+ # thisTrait = webqtlTrait(data=fd.allTraitData)
+ self.traitList.append(thisTrait)
+
+
+## BEGIN HaplotypeAnalyst
+## count the amount of individuals to be plotted, and increase self.graphHeight
+ #if self.haplotypeAnalystChecked and self.selectedChr > -1:
+ # thisTrait = self.traitList[0]
+ # _strains, _vals, _vars = thisTrait.exportInformative()
+ # smd=[]
+ # for ii, _val in enumerate(_vals):
+ # temp = GeneralObject(name=_strains[ii], value=_val)
+ # smd.append(temp)
+ # bxdlist=list(self.genotype.prgy)
+ # for j,_geno in enumerate (self.genotype[0][1].genotype):
+ # for item in smd:
+ # if item.name == bxdlist[j]:
+ # self.NR_INDIVIDUALS = self.NR_INDIVIDUALS + 1
+## default:
+ # self.graphHeight = self.graphHeight + 2 * (self.NR_INDIVIDUALS+10) * self.EACH_GENE_HEIGHT
+## for paper:
+ # #self.graphHeight = self.graphHeight + 1 * self.NR_INDIVIDUALS * self.EACH_GENE_HEIGHT - 180
+## END HaplotypeAnalyst
+
+ ################################################################
+ # Calculations QTL goes here
+ ################################################################
+ self.multipleInterval = len(self.traitList) > 1
+ self.qtlresults = start_vars['qtl_results']
+ #errorMessage = self.calculateAllResult(fd)
+ #if errorMessage:
+ # heading = "Mapping"
+ # detail = ['%s' % errorMessage]
+ # self.error(heading=heading,detail=detail)
+ # return
+
+ if self.multipleInterval:
+ self.colorCollection = Plot.colorSpectrum(len(self.qtlresults))
+ else:
+ self.colorCollection = [self.LRS_COLOR]
+
+
+ #########################
+ ## Get the sorting column
+ #########################
+ RISet = self.dataset.group.name
+ if RISet in ('AXB', 'BXA', 'AXBXA'):
+ self.diffCol = ['B6J', 'A/J']
+ elif RISet in ('BXD', 'BXD300', 'B6D2F2', 'BDF2-2005', 'BDF2-1999', 'BHHBF2'):
+ self.diffCol = ['B6J', 'D2J']
+ elif RISet in ('CXB'):
+ self.diffCol = ['CBY', 'B6J']
+ elif RISet in ('BXH', 'BHF2'):
+ self.diffCol = ['B6J', 'C3H']
+ elif RISet in ('B6BTBRF2'):
+ self.diffCol = ['B6J', 'BTB']
+ elif RISet in ('LXS'):
+ self.diffCol = ['ILS', 'ISS']
+ else:
+ self.diffCol= []
+
+ for i, strain in enumerate(self.diffCol):
+ self.diffCol[i] = g.db.execute("select Id from Strain where Symbol = %s", strain).fetchone()[0]
+ #self.cursor.execute("select Id from Strain where Symbol = %s", strain)
+ #self.diffCol[i] = self.cursor.fetchone()[0]
+ #print self.diffCol
+
+ ################################################################
+ # GeneCollection goes here
+ ################################################################
+ if self.plotScale == 'physic':
+ #StartMb or EndMb
+ if self.startMb < 0 or self.endMb < 0:
+ self.startMb = 0
+ self.endMb = self.ChrLengthMbList[self.selectedChr]
+
+ geneTable = ""
+
+ #if self.plotScale == 'physic' and self.selectedChr > -1 and (self.intervalAnalystChecked or self.geneChecked):
+ # chrName = self.genotype[0].name
+ # # Draw the genes for this chromosome / region of this chromosome
+ # if self.traitList and self.traitList[0] and len(self.traitList) == 1 and self.dataset.name:
+ # webqtldatabase = self.dataset.name
+ # #webqtldatabase = self.traitList[0].db.name
+ # else:
+ # webqtldatabase = None
+ #
+ # self.geneCol = None
+ #
+ # if self.species == "mouse":
+ # self.geneCol = GeneUtil.loadGenes(self.cursor, chrName, self.diffCol, self.startMb, self.endMb, webqtldatabase, "mouse")
+ # elif self.species == "rat":
+ # self.geneCol = GeneUtil.loadGenes(self.cursor, chrName, self.diffCol, self.startMb, self.endMb, webqtldatabase, "rat")
+ # else:
+ # self.geneCol = None
+ #
+ # if self.geneCol and self.intervalAnalystChecked:
+ # #######################################################################
+ # #Nick use GENEID as RefGene to get Literature Correlation Informations#
+ # #For Interval Mapping, Literature Correlation isn't useful, so skip it#
+ # #through set GENEID is None #
+ # #######################################################################
+ #
+ # #GENEID = fd.formdata.getvalue('GeneId') or None
+ # GENEID = None
+ #
+ # geneTableContainer = HT.Div(Id="sortable") #Div to hold table
+ # geneTable = self.geneTable(self.geneCol,GENEID)
+ # geneTableContainer.append(geneTable)
+ #
+ # mainfmName = webqtlUtil.genRandStr("fm_")
+ # tableForm = HT.Form(cgi=os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE), enctype='multipart/form-data', name=mainfmName, submit=HT.Input(type='hidden'))
+ # tableForm.append(HT.Input(name='FormID', value='', type='hidden'))
+ # tableForm.append(geneTableContainer)
+ #
+ #else:
+ self.geneCol = None
+
+ ################################################################
+ # Plots goes here
+ ################################################################
+ if self.plotScale != 'physic' or self.multipleInterval:
+ showLocusForm = webqtlUtil.genRandStr("fm_")
+ else:
+ showLocusForm = ""
+ intCanvas = pid.PILCanvas(size=(self.graphWidth,self.graphHeight))
+ gifmap = self.plotIntMapping(intCanvas, startMb = self.startMb, endMb = self.endMb, showLocusForm= showLocusForm)
+ print("AFTER PLOTINTMAPPING")
+
+ filename= webqtlUtil.genRandStr("Itvl_")
+ intCanvas.save(os.path.join(webqtlConfig.IMGDIR, filename), format='jpeg')
+ intImg=HT.Image('/image/'+filename+'.png', border=0, usemap='#WebQTLImageMap')
+
+ #Scales plot differently for high resolution
+ if self.draw2X:
+ intCanvasX2 = pid.PILCanvas(size=(self.graphWidth*2,self.graphHeight*2))
+ gifmapX2 = self.plotIntMapping(intCanvasX2, startMb = self.startMb, endMb = self.endMb, showLocusForm= showLocusForm, zoom=2)
+ intCanvasX2.save(os.path.join(webqtlConfig.IMGDIR, filename+"X2"), format='png')
+ #DLintImgX2=HT.Href(text='Download',url = '/image/'+filename+'X2.png', Class='smallsize', target='_blank')
+
+ print("AFTER GN1 PLOT")
+
+ textUrl = self.writeQTL2Text(fd, filename)
+
+ ################################################################
+ # Info tables goes here
+ ################################################################
+ #traitInfoTD = self.traitInfoTD(fd)
+
+ #if self.draw2X:
+ # traitInfoTD.append(HT.P(), DLintImgX2, ' a higher resolution 2X image. ')
+ #else:
+ # traitInfoTD.append(HT.P())
+ #if textUrl:
+ # traitInfoTD.append(HT.BR(), textUrl, ' results in tab-delimited text format.')
+ #traitRemapTD = self.traitRemapTD(self.cursor, fd)
+ #topTable = HT.TableLite(HT.TR(traitInfoTD, HT.TD("&nbsp;", width=25), traitRemapTD), border=0, cellspacing=0, cellpadding=0)
+
+ ################################################################
+ # Outputs goes here
+ ################################################################
+ #this form is used for opening Locus page or trait page, only available for genetic mapping
+ if showLocusForm:
+ showLocusForm = HT.Form(cgi= os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE), enctype='multipart/form-data',
+ name=showLocusForm, submit=HT.Input(type='hidden'))
+ hddn = {'FormID':'showDatabase', 'ProbeSetID':'_','database':fd.RISet+"Geno",'CellID':'_', 'RISet':fd.RISet, 'incparentsf1':'ON'}
+ for key in hddn.keys():
+ showLocusForm.append(HT.Input(name=key, value=hddn[key], type='hidden'))
+ showLocusForm.append(intImg)
+ else:
+ showLocusForm = intImg
+
+ if self.permChecked and not self.multipleInterval and 0<self.nperm:
+ perm_histogram = self.drawPermutationHistogram()
+ perm_text_file = self.permutationTextFile()
+
+ ################################################################
+ # footnote goes here
+ ################################################################
+ btminfo = HT.Paragraph(Id="smallsize") #Small('More information about this graph is available here.')
+
+ if (self.additiveChecked):
+ btminfo.append(HT.BR(), 'A positive additive coefficient (', HT.Font('green', color='green'), ' line) indicates that %s alleles increase trait values. In contrast, a negative additive coefficient (' % fd.ppolar, HT.Font('red', color='red'), ' line) indicates that %s alleles increase trait values.' % fd.mpolar)
+
+ if self.traitList and self.traitList[0].db and self.traitList[0].db.type == 'Geno':
+ btminfo.append(HT.BR(), 'Mapping using genotype data as a trait will result in infinity LRS at one locus. In order to display the result properly, all LRSs higher than 100 are capped at 100.')
+
+ if self.permChecked and not self.multipleInterval and 0<self.nperm:
+ TD_LR = HT.TD(HT.Blockquote(topTable), HT.Blockquote(gifmap, showLocusForm, HT.P(), btminfo, HT.P(), perm_histogram, HT.P(), perm_text_file), bgColor='#eeeeee', height = 200)
+ else:
+ TD_LR = HT.TD(HT.Blockquote(topTable), HT.Blockquote(gifmap, showLocusForm, HT.P(), btminfo), bgColor='#eeeeee', height = 200)
+
+
+ if geneTable:
+ iaForm = HT.Form(cgi= os.path.join(webqtlConfig.CGIDIR, "main.py?FormID=intervalAnalyst"), enctype='multipart/form-data',
+ name="iaForm", submit=HT.Input(type='hidden'))
+ hddn = {'chromosome':self.genotype[0].name, 'species':self.species,'startMb':self.startMb,'endMb':self.endMb}
+ if self.diffCol:
+ hddn['s1'] = self.diffCol[0]
+ hddn['s2'] = self.diffCol[1]
+ for key in hddn.keys():
+ iaForm.append(HT.Input(name=key, value=hddn[key], type='hidden'))
+ iaForm.append(HT.Paragraph("Interval Analyst : Chr %s from %2.6f to %2.6f Mb" % (self.genotype[0].name, self.startMb, self.endMb),
+ HT.Input(name='customize', value='Customize', onClick= "formInNewWindow(this.form);", type='button', Class="button"), Class="subtitle"))
+ TD_LR.append(HT.Blockquote(iaForm))
+ # optionsTable
+ selectall = HT.Href(url="#redirect", onClick="checkAll(document.getElementsByName('%s')[0]);" % mainfmName)
+ selectall_img = HT.Image("/images/select_all2_final.jpg", name="selectall", alt="Select All", title="Select All", style="border:none;")
+ selectall.append(selectall_img)
+ reset = HT.Href(url="#redirect", onClick="checkNone(document.getElementsByName('%s')[0]); return false;" % mainfmName)
+ reset_img = HT.Image("/images/select_none2_final.jpg", alt="Select None", title="Select None", style="border:none;")
+ reset.append(reset_img)
+ selectinvert = HT.Href(url="#redirect", onClick = "checkInvert(document.getElementsByName('%s')[0]);" % mainfmName)
+ selectinvert_img = HT.Image("/images/invert_selection2_final.jpg", name="selectinvert", alt="Invert Selection", title="Invert Selection", style="border:none;")
+ selectinvert.append(selectinvert_img)
+ addselect = HT.Href(url="#redirect", onClick="addRmvSelection('%s', document.getElementsByName('%s')[0], 'addToSelection');" % (RISet, mainfmName))
+ addselect_img = HT.Image("/images/add_collection1_final.jpg", name="addselect", alt="Add To Collection", title="Add To Collection", style="border:none;")
+ addselect.append(addselect_img)
+ geneweaver = HT.Href(url="#redirect", onClick="databaseFunc(document.getElementsByName('%s')[0], 'ODEIM');" % mainfmName)
+ geneweaver_img = HT.Image("/images/ODE_logo_final.jpg", name="GeneWeaver", alt="Gene Weaver", title="Gene Weaver", style="border:none")
+ geneweaver.append(geneweaver_img)
+ optionsTable = HT.TableLite()
+ optionsTable.append(HT.TR(
+ HT.TD(selectall, width="77", style="text-align:center"),
+ HT.TD(reset, width="77", style="text-align:center"),
+ HT.TD(selectinvert, width="77", style="text-align:center"),
+ HT.TD(geneweaver, width="77", style="text-align:center"),
+ ))
+ optionsTable.append(HT.TR(
+ HT.TD("Select", style="text-align:center"),
+ HT.TD("Deselect", style="text-align:center"),
+ HT.TD("Invert", style="text-align:center"),
+ HT.TD("Gene Weaver", style="text-align:center"),
+ ))
+ TD_LR.append(HT.Blockquote(optionsTable))
+ # geneTableContainer
+ TD_LR.append(HT.Blockquote(tableForm))
+
+ self.dict['body'] = TD_LR
+ self.dict['title'] = "Mapping"
+
+
+ print("AT END OF GN1 MAPPING")
+
+ def writeQTL2Text(self, filename):
+ if self.multipleInterval:
+ return ""
+ #_dominance = (self.genotype.type == 'intercross')
+ _Mb = self.genotype.Mbmap
+
+ ###Write to text file
+ fpText = open(os.path.join(webqtlConfig.TMPDIR, filename) + '.txt','wb')
+
+ fpText.write("Source: WebQTL, The GeneNetwork (%s)\n" % webqtlConfig.PORTADDR)
+ #
+ fpText.write("Site: %s\n" % webqtlConfig.SITENAME)
+ fpText.write("Page: Map Viewer\n")
+ fpText.write(time.strftime("Date and Time (US Center): %b %d, %Y at %I.%M %p\n", time.localtime()))
+ fpText.write("Trait ID: %s\n" % self.this_trait.name)
+ fpText.write("Suggestive LRS = %0.2f\n" % self.suggestive)
+ fpText.write("Significant LRS = %0.2f\n" % self.significance)
+ """
+ if self.this_trait.symbol and self.this_trait.chr and self.this_trait.mb:
+ writeSymbol, writeChromosome, writeMb = self.this_trait.symbol, self.this_trait.chr, self.this_trait.mb
+ else:
+ writeSymbol, writeChromosome, writeMb = (" ", " ", " ")
+ fpText.write("Gene Symbol: %s\n" % writeSymbol)
+ fpText.write("Location: Chr %s @ %s Mb\n" % (writeChromosome, writeMb))
+ #selectedChr = self.indexToChrName(int(fd.formdata.getvalue('chromosomes', -1)))
+ #fpText.write("Chromosome: %s\n" % selectedChr)
+ fpText.write("Region: %0.6f-%0.6f Mb\n\n" % (self.startMb, self.endMb))
+ """
+
+ if hasattr(self, 'LRSArray'):
+ if _dominance:
+ fpText.write('Chr\tLocus\tcM\tMb\tLRS\tP-value\tAdditive\tDominance\n')
+ else:
+ fpText.write('Chr\tLocus\tcM\tMb\tLRS\tP-value\tAdditive\n')
+ else:
+ if _dominance:
+ fpText.write('Chr\tLocus\tcM\tMb\tLRS\tAdditive\tDominance\n')
+ else:
+ fpText.write('Chr\tLocus\tcM\tMb\tLRS\tAdditive\n')
+
+ i = 0
+ for marker in self.qtlresults:
+ if _Mb:
+ locusMb = '%2.3f' % marker['Mb']
+ else:
+ locusMb = 'N/A'
+
+ if hasattr(self, 'LRSArray'):
+ if start_vars['score_type'] == "LRS":
+ lrs_lod = marker['lrs_value']
+ else:
+ lrs_lod = marker['lod_score']
+
+ P_value = self.calculatePValue(lrs_lod, self.LRSArray)
+
+ #if _dominance:
+ # fpText.write("%s\t%s\t%2.3f\t%s\t%2.3f\t%2.3f\t%2.3f\t%2.3f\n" %(qtlresult.locus.chr, \
+ # qtlresult.locus.name, qtlresult.locus.cM, locusMb , qtlresult.lrs, P_value, qtlresult.additive, qtlresult.dominance))
+ #else:
+ if P_value:
+ fpText.write("%s\t%s\t%2.3f\t%s\t%2.3f\t%2.3f\n" %(marker['chr'], \
+ marker['name'], marker['cM'], locusMb, lrs_lod, P_value))
+ else:
+ fpText.write("%s\t%s\t%2.3f\t%s\t%2.3f\t%s\n" %(marker['chr'], \
+ marker['name'], marker['cM'], locusMb , lrs_lod, '-'))
+ else:
+ #if _dominance:
+ # fpText.write("%s\t%s\t%2.3f\t%s\t%2.3f\t%2.3f\t%2.3f\n" %(qtlresult.locus.chr, \
+ # qtlresult.locus.name, qtlresult.locus.cM, locusMb , qtlresult.lrs, qtlresult.additive, qtlresult.dominance))
+ #else:
+ fpText.write("%s\t%s\t%2.3f\t%s\t%2.3f\n" %(marker['chr'], \
+ marker['name'], marker['cM'], locusMb , lrs_lod))
+
+ i += 1
+
+ fpText.close()
+ textUrl = '/tmp/'+filename+'.txt'
+ #textUrl = HT.Href(text = 'Download', url= '/tmp/'+filename+'.txt', target = "_blank", Class='smallsize')
+ return textUrl
+
+ def plotIntMapping(self, canvas, offset= (80, 120, 20, 100), zoom = 1, startMb = None, endMb = None, showLocusForm = ""):
+ #calculating margins
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ if self.multipleInterval:
+ yTopOffset = max(80, yTopOffset)
+ else:
+ if self.legendChecked:
+ yTopOffset = max(80, yTopOffset)
+ else:
+ pass
+
+ if self.plotScale != 'physic':
+ yBottomOffset = max(120, yBottomOffset)
+ fontZoom = zoom
+ if zoom == 2:
+ xLeftOffset += 20
+ fontZoom = 1.5
+
+ xLeftOffset = int(xLeftOffset*fontZoom)
+ xRightOffset = int(xRightOffset*fontZoom)
+ yBottomOffset = int(yBottomOffset*fontZoom)
+
+ cWidth = canvas.size[0]
+ cHeight = canvas.size[1]
+ plotWidth = cWidth - xLeftOffset - xRightOffset
+ plotHeight = cHeight - yTopOffset - yBottomOffset
+ startPixelX = xLeftOffset
+ endPixelX = (xLeftOffset + plotWidth)
+
+ #Drawing Area Height
+ drawAreaHeight = plotHeight
+ if self.plotScale == 'physic' and self.selectedChr > -1:
+ drawAreaHeight -= self.ENSEMBL_BAND_HEIGHT + self.UCSC_BAND_HEIGHT+ self.WEBQTL_BAND_HEIGHT + 3*self.BAND_SPACING+ 10*zoom
+ if self.geneChecked:
+ drawAreaHeight -= self.NUM_GENE_ROWS*self.EACH_GENE_HEIGHT + 3*self.BAND_SPACING + 10*zoom
+ else:
+ if self.selectedChr > -1:
+ drawAreaHeight -= 20
+ else:
+ drawAreaHeight -= 30
+
+## BEGIN HaplotypeAnalyst
+ if self.haplotypeAnalystChecked and self.selectedChr > -1:
+ drawAreaHeight -= self.EACH_GENE_HEIGHT * (self.NR_INDIVIDUALS+10) * 2 * zoom
+## END HaplotypeAnalyst
+
+ if zoom == 2:
+ drawAreaHeight -= 60
+
+ #Image map
+ gifmap = HT.Map(name = "WebQTLImageMap")
+ #gifmap = None
+
+ newoffset = (xLeftOffset, xRightOffset, yTopOffset, yBottomOffset)
+ # Draw the alternating-color background first and get plotXScale
+ plotXScale = self.drawGraphBackground(canvas, gifmap, offset=newoffset, zoom= zoom, startMb=startMb, endMb = endMb)
+
+ #draw bootstap
+ #if self.bootChecked and not self.multipleInterval:
+ # self.drawBootStrapResult(canvas, fd.nboot, drawAreaHeight, plotXScale, offset=newoffset)
+
+ # Draw clickable region and gene band if selected
+ if self.plotScale == 'physic' and self.selectedChr > -1:
+ self.drawClickBand(canvas, gifmap, plotXScale, offset=newoffset, zoom = zoom, startMb=startMb, endMb = endMb)
+ if self.geneChecked and self.geneCol:
+ self.drawGeneBand(canvas, gifmap, plotXScale, offset=newoffset, zoom = zoom, startMb=startMb, endMb = endMb)
+ if self.SNPChecked:
+ self.drawSNPTrackNew(canvas, offset=newoffset, zoom = 2*zoom, startMb=startMb, endMb = endMb)
+## BEGIN HaplotypeAnalyst
+ if self.haplotypeAnalystChecked:
+ self.drawHaplotypeBand(canvas, gifmap, plotXScale, offset=newoffset, zoom = zoom, startMb=startMb, endMb = endMb)
+## END HaplotypeAnalyst
+ # Draw X axis
+ self.drawXAxis(canvas, drawAreaHeight, gifmap, plotXScale, showLocusForm, offset=newoffset, zoom = zoom, startMb=startMb, endMb = endMb)
+ # Draw QTL curve
+ self.drawQTL(canvas, drawAreaHeight, gifmap, plotXScale, offset=newoffset, zoom= zoom, startMb=startMb, endMb = endMb)
+
+ #draw legend
+ if self.multipleInterval:
+ self.drawMultiTraitName(fd, canvas, gifmap, showLocusForm, offset=newoffset)
+ elif self.legendChecked:
+ self.drawLegendPanel(fd, canvas, offset=newoffset, zoom = zoom)
+ else:
+ pass
+
+ #draw position, no need to use a separate function
+ if self.genotype.Mbmap:
+ self.drawProbeSetPosition(canvas, plotXScale, offset=newoffset, zoom = zoom)
+
+ return gifmap
+
+ def drawBootStrapResult(self, canvas, nboot, drawAreaHeight, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ bootHeightThresh = drawAreaHeight*3/4
+
+ #break bootstrap result into groups
+ BootCoord = []
+ i = 0
+ startX = xLeftOffset
+ for j, _chr in enumerate(self.genotype):
+ BootCoord.append( [])
+ for _locus in _chr:
+ if self.plotScale == 'physic':
+ Xc = startX + (_locus.Mb-self.startMb)*plotXScale
+ else:
+ Xc = startX + (_locus.cM-_chr[0].cM)*plotXScale
+ BootCoord[-1].append([Xc, self.bootResult[i]])
+ i += 1
+ startX += (self.ChrLengthDistList[j] + self.GraphInterval)*plotXScale
+
+ #reduce bootResult
+ if self.selectedChr > -1:
+ maxBootBar = 80.0
+ else:
+ maxBootBar = 200.0
+ stepBootStrap = plotWidth/maxBootBar
+ reducedBootCoord = []
+ maxBootCount = 0
+
+ for BootChrCoord in BootCoord:
+ nBoot = len(BootChrCoord)
+ bootStartPixX = BootChrCoord[0][0]
+ bootCount = BootChrCoord[0][1]
+ for i in range(1, nBoot):
+ if BootChrCoord[i][0] - bootStartPixX < stepBootStrap:
+ bootCount += BootChrCoord[i][1]
+ continue
+ else:
+ if maxBootCount < bootCount:
+ maxBootCount = bootCount
+ # end if
+ reducedBootCoord.append([bootStartPixX, BootChrCoord[i][0], bootCount])
+ bootStartPixX = BootChrCoord[i][0]
+ bootCount = BootChrCoord[i][1]
+ # end else
+ # end for
+ #add last piece
+ if BootChrCoord[-1][0] - bootStartPixX > stepBootStrap/2.0:
+ reducedBootCoord.append([bootStartPixX, BootChrCoord[-1][0], bootCount])
+ else:
+ reducedBootCoord[-1][2] += bootCount
+ reducedBootCoord[-1][1] = BootChrCoord[-1][0]
+ # end else
+ if maxBootCount < reducedBootCoord[-1][2]:
+ maxBootCount = reducedBootCoord[-1][2]
+ # end if
+ for item in reducedBootCoord:
+ if item[2] > 0:
+ if item[0] < xLeftOffset:
+ item[0] = xLeftOffset
+ if item[0] > xLeftOffset+plotWidth:
+ item[0] = xLeftOffset+plotWidth
+ if item[1] < xLeftOffset:
+ item[1] = xLeftOffset
+ if item[1] > xLeftOffset+plotWidth:
+ item[1] = xLeftOffset+plotWidth
+ if item[0] != item[1]:
+ canvas.drawRect(item[0], yZero, item[1], yZero - item[2]*bootHeightThresh/maxBootCount,
+ fillColor=self.BOOTSTRAP_BOX_COLOR)
+
+ ###draw boot scale
+ highestPercent = (maxBootCount*100.0)/nboot
+ bootScale = Plot.detScale(0, highestPercent)
+ bootScale = Plot.frange(bootScale[0], bootScale[1], bootScale[1]/bootScale[2])
+ bootScale = bootScale[:-1] + [highestPercent]
+
+ bootOffset = 50*fontZoom
+ bootScaleFont=pid.Font(ttf="verdana",size=13*fontZoom,bold=0)
+ canvas.drawRect(canvas.size[0]-bootOffset,yZero-bootHeightThresh,canvas.size[0]-bootOffset-15*zoom,yZero,fillColor = pid.yellow)
+ canvas.drawLine(canvas.size[0]-bootOffset+4, yZero, canvas.size[0]-bootOffset, yZero, color=pid.black)
+ canvas.drawString('0%' ,canvas.size[0]-bootOffset+10,yZero+5,font=bootScaleFont,color=pid.black)
+ for item in bootScale:
+ if item == 0:
+ continue
+ bootY = yZero-bootHeightThresh*item/highestPercent
+ canvas.drawLine(canvas.size[0]-bootOffset+4,bootY,canvas.size[0]-bootOffset,bootY,color=pid.black)
+ canvas.drawString('%2.1f'%item ,canvas.size[0]-bootOffset+10,bootY+5,font=bootScaleFont,color=pid.black)
+
+ if self.legendChecked:
+ startPosY = 30
+ nCol = 2
+ smallLabelFont = pid.Font(ttf="trebuc", size=12*fontZoom, bold=1)
+ leftOffset = xLeftOffset+(nCol-1)*200
+ canvas.drawRect(leftOffset,startPosY-6, leftOffset+12,startPosY+6, fillColor=pid.yellow)
+ canvas.drawString('Frequency of the Peak LRS',leftOffset+ 20, startPosY+5,font=smallLabelFont,color=pid.black)
+
+ def drawProbeSetPosition(self, canvas, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ if len(self.traitList) != 1:
+ return
+
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ try:
+ Chr = self.traitList[0].chr
+ Mb = self.traitList[0].mb
+ except:
+ return
+
+ if self.plotScale == 'physic':
+ if self.selectedChr > -1:
+ if self.genotype[0].name != Chr or Mb < self.startMb or Mb > self.endMb:
+ return
+ else:
+ locPixel = xLeftOffset + (Mb-self.startMb)*plotXScale
+ else:
+ locPixel = xLeftOffset
+ for i, _chr in enumerate(self.genotype):
+ if _chr.name != Chr:
+ locPixel += (self.ChrLengthDistList[i] + self.GraphInterval)*plotXScale
+ else:
+ locPixel += Mb*plotXScale
+ break
+ else:
+ if self.selectedChr > -1:
+ if self.genotype[0].name != Chr:
+ return
+ else:
+ for i, _locus in enumerate(self.genotype[0]):
+ #the trait's position is on the left of the first genotype
+ if i==0 and _locus.Mb >= Mb:
+ locPixel=-1
+ break
+
+ #the trait's position is between two traits
+ if i > 0 and self.genotype[0][i-1].Mb < Mb and _locus.Mb >= Mb:
+ locPixel = xLeftOffset + plotXScale*(self.genotype[0][i-1].cM+(_locus.cM-self.genotype[0][i-1].cM)*(Mb -self.genotype[0][i-1].Mb)/(_locus.Mb-self.genotype[0][i-1].Mb))
+ break
+
+ #the trait's position is on the right of the last genotype
+ if i==len(self.genotype[0]) and Mb>=_locus.Mb:
+ locPixel = -1
+ else:
+ locPixel = xLeftOffset
+ for i, _chr in enumerate(self.genotype):
+ if _chr.name != Chr:
+ locPixel += (self.ChrLengthDistList[i] + self.GraphInterval)*plotXScale
+ else:
+ locPixel += (Mb*(_chr[-1].cM-_chr[0].cM)/self.ChrLengthCMList[i])*plotXScale
+ break
+ if locPixel >= 0:
+ traitPixel = ((locPixel, yZero), (locPixel-6, yZero+12), (locPixel+6, yZero+12))
+ canvas.drawPolygon(traitPixel, edgeColor=pid.black, fillColor=self.TRANSCRIPT_LOCATION_COLOR, closed=1)
+
+ if self.legendChecked:
+ startPosY = 15
+ nCol = 2
+ smallLabelFont = pid.Font(ttf="trebuc", size=12*fontZoom, bold=1)
+ leftOffset = xLeftOffset+(nCol-1)*200*fontZoom
+ canvas.drawPolygon(((leftOffset+6, startPosY-6), (leftOffset, startPosY+6), (leftOffset+12, startPosY+6)), edgeColor=pid.black, fillColor=self.TRANSCRIPT_LOCATION_COLOR, closed=1)
+ canvas.drawString("Sequence Site", (leftOffset+15), (startPosY+5), smallLabelFont, self.TOP_RIGHT_INFO_COLOR)
+
+
+ def drawSNPTrackNew(self, canvas, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ if self.plotScale != 'physic' or self.selectedChr == -1 or not self.diffCol:
+ return
+
+ SNP_HEIGHT_MODIFIER = 18.0
+
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ drawSNPLocationY = yTopOffset + plotHeight
+ chrName = self.genotype[0].name
+
+ stepMb = (endMb-startMb)/plotWidth
+ strainId1, strainId2 = self.diffCol
+ SNPCounts = []
+
+ while startMb<endMb:
+ self.cursor.execute("""
+ select
+ count(*) from BXDSnpPosition
+ where
+ Chr = '%s' AND Mb >= %2.6f AND Mb < %2.6f AND
+ StrainId1 = %d AND StrainId2 = %d
+ """ % (chrName, startMb, startMb+stepMb, strainId1, strainId2))
+ SNPCounts.append(self.cursor.fetchone()[0])
+ startMb += stepMb
+
+ if (len(SNPCounts) > 0):
+ maxCount = max(SNPCounts)
+ if maxCount>0:
+ for i in range(xLeftOffset, xLeftOffset + plotWidth):
+ snpDensity = float(SNPCounts[i-xLeftOffset]*SNP_HEIGHT_MODIFIER/maxCount)
+ canvas.drawLine(i, drawSNPLocationY+(snpDensity)*zoom, i, drawSNPLocationY-(snpDensity)*zoom, color=self.SNP_COLOR, width=1)
+
+ def drawMultiTraitName(self, fd, canvas, gifmap, showLocusForm, offset= (40, 120, 80, 10), zoom = 1, locLocation= None):
+ nameWidths = []
+ yPaddingTop = 10
+ colorFont=pid.Font(ttf="trebuc",size=12,bold=1)
+ if len(self.qtlresults) >20 and self.selectedChr > -1:
+ rightShift = 20
+ rightShiftStep = 60
+ rectWidth = 10
+ else:
+ rightShift = 40
+ rightShiftStep = 80
+ rectWidth = 15
+
+ for k, thisTrait in enumerate(self.traitList):
+ thisLRSColor = self.colorCollection[k]
+ kstep = k % 4
+ if k!=0 and kstep==0:
+ if nameWidths:
+ rightShiftStep = max(nameWidths[-4:]) + rectWidth + 20
+ rightShift += rightShiftStep
+
+ name = thisTrait.displayName()
+ nameWidth = canvas.stringWidth(name,font=colorFont)
+ nameWidths.append(nameWidth)
+
+ canvas.drawRect(rightShift,yPaddingTop+kstep*15, rectWidth+rightShift,yPaddingTop+10+kstep*15, fillColor=thisLRSColor)
+ canvas.drawString(name,rectWidth+2+rightShift,yPaddingTop+10+kstep*15,font=colorFont,color=pid.black)
+ if thisTrait.db:
+
+ COORDS = "%d,%d,%d,%d" %(rectWidth+2+rightShift,yPaddingTop+kstep*15,rectWidth+2+rightShift+nameWidth,yPaddingTop+10+kstep*15,)
+ HREF= "javascript:showDatabase3('%s','%s','%s','');" % (showLocusForm, thisTrait.db.name, thisTrait.name)
+ Areas = HT.Area(shape='rect',coords=COORDS,href=HREF)
+ gifmap.areas.append(Areas)
+
+
+ def drawLegendPanel(self, fd, canvas, offset= (40, 120, 80, 10), zoom = 1, locLocation= None):
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+
+ labelFont=pid.Font(ttf="trebuc",size=12*fontZoom, bold=1)
+ startPosY = 15
+ stepPosY = 12*fontZoom
+ canvas.drawLine(xLeftOffset,startPosY,xLeftOffset+32,startPosY,color=self.LRS_COLOR, width=2)
+ canvas.drawString(self.LRS_LOD, xLeftOffset+40,startPosY+5,font=labelFont,color=pid.black)
+ startPosY += stepPosY
+
+ if self.additiveChecked:
+ startPosX = xLeftOffset
+ canvas.drawLine(startPosX,startPosY,startPosX+17,startPosY,color=self.ADDITIVE_COLOR_POSITIVE, width=2)
+ canvas.drawLine(startPosX+18,startPosY,startPosX+32,startPosY,color=self.ADDITIVE_COLOR_NEGATIVE, width=2)
+ canvas.drawString('Additive Effect',startPosX+40,startPosY+5,font=labelFont,color=pid.black)
+
+ if self.genotype.type == 'intercross' and self.dominanceChecked:
+ startPosX = xLeftOffset
+ startPosY += stepPosY
+ canvas.drawLine(startPosX,startPosY,startPosX+17,startPosY,color=self.DOMINANCE_COLOR_POSITIVE, width=4)
+ canvas.drawLine(startPosX+18,startPosY,startPosX+35,startPosY,color=self.DOMINANCE_COLOR_NEGATIVE, width=4)
+ canvas.drawString('Dominance Effect',startPosX+42,startPosY+5,font=labelFont,color=pid.black)
+
+ if self.haplotypeAnalystChecked:
+ startPosY += stepPosY
+ startPosX = xLeftOffset
+ canvas.drawLine(startPosX,startPosY,startPosX+17,startPosY,color=self.HAPLOTYPE_POSITIVE, width=4)
+ canvas.drawLine(startPosX+18,startPosY,startPosX+35,startPosY,color=self.HAPLOTYPE_NEGATIVE, width=4)
+ canvas.drawLine(startPosX+36,startPosY,startPosX+53,startPosY,color=self.HAPLOTYPE_HETEROZYGOUS, width=4)
+ canvas.drawLine(startPosX+54,startPosY,startPosX+67,startPosY,color=self.HAPLOTYPE_RECOMBINATION, width=4)
+ canvas.drawString('Haplotypes (Pat, Mat, Het, Unk)',startPosX+76,startPosY+5,font=labelFont,color=pid.black)
+
+ if self.permChecked:
+ startPosY += stepPosY
+ startPosX = xLeftOffset
+ canvas.drawLine(startPosX, startPosY, startPosX + 32, startPosY, color=self.SIGNIFICANT_COLOR, width=self.SIGNIFICANT_WIDTH)
+ canvas.drawLine(startPosX, startPosY + stepPosY, startPosX + 32, startPosY + stepPosY, color=self.SUGGESTIVE_COLOR, width=self.SUGGESTIVE_WIDTH)
+ lod = 1
+ if self.LRS_LOD == 'LOD':
+ lod = self.LODFACTOR
+ canvas.drawString('Significant %s = %2.2f' % (self.LRS_LOD, self.significance/lod),xLeftOffset+42,startPosY +5,font=labelFont,color=pid.black)
+ canvas.drawString('Suggestive %s = %2.2f' % (self.LRS_LOD, self.suggestive/lod),xLeftOffset+42,startPosY + 5 +stepPosY,font=labelFont,color=pid.black)
+
+
+
+ labelFont=pid.Font(ttf="verdana",size=12*fontZoom)
+ labelColor = pid.black
+ if self.selectedChr == -1:
+ string1 = 'Mapping for Dataset: %s, mapping on All Chromosomes' % fd.RISet
+ else:
+ string1 = 'Mapping for Dataset: %s, mapping on Chromosome %s' % (fd.RISet,self.genotype[0].name)
+ if self.controlLocus:
+ string2 = 'Using %s as control' % self.controlLocus
+ else:
+ string2 = 'Using Haldane mapping function with no control for other QTLs'
+ d = 4+ max(canvas.stringWidth(string1,font=labelFont),canvas.stringWidth(string2,font=labelFont))
+ if fd.identification:
+ identification = "Trait ID: %s" % fd.identification
+ canvas.drawString(identification,canvas.size[0] - xRightOffset-d,20*fontZoom,font=labelFont,color=labelColor)
+
+ canvas.drawString(string1,canvas.size[0] - xRightOffset-d,35*fontZoom,font=labelFont,color=labelColor)
+ canvas.drawString(string2,canvas.size[0] - xRightOffset-d,50*fontZoom,font=labelFont,color=labelColor)
+
+
+ def drawGeneBand(self, canvas, gifmap, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ if self.plotScale != 'physic' or self.selectedChr == -1 or not self.geneCol:
+ return
+
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ yPaddingTop = yTopOffset
+
+ displayStartInBases = startMb*self.kONE_MILLION
+ displayEndInBases = endMb*self.kONE_MILLION
+
+ for gIndex, theGO in enumerate(self.geneCol):
+ geneNCBILink = 'http://www.ncbi.nlm.nih.gov/gene?term=%s'
+ if self.species == "mouse":
+ txStart = theGO["TxStart"]
+ txEnd = theGO["TxEnd"]
+ geneLength = (txEnd - txStart)*1000.0
+ tenPercentLength = geneLength*0.0001
+ SNPdensity = theGO["snpCount"]/geneLength
+
+ exonStarts = map(float, theGO['exonStarts'].split(",")[:-1])
+ exonEnds = map(float, theGO['exonEnds'].split(",")[:-1])
+ cdsStart = theGO['cdsStart']
+ cdsEnd = theGO['cdsEnd']
+ accession = theGO['NM_ID']
+ geneId = theGO['GeneID']
+ geneSymbol = theGO["GeneSymbol"]
+ strand = theGO["Strand"]
+ exonCount = theGO["exonCount"]
+
+ geneStartPix = xLeftOffset + plotXScale*(float(txStart) - startMb)
+ geneEndPix = xLeftOffset + plotXScale*(float(txEnd) - startMb) #at least one pixel
+
+ if (geneEndPix < xLeftOffset):
+ return; # this gene is not on the screen
+ elif (geneEndPix > xLeftOffset + plotWidth):
+ geneEndPix = xLeftOffset + plotWidth; # clip the last in-range gene
+ if (geneStartPix > xLeftOffset + plotWidth):
+ return; # we are outside the valid on-screen range, so stop drawing genes
+ elif (geneStartPix < xLeftOffset):
+ geneStartPix = xLeftOffset; # clip the first in-range gene
+
+ #color the gene based on SNP density
+
+
+ #found earlier, needs to be recomputed as snps are added
+
+ #always apply colors now, even if SNP Track not checked - Zach 11/24/2010
+
+ densities=[1.0000000000000001e-05, 0.094094033555233408, 0.3306166377816987, 0.88246026851027781, 2.6690084029581951, 4.1, 61.0]
+ if SNPdensity < densities[0]:
+ myColor = pid.black
+ elif SNPdensity < densities[1]:
+ myColor = pid.purple
+ elif SNPdensity < densities[2]:
+ myColor = pid.darkblue
+ elif SNPdensity < densities[3]:
+ myColor = pid.darkgreen
+ elif SNPdensity < densities[4]:
+ myColor = pid.gold
+ elif SNPdensity < densities[5]:
+ myColor = pid.darkorange
+ else:
+ myColor = pid.darkred
+
+ outlineColor = myColor
+ fillColor = myColor
+
+ TITLE = "Gene: %s (%s)\nFrom %2.3f to %2.3f Mb (%s)\nNum. exons: %d." % (geneSymbol, accession, float(txStart), float(txEnd), strand, exonCount)
+ # NL: 06-02-2011 Rob required to change this link for gene related
+ HREF=geneNCBILink %geneSymbol
+
+ elif self.species == "rat":
+ exonStarts = []
+ exonEnds = []
+ txStart = theGO["TxStart"]
+ txEnd = theGO["TxEnd"]
+ cdsStart = theGO["TxStart"]
+ cdsEnd = theGO["TxEnd"]
+ geneId = theGO["GeneID"]
+ geneSymbol = theGO["GeneSymbol"]
+ strand = theGO["Strand"]
+ exonCount = 0
+
+ geneStartPix = xLeftOffset + plotXScale*(float(txStart) - startMb)
+ geneEndPix = xLeftOffset + plotXScale*(float(txEnd) - startMb) #at least one pixel
+
+ if (geneEndPix < xLeftOffset):
+ return; # this gene is not on the screen
+ elif (geneEndPix > xLeftOffset + plotWidth):
+ geneEndPix = xLeftOffset + plotWidth; # clip the last in-range gene
+ if (geneStartPix > xLeftOffset + plotWidth):
+ return; # we are outside the valid on-screen range, so stop drawing genes
+ elif (geneStartPix < xLeftOffset):
+ geneStartPix = xLeftOffset; # clip the first in-range gene
+
+ outlineColor = pid.darkblue
+ fillColor = pid.darkblue
+ TITLE = "Gene: %s\nFrom %2.3f to %2.3f Mb (%s)" % (geneSymbol, float(txStart), float(txEnd), strand)
+ # NL: 06-02-2011 Rob required to change this link for gene related
+ HREF=geneNCBILink %geneSymbol
+ else:
+ outlineColor = pid.orange
+ fillColor = pid.orange
+ TITLE = "Gene: %s" % geneSymbol
+
+ #Draw Genes
+ geneYLocation = yPaddingTop + (gIndex % self.NUM_GENE_ROWS) * self.EACH_GENE_HEIGHT*zoom
+
+ if 1:#drawClickableRegions:
+ geneYLocation += self.UCSC_BAND_HEIGHT + self.BAND_SPACING + self.ENSEMBL_BAND_HEIGHT + self.BAND_SPACING + self.WEBQTL_BAND_HEIGHT + self.BAND_SPACING
+ else:
+ geneYLocation += self.BAND_SPACING
+
+ #draw the detail view
+ if self.endMb - self.startMb <= self.DRAW_DETAIL_MB and geneEndPix - geneStartPix > self.EACH_GENE_ARROW_SPACING * 3:
+ utrColor = pid.Color(0.66, 0.66, 0.66)
+ arrowColor = pid.Color(0.7, 0.7, 0.7)
+
+ #draw the line that runs the entire length of the gene
+ #canvas.drawString(str(geneStartPix), 300, 400)
+ canvas.drawLine(geneStartPix, geneYLocation + self.EACH_GENE_HEIGHT/2*zoom, geneEndPix, geneYLocation + self.EACH_GENE_HEIGHT/2*zoom, color=outlineColor, width=1)
+
+ #draw the arrows
+ for xCoord in range(0, geneEndPix-geneStartPix):
+
+ if (xCoord % self.EACH_GENE_ARROW_SPACING == 0 and xCoord + self.EACH_GENE_ARROW_SPACING < geneEndPix-geneStartPix) or xCoord == 0:
+ if strand == "+":
+ canvas.drawLine(geneStartPix + xCoord, geneYLocation, geneStartPix + xCoord + self.EACH_GENE_ARROW_WIDTH, geneYLocation +(self.EACH_GENE_HEIGHT / 2)*zoom, color=arrowColor, width=1)
+ canvas.drawLine(geneStartPix + xCoord, geneYLocation + self.EACH_GENE_HEIGHT*zoom, geneStartPix + xCoord+self.EACH_GENE_ARROW_WIDTH, geneYLocation + (self.EACH_GENE_HEIGHT / 2) * zoom, color=arrowColor, width=1)
+ else:
+ canvas.drawLine(geneStartPix + xCoord + self.EACH_GENE_ARROW_WIDTH, geneYLocation, geneStartPix + xCoord, geneYLocation +(self.EACH_GENE_HEIGHT / 2)*zoom, color=arrowColor, width=1)
+ canvas.drawLine(geneStartPix + xCoord + self.EACH_GENE_ARROW_WIDTH, geneYLocation + self.EACH_GENE_HEIGHT*zoom, geneStartPix + xCoord, geneYLocation + (self.EACH_GENE_HEIGHT / 2)*zoom, color=arrowColor, width=1)
+
+ #draw the blocks for the exon regions
+ for i in range(0, len(exonStarts)):
+ exonStartPix = (exonStarts[i]-startMb)*plotXScale + xLeftOffset
+ exonEndPix = (exonEnds[i]-startMb)*plotXScale + xLeftOffset
+ if (exonStartPix < xLeftOffset):
+ exonStartPix = xLeftOffset
+ if (exonEndPix < xLeftOffset):
+ exonEndPix = xLeftOffset
+ if (exonEndPix > xLeftOffset + plotWidth):
+ exonEndPix = xLeftOffset + plotWidth
+ if (exonStartPix > xLeftOffset + plotWidth):
+ exonStartPix = xLeftOffset + plotWidth
+ canvas.drawRect(exonStartPix, geneYLocation, exonEndPix, (geneYLocation + self.EACH_GENE_HEIGHT*zoom), edgeColor = outlineColor, fillColor = fillColor)
+
+ #draw gray blocks for 3' and 5' UTR blocks
+ if cdsStart and cdsEnd:
+
+ utrStartPix = (txStart-startMb)*plotXScale + xLeftOffset
+ utrEndPix = (cdsStart-startMb)*plotXScale + xLeftOffset
+ if (utrStartPix < xLeftOffset):
+ utrStartPix = xLeftOffset
+ if (utrEndPix < xLeftOffset):
+ utrEndPix = xLeftOffset
+ if (utrEndPix > xLeftOffset + plotWidth):
+ utrEndPix = xLeftOffset + plotWidth
+ if (utrStartPix > xLeftOffset + plotWidth):
+ utrStartPix = xLeftOffset + plotWidth
+ canvas.drawRect(utrStartPix, geneYLocation, utrEndPix, (geneYLocation+self.EACH_GENE_HEIGHT*zoom), edgeColor=utrColor, fillColor =utrColor)
+
+ if self.DRAW_UTR_LABELS and self.endMb - self.startMb <= self.DRAW_UTR_LABELS_MB:
+ if strand == "-":
+ labelText = "3'"
+ else:
+ labelText = "5'"
+ canvas.drawString(labelText, utrStartPix-9, geneYLocation+self.EACH_GENE_HEIGHT, pid.Font(face="helvetica", size=2))
+
+ #the second UTR region
+
+ utrStartPix = (cdsEnd-startMb)*plotXScale + xLeftOffset
+ utrEndPix = (txEnd-startMb)*plotXScale + xLeftOffset
+ if (utrStartPix < xLeftOffset):
+ utrStartPix = xLeftOffset
+ if (utrEndPix < xLeftOffset):
+ utrEndPix = xLeftOffset
+ if (utrEndPix > xLeftOffset + plotWidth):
+ utrEndPix = xLeftOffset + plotWidth
+ if (utrStartPix > xLeftOffset + plotWidth):
+ utrStartPix = xLeftOffset + plotWidth
+ canvas.drawRect(utrStartPix, geneYLocation, utrEndPix, (geneYLocation+self.EACH_GENE_HEIGHT*zoom), edgeColor=utrColor, fillColor =utrColor)
+
+ if self.DRAW_UTR_LABELS and self.endMb - self.startMb <= self.DRAW_UTR_LABELS_MB:
+ if tstrand == "-":
+ labelText = "5'"
+ else:
+ labelText = "3'"
+ canvas.drawString(labelText, utrEndPix+2, geneYLocation+self.EACH_GENE_HEIGHT, pid.Font(face="helvetica", size=2))
+
+ #draw the genes as rectangles
+ else:
+ canvas.drawRect(geneStartPix, geneYLocation, geneEndPix, (geneYLocation + self.EACH_GENE_HEIGHT*zoom), edgeColor = outlineColor, fillColor = fillColor)
+
+ COORDS = "%d, %d, %d, %d" %(geneStartPix, geneYLocation, geneEndPix, (geneYLocation + self.EACH_GENE_HEIGHT))
+ # NL: 06-02-2011 Rob required to display NCBI info in a new window
+ gifmap.areas.append(HT.Area(shape='rect',coords=COORDS,href=HREF, title=TITLE,target="_blank"))
+
+## BEGIN HaplotypeAnalyst
+ def drawHaplotypeBand(self, canvas, gifmap, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ if self.plotScale != 'physic' or self.selectedChr == -1 or not self.geneCol:
+ return
+
+
+ fpText = open(os.path.join(webqtlConfig.TMPDIR, "hallo") + '.txt','wb')
+
+ clickableRegionLabelFont=pid.Font(ttf="verdana", size=9, bold=0)
+
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ widthMultiplier = 1
+
+ yPaddingTop = yTopOffset
+
+ exprdrawn = 0
+
+ thisTrait = self.traitList[0]
+ _strains, _vals, _vars = thisTrait.exportInformative()
+
+ smd=[]
+ for ii, _val in enumerate(_vals):
+ temp = GeneralObject(name=_strains[ii], value=_val)
+ smd.append(temp)
+
+ smd.sort(lambda A, B: cmp(A.value, B.value))
+ smd.reverse()
+
+ bxdlist=list(self.genotype.prgy)
+
+ oldgeneEndPix = -1
+ #Initializing plotRight, error before
+ plotRight = xRightOffset
+
+#### find out PlotRight
+ for i, _locus in enumerate(self.genotype[0]):
+ txStart = self.genotype[0][i].Mb
+ txEnd = self.genotype[0][i].Mb
+
+ geneStartPix = xLeftOffset + plotXScale*(float(txStart) - startMb) - 0
+ geneEndPix = xLeftOffset + plotXScale*(float(txEnd) - startMb) - 0
+
+ drawit = 1
+ if (geneStartPix < xLeftOffset):
+ drawit = 0;
+ if (geneStartPix > xLeftOffset + plotWidth):
+ drawit = 0;
+
+ if drawit == 1:
+
+ if self.genotype[0][i].name != " - " :
+
+ plotRight = geneEndPix + 4
+
+
+
+#### end find out PlotRight
+
+ firstGene = 1
+ lastGene = 0
+
+ #Sets the length to the length of the strain list. Beforehand, "oldgeno = self.genotype[0][i].genotype"
+ #was the only place it was initialized, which worked as long as the very start (startMb = None/0) wasn't being mapped.
+ #Now there should always be some value set for "oldgeno" - Zach 12/14/2010
+ oldgeno = [None]*len(self.strainlist)
+
+ for i, _locus in enumerate(self.genotype[0]):
+ txStart = self.genotype[0][i].Mb
+ txEnd = self.genotype[0][i].Mb
+
+ geneStartPix = xLeftOffset + plotXScale*(float(txStart) - startMb) - 0
+ geneEndPix = xLeftOffset + plotXScale*(float(txEnd) - startMb) + 0
+
+ if oldgeneEndPix >= xLeftOffset:
+ drawStart = oldgeneEndPix + 4
+ else:
+ drawStart = xLeftOffset + 3
+
+ drawEnd = plotRight - 9
+
+ drawit = 1
+
+ if (geneStartPix < xLeftOffset):
+ if firstGene == 1:
+ drawit = 1
+ else:
+ drawit = 0
+
+ elif (geneStartPix > (xLeftOffset + plotWidth - 3)):
+ if lastGene == 0:
+ drawit = 1
+ drawEnd = xLeftOffset + plotWidth - 6
+ lastGene = 1
+ else:
+ break
+
+ else:
+ firstGene = 0
+ drawit = 1
+
+ if drawit == 1:
+ myColor = pid.darkblue
+ outlineColor = myColor
+ fillColor = myColor
+
+ maxind=0
+
+ #Draw Genes
+
+ geneYLocation = yPaddingTop + self.NUM_GENE_ROWS * (self.EACH_GENE_HEIGHT)*zoom
+
+ if 1:#drawClickableRegions:
+ geneYLocation += self.UCSC_BAND_HEIGHT + self.BAND_SPACING + self.ENSEMBL_BAND_HEIGHT + self.BAND_SPACING + self.WEBQTL_BAND_HEIGHT + self.BAND_SPACING
+ else:
+ geneYLocation += self.BAND_SPACING
+
+ if self.genotype[0][i].name != " - " :
+
+ if (firstGene == 1) and (lastGene != 1):
+ oldgeneEndPix = drawStart = xLeftOffset
+ oldgeno = self.genotype[0][i].genotype
+ continue
+
+ for j,_geno in enumerate (self.genotype[0][i].genotype):
+
+ plotbxd=0
+ for item in smd:
+ if item.name == bxdlist[j]:
+ plotbxd=1
+
+ if (plotbxd == 1):
+ ind = 0
+ counter = 0
+ for item in smd:
+ counter = counter + 1
+ if item.name == bxdlist[j]:
+ ind = counter
+ maxind=max(ind,maxind)
+
+ # lines
+ if (oldgeno[j] == -1 and _geno == -1):
+ mylineColor = self.HAPLOTYPE_NEGATIVE
+ elif (oldgeno[j] == 1 and _geno == 1):
+ mylineColor = self.HAPLOTYPE_POSITIVE
+ elif (oldgeno[j] == 0 and _geno == 0):
+ mylineColor = self.HAPLOTYPE_HETEROZYGOUS
+ else:
+ mylineColor = self.HAPLOTYPE_RECOMBINATION # XZ: Unknown
+
+ canvas.drawLine(drawStart, geneYLocation+7+2*ind*self.EACH_GENE_HEIGHT*zoom, drawEnd, geneYLocation+7+2*ind*self.EACH_GENE_HEIGHT*zoom, color = mylineColor, width=zoom*(self.EACH_GENE_HEIGHT+2))
+
+ fillColor=pid.black
+ outlineColor=pid.black
+ if lastGene == 0:
+ canvas.drawRect(geneStartPix, geneYLocation+2*ind*self.EACH_GENE_HEIGHT*zoom, geneEndPix, geneYLocation+2*ind*self.EACH_GENE_HEIGHT+ 2*self.EACH_GENE_HEIGHT*zoom, edgeColor = outlineColor, fillColor = fillColor)
+
+
+ COORDS = "%d, %d, %d, %d" %(geneStartPix, geneYLocation+ind*self.EACH_GENE_HEIGHT, geneEndPix+1, (geneYLocation + ind*self.EACH_GENE_HEIGHT))
+ TITLE = "Strain: %s, marker (%s) \n Position %2.3f Mb." % (bxdlist[j], self.genotype[0][i].name, float(txStart))
+ HREF = ''
+ gifmap.areas.append(HT.Area(shape='rect',coords=COORDS,href=HREF, title=TITLE))
+
+ # if there are no more markers in a chromosome, the plotRight value calculated above will be before the plotWidth
+ # resulting in some empty space on the right side of the plot area. This draws an "unknown" bar from plotRight to the edge.
+ if (plotRight < (xLeftOffset + plotWidth - 3)) and (lastGene == 0):
+ drawEnd = xLeftOffset + plotWidth - 6
+ mylineColor = self.HAPLOTYPE_RECOMBINATION
+ canvas.drawLine(plotRight, geneYLocation+7+2*ind*self.EACH_GENE_HEIGHT*zoom, drawEnd, geneYLocation+7+2*ind*self.EACH_GENE_HEIGHT*zoom, color = mylineColor, width=zoom*(self.EACH_GENE_HEIGHT+2))
+
+
+ if lastGene == 0:
+ canvas.drawString("%s" % (self.genotype[0][i].name), geneStartPix , geneYLocation+17+2*maxind*self.EACH_GENE_HEIGHT*zoom, font=pid.Font(ttf="verdana", size=12, bold=0), color=pid.black, angle=-90)
+
+ oldgeneEndPix = geneEndPix;
+ oldgeno = self.genotype[0][i].genotype
+ firstGene = 0
+ else:
+ lastGene = 0
+
+ for j,_geno in enumerate (self.genotype[0][1].genotype):
+
+ plotbxd=0
+ for item in smd:
+ if item.name == bxdlist[j]:
+ plotbxd=1
+
+ if (plotbxd == 1):
+
+ ind = 0
+ counter = 0
+ expr = 0
+ for item in smd:
+ counter = counter + 1
+ if item.name == bxdlist[j]:
+ ind = counter
+ expr = item.value
+
+ # Place where font is hardcoded
+ canvas.drawString("%s" % (bxdlist[j]), (xLeftOffset + plotWidth + 10) , geneYLocation+8+2*ind*self.EACH_GENE_HEIGHT*zoom, font=pid.Font(ttf="verdana", size=12, bold=0), color=pid.black)
+ canvas.drawString("%2.2f" % (expr), (xLeftOffset + plotWidth + 60) , geneYLocation+8+2*ind*self.EACH_GENE_HEIGHT*zoom, font=pid.Font(ttf="verdana", size=12, bold=0), color=pid.black)
+
+ fpText.close()
+
+## END HaplotypeAnalyst
+
+ def drawClickBand(self, canvas, gifmap, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ if self.plotScale != 'physic' or self.selectedChr == -1:
+ return
+
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ # only draw this many clickable regions (if you set it higher, you get more precision in clicking,
+ # but it makes the HTML huge, and takes forever to render the page in the first place)
+ # Draw the bands that you can click on to go to UCSC / Ensembl
+ MAX_CLICKABLE_REGION_DIVISIONS = 100
+ clickableRegionLabelFont=pid.Font(ttf="verdana", size=9, bold=0)
+ pixelStep = max(5, int(float(plotWidth)/MAX_CLICKABLE_REGION_DIVISIONS))
+ # pixelStep: every N pixels, we make a new clickable area for the user to go to that area of the genome.
+
+ numBasesCurrentlyOnScreen = self.kONE_MILLION*abs(startMb - endMb) # Number of bases on screen now
+ flankingWidthInBases = int ( min( (float(numBasesCurrentlyOnScreen) / 2.0), (5*self.kONE_MILLION) ) )
+ webqtlZoomWidth = numBasesCurrentlyOnScreen / 16.0
+ # Flanking width should be such that we either zoom in to a 10 million base region, or we show the clicked region at the same scale as we are currently seeing.
+
+ currentChromosome = self.genotype[0].name
+ i = 0
+
+ paddingTop = yTopOffset
+ ucscPaddingTop = paddingTop + self.WEBQTL_BAND_HEIGHT + self.BAND_SPACING
+ ensemblPaddingTop = ucscPaddingTop + self.UCSC_BAND_HEIGHT + self.BAND_SPACING
+
+ if zoom == 1:
+ for pixel in range(xLeftOffset, xLeftOffset + plotWidth, pixelStep):
+
+ calBase = self.kONE_MILLION*(startMb + (endMb-startMb)*(pixel-xLeftOffset-0.0)/plotWidth)
+
+ xBrowse1 = pixel
+ xBrowse2 = min(xLeftOffset + plotWidth, (pixel + pixelStep - 1))
+
+ WEBQTL_COORDS = "%d, %d, %d, %d" % (xBrowse1, paddingTop, xBrowse2, (paddingTop+self.WEBQTL_BAND_HEIGHT))
+ bandWidth = xBrowse2 - xBrowse1
+ WEBQTL_HREF = "javascript:centerIntervalMapOnRange2('%s', %f, %f, document.changeViewForm)" % (currentChromosome, max(0, (calBase-webqtlZoomWidth))/1000000.0, (calBase+webqtlZoomWidth)/1000000.0)
+
+ WEBQTL_TITLE = "Click to view this section of the genome in WebQTL"
+ gifmap.areas.append(HT.Area(shape='rect',coords=WEBQTL_COORDS,href=WEBQTL_HREF, title=WEBQTL_TITLE))
+ canvas.drawRect(xBrowse1, paddingTop, xBrowse2, (paddingTop + self.WEBQTL_BAND_HEIGHT), edgeColor=self.CLICKABLE_WEBQTL_REGION_COLOR, fillColor=self.CLICKABLE_WEBQTL_REGION_COLOR)
+ canvas.drawLine(xBrowse1, paddingTop, xBrowse1, (paddingTop + self.WEBQTL_BAND_HEIGHT), color=self.CLICKABLE_WEBQTL_REGION_OUTLINE_COLOR)
+
+ UCSC_COORDS = "%d, %d, %d, %d" %(xBrowse1, ucscPaddingTop, xBrowse2, (ucscPaddingTop+self.UCSC_BAND_HEIGHT))
+ if self.species == "mouse":
+ UCSC_HREF = "http://genome.ucsc.edu/cgi-bin/hgTracks?db=%s&position=chr%s:%d-%d&hgt.customText=%s/snp/chr%s" % (self._ucscDb, currentChromosome, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases, webqtlConfig.PORTADDR, currentChromosome)
+ else:
+ UCSC_HREF = "http://genome.ucsc.edu/cgi-bin/hgTracks?db=%s&position=chr%s:%d-%d" % (self._ucscDb, currentChromosome, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
+ UCSC_TITLE = "Click to view this section of the genome in the UCSC Genome Browser"
+ gifmap.areas.append(HT.Area(shape='rect',coords=UCSC_COORDS,href=UCSC_HREF, title=UCSC_TITLE))
+ canvas.drawRect(xBrowse1, ucscPaddingTop, xBrowse2, (ucscPaddingTop+self.UCSC_BAND_HEIGHT), edgeColor=self.CLICKABLE_UCSC_REGION_COLOR, fillColor=self.CLICKABLE_UCSC_REGION_COLOR)
+ canvas.drawLine(xBrowse1, ucscPaddingTop, xBrowse1, (ucscPaddingTop+self.UCSC_BAND_HEIGHT), color=self.CLICKABLE_UCSC_REGION_OUTLINE_COLOR)
+
+ ENSEMBL_COORDS = "%d, %d, %d, %d" %(xBrowse1, ensemblPaddingTop, xBrowse2, (ensemblPaddingTop+self.ENSEMBL_BAND_HEIGHT))
+ if self.species == "mouse":
+ ENSEMBL_HREF = "http://www.ensembl.org/Mus_musculus/contigview?highlight=&chr=%s&vc_start=%d&vc_end=%d&x=35&y=12" % (currentChromosome, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
+ else:
+ ENSEMBL_HREF = "http://www.ensembl.org/Rattus_norvegicus/contigview?chr=%s&start=%d&end=%d" % (currentChromosome, max(0, calBase-flankingWidthInBases), calBase+flankingWidthInBases)
+ ENSEMBL_TITLE = "Click to view this section of the genome in the Ensembl Genome Browser"
+ gifmap.areas.append(HT.Area(shape='rect',coords=ENSEMBL_COORDS,href=ENSEMBL_HREF, title=ENSEMBL_TITLE))
+ canvas.drawRect(xBrowse1, ensemblPaddingTop, xBrowse2, (ensemblPaddingTop+self.ENSEMBL_BAND_HEIGHT), edgeColor=self.CLICKABLE_ENSEMBL_REGION_COLOR, fillColor=self.CLICKABLE_ENSEMBL_REGION_COLOR)
+ canvas.drawLine(xBrowse1, ensemblPaddingTop, xBrowse1, (ensemblPaddingTop+self.ENSEMBL_BAND_HEIGHT), color=self.CLICKABLE_ENSEMBL_REGION_OUTLINE_COLOR)
+ # end for
+
+ canvas.drawString("Click to view the corresponding section of the genome in an 8x expanded WebQTL map", (xLeftOffset + 10), paddingTop + self.WEBQTL_BAND_HEIGHT/2, font=clickableRegionLabelFont, color=self.CLICKABLE_WEBQTL_TEXT_COLOR)
+ canvas.drawString("Click to view the corresponding section of the genome in the UCSC Genome Browser", (xLeftOffset + 10), ucscPaddingTop + self.UCSC_BAND_HEIGHT/2, font=clickableRegionLabelFont, color=self.CLICKABLE_UCSC_TEXT_COLOR)
+ canvas.drawString("Click to view the corresponding section of the genome in the Ensembl Genome Browser", (xLeftOffset+10), ensemblPaddingTop + self.ENSEMBL_BAND_HEIGHT/2, font=clickableRegionLabelFont, color=self.CLICKABLE_ENSEMBL_TEXT_COLOR)
+
+ #draw the gray text
+ chrFont = pid.Font(ttf="verdana", size=26*zoom, bold=1)
+ traitFont = pid.Font(ttf="verdana", size=14, bold=0)
+ chrX = xLeftOffset + plotWidth - 2 - canvas.stringWidth("Chr %s" % currentChromosome, font=chrFont)
+ canvas.drawString("Chr %s" % currentChromosome, chrX, ensemblPaddingTop-5, font=chrFont, color=pid.gray)
+ traitX = chrX - 28 - canvas.stringWidth("database", font=traitFont)
+ # end of drawBrowserClickableRegions
+ else:
+ #draw the gray text
+ chrFont = pid.Font(ttf="verdana", size=26*zoom, bold=1)
+ traitFont = pid.Font(ttf="verdana", size=14, bold=0)
+ chrX = xLeftOffset + (plotWidth - canvas.stringWidth("Chr %s" % currentChromosome, font=chrFont))/2
+ canvas.drawString("Chr %s" % currentChromosome, chrX, 32, font=chrFont, color=pid.gray)
+ traitX = chrX - 28 - canvas.stringWidth("database", font=traitFont)
+ # end of drawBrowserClickableRegions
+ pass
+
+ def drawXAxis(self, canvas, drawAreaHeight, gifmap, plotXScale, showLocusForm, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yZero = canvas.size[1] - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ #Parameters
+ NUM_MINOR_TICKS = 5 # Number of minor ticks between major ticks
+ X_MAJOR_TICK_THICKNESS = 2
+ X_MINOR_TICK_THICKNESS = 1
+ X_AXIS_THICKNESS = 1*zoom
+
+ # ======= Alex: Draw the X-axis labels (megabase location)
+ MBLabelFont = pid.Font(ttf="verdana", size=15*zoom, bold=0)
+ xMajorTickHeight = 10 * zoom # How high the tick extends below the axis
+ xMinorTickHeight = 5*zoom
+ xAxisTickMarkColor = pid.black
+ xAxisLabelColor = pid.black
+ fontHeight = 12*fontZoom # How tall the font that we're using is
+ spacingFromLabelToAxis = 5
+ spacingFromLineToLabel = 3
+
+ if self.plotScale == 'physic':
+ strYLoc = yZero + spacingFromLabelToAxis + canvas.fontHeight(MBLabelFont)
+ ###Physical single chromosome view
+ if self.selectedChr > -1:
+ graphMbWidth = endMb - startMb
+ XScale = Plot.detScale(startMb, endMb)
+ XStart, XEnd, XStep = XScale
+ if XStep < 8:
+ XStep *= 2
+ spacingAmtX = spacingAmt = (XEnd-XStart)/XStep
+
+ j = 0
+ while abs(spacingAmtX -int(spacingAmtX)) >= spacingAmtX/100.0 and j < 6:
+ j += 1
+ spacingAmtX *= 10
+
+ formatStr = '%%2.%df' % j
+
+ for counter, _Mb in enumerate(Plot.frange(XStart, XEnd, spacingAmt / NUM_MINOR_TICKS)):
+ if _Mb < startMb or _Mb > endMb:
+ continue
+ Xc = xLeftOffset + plotXScale*(_Mb - startMb)
+ if counter % NUM_MINOR_TICKS == 0: # Draw a MAJOR mark, not just a minor tick mark
+ canvas.drawLine(Xc, yZero, Xc, yZero+xMajorTickHeight, color=xAxisTickMarkColor, width=X_MAJOR_TICK_THICKNESS) # Draw the MAJOR tick mark
+ labelStr = str(formatStr % _Mb) # What Mbase location to put on the label
+ strWidth = canvas.stringWidth(labelStr, font=MBLabelFont)
+ drawStringXc = (Xc - (strWidth / 2.0))
+ canvas.drawString(labelStr, drawStringXc, strYLoc, font=MBLabelFont, color=xAxisLabelColor, angle=0)
+ else:
+ canvas.drawLine(Xc, yZero, Xc, yZero+xMinorTickHeight, color=xAxisTickMarkColor, width=X_MINOR_TICK_THICKNESS) # Draw the MINOR tick mark
+ # end else
+
+ ###Physical genome wide view
+ else:
+ distScale = 0
+ startPosX = xLeftOffset
+ for i, distLen in enumerate(self.ChrLengthDistList):
+ if distScale == 0: #universal scale in whole genome mapping
+ if distLen > 75:
+ distScale = 25
+ elif distLen > 30:
+ distScale = 10
+ else:
+ distScale = 5
+ for tickdists in range(distScale, int(ceil(distLen)), distScale):
+ canvas.drawLine(startPosX + tickdists*plotXScale, yZero, startPosX + tickdists*plotXScale, yZero + 7, color=pid.black, width=1*zoom)
+ canvas.drawString(str(tickdists), startPosX+tickdists*plotXScale, yZero + 10*zoom, color=pid.black, font=MBLabelFont, angle=270)
+ startPosX += (self.ChrLengthDistList[i]+self.GraphInterval)*plotXScale
+
+ megabaseLabelFont = pid.Font(ttf="verdana", size=18*zoom*1.5, bold=0)
+ canvas.drawString("Megabases", xLeftOffset + (plotWidth - canvas.stringWidth("Megabases", font=megabaseLabelFont))/2,
+ strYLoc + canvas.fontHeight(MBLabelFont)+ 10*(zoom%2) + 10, font=megabaseLabelFont, color=pid.black)
+ pass
+ else:
+ ChrAInfo = []
+ preLpos = -1
+ distinctCount = 0.0
+ if len(self.genotype) > 1:
+ for i, _chr in enumerate(self.genotype):
+ thisChr = []
+ Locus0CM = _chr[0].cM
+ nLoci = len(_chr)
+ if nLoci <= 8:
+ for _locus in _chr:
+ if _locus.name != ' - ':
+ if _locus.cM != preLpos:
+ distinctCount += 1
+ preLpos = _locus.cM
+ thisChr.append([_locus.name, _locus.cM-Locus0CM])
+ else:
+ for j in (0, nLoci/4, nLoci/2, nLoci*3/4, -1):
+ while _chr[j].name == ' - ':
+ j += 1
+ if _chr[j].cM != preLpos:
+ distinctCount += 1
+ preLpos = _chr[j].cM
+ thisChr.append([_chr[j].name, _chr[j].cM-Locus0CM])
+ ChrAInfo.append(thisChr)
+ else:
+ for i, _chr in enumerate(self.genotype):
+ thisChr = []
+ Locus0CM = _chr[0].cM
+ for _locus in _chr:
+ if _locus.name != ' - ':
+ if _locus.cM != preLpos:
+ distinctCount += 1
+ preLpos = _locus.cM
+ thisChr.append([_locus.name, _locus.cM-Locus0CM])
+ ChrAInfo.append(thisChr)
+
+ stepA = (plotWidth+0.0)/distinctCount
+
+ LRectWidth = 10
+ LRectHeight = 3
+ offsetA = -stepA
+ lineColor = pid.lightblue
+ startPosX = xLeftOffset
+ for j, ChrInfo in enumerate(ChrAInfo):
+ preLpos = -1
+ for i, item in enumerate(ChrInfo):
+ Lname,Lpos = item
+ if Lpos != preLpos:
+ offsetA += stepA
+ differ = 1
+ else:
+ differ = 0
+ preLpos = Lpos
+ Lpos *= plotXScale
+ if self.selectedChr > -1:
+ Zorder = i % 5
+ else:
+ Zorder = 0
+ if differ:
+ canvas.drawLine(startPosX+Lpos,yZero,xLeftOffset+offsetA,\
+ yZero+25, color=lineColor)
+ canvas.drawLine(xLeftOffset+offsetA,yZero+25,xLeftOffset+offsetA,\
+ yZero+40+Zorder*(LRectWidth+3),color=lineColor)
+ rectColor = pid.orange
+ else:
+ canvas.drawLine(xLeftOffset+offsetA, yZero+40+Zorder*(LRectWidth+3)-3,\
+ xLeftOffset+offsetA, yZero+40+Zorder*(LRectWidth+3),color=lineColor)
+ rectColor = pid.deeppink
+ canvas.drawRect(xLeftOffset+offsetA, yZero+40+Zorder*(LRectWidth+3),\
+ xLeftOffset+offsetA-LRectHeight,yZero+40+Zorder*(LRectWidth+3)+LRectWidth,\
+ edgeColor=rectColor,fillColor=rectColor,edgeWidth = 0)
+ COORDS="%d,%d,%d,%d"%(xLeftOffset+offsetA-LRectHeight, yZero+40+Zorder*(LRectWidth+3),\
+ xLeftOffset+offsetA,yZero+40+Zorder*(LRectWidth+3)+LRectWidth)
+ HREF="javascript:showDatabase3('%s','%s','%s','');" % (showLocusForm,fd.RISet+"Geno", Lname)
+ Areas=HT.Area(shape='rect',coords=COORDS,href=HREF, title="Locus : " + Lname)
+ gifmap.areas.append(Areas)
+ ##piddle bug
+ if j == 0:
+ canvas.drawLine(startPosX,yZero,startPosX,yZero+40, color=lineColor)
+ startPosX += (self.ChrLengthDistList[j]+self.GraphInterval)*plotXScale
+
+ canvas.drawLine(xLeftOffset, yZero, xLeftOffset+plotWidth, yZero, color=pid.black, width=X_AXIS_THICKNESS) # Draw the X axis itself
+
+
+ def drawQTL(self, canvas, drawAreaHeight, gifmap, plotXScale, offset= (40, 120, 80, 10), zoom = 1, startMb = None, endMb = None):
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+
+ INTERCROSS = (self.genotype.type=="intercross")
+
+ LRSHeightThresh = drawAreaHeight
+ AdditiveHeightThresh = drawAreaHeight/2
+ DominanceHeightThresh = drawAreaHeight/2
+
+ #draw the LRS scale
+ #We first determine whether or not we are using a sliding scale.
+ #If so, we need to compute the maximum LRS value to determine where the max y-value should be, and call this LRSMax.
+ #LRSTop is then defined to be above the LRSMax by enough to add one additional LRSScale increment.
+ #if we are using a set-scale, then we set LRSTop to be the user's value, and LRSMax doesn't matter.
+
+ if self.LRS_LOD == 'LOD':
+ lodm = self.LODFACTOR
+ else:
+ lodm = 1.0
+
+ if self.lrsMax <= 0: #sliding scale
+ if "lrs_value" in self.qtlresults[0]:
+ LRSMax = max([result['lrs_value'] for result in self.qtlresults])
+ #LRSMax = max(map(max, self.qtlresults)).lrs_value
+ else:
+ LRSMax = max([result['lod_score'] for result in self.qtlresults])
+ #LRSMax = max(map(max, self.qtlresults)).lod_score
+ #genotype trait will give infinite LRS
+ LRSMax = min(LRSMax, webqtlConfig.MAXLRS)
+ if self.permChecked and not self.multipleInterval:
+ self.significance = min(self.significance, webqtlConfig.MAXLRS)
+ self.suggestive = min(self.suggestive, webqtlConfig.MAXLRS)
+ LRSMax = max(self.significance, LRSMax)
+ else:
+ LRSMax = self.lrsMax*lodm
+
+ if LRSMax/lodm > 100:
+ LRSScale = 20.0
+ elif LRSMax/lodm > 20:
+ LRSScale = 5.0
+ elif LRSMax/lodm > 7.5:
+ LRSScale = 2.5
+ else:
+ LRSScale = 1.0
+
+ LRSAxisList = Plot.frange(LRSScale, LRSMax/lodm, LRSScale)
+ #make sure the user's value appears on the y-axis
+ #update by NL 6-21-2011: round the LOD value to 100 when LRSMax is equal to 460
+ LRSAxisList.append(round(LRSMax/lodm))
+
+ #draw the "LRS" or "LOD" string to the left of the axis
+ LRSScaleFont=pid.Font(ttf="verdana", size=16*zoom, bold=0)
+ LRSLODFont=pid.Font(ttf="verdana", size=18*zoom*1.5, bold=0)
+ yZero = yTopOffset + plotHeight
+
+ canvas.drawString(self.LRS_LOD, xLeftOffset - canvas.stringWidth("999.99", font=LRSScaleFont) - 15*(zoom-1), \
+ yZero - 150 - 300*(zoom - 1), font=LRSLODFont, color=pid.black, angle=90)
+
+ for item in LRSAxisList:
+ if LRSMax == 0.0:
+ LRSMax = 0.000001
+ yLRS = yZero - (item*lodm/LRSMax) * LRSHeightThresh
+ canvas.drawLine(xLeftOffset, yLRS, xLeftOffset - 4, yLRS, color=self.LRS_COLOR, width=1*zoom)
+ scaleStr = "%2.1f" % item
+ #Draw the LRS/LOD Y axis label
+ canvas.drawString(scaleStr, xLeftOffset-4-canvas.stringWidth(scaleStr, font=LRSScaleFont)-5, yLRS+3, font=LRSScaleFont, color=self.LRS_COLOR)
+
+
+ #"Significant" and "Suggestive" Drawing Routine
+ # ======= Draw the thick lines for "Significant" and "Suggestive" ===== (crowell: I tried to make the SNPs draw over these lines, but piddle wouldn't have it...)
+ print("DRAW SUGGESTIVE/SIGNFICANT LINES")
+ if self.permChecked and not self.multipleInterval:
+ significantY = yZero - self.significance*LRSHeightThresh/LRSMax
+ suggestiveY = yZero - self.suggestive*LRSHeightThresh/LRSMax
+ startPosX = xLeftOffset
+ for i, _chr in enumerate(self.genotype):
+ rightEdge = int(startPosX + self.ChrLengthDistList[i]*plotXScale - self.SUGGESTIVE_WIDTH/1.5)
+ canvas.drawLine(startPosX+self.SUGGESTIVE_WIDTH/1.5, suggestiveY, rightEdge, suggestiveY, color=self.SUGGESTIVE_COLOR,
+ width=self.SUGGESTIVE_WIDTH*zoom, clipX=(xLeftOffset, xLeftOffset + plotWidth-2))
+ canvas.drawLine(startPosX+self.SUGGESTIVE_WIDTH/1.5, significantY, rightEdge, significantY, color=self.SIGNIFICANT_COLOR,
+ width=self.SIGNIFICANT_WIDTH*zoom, clipX=(xLeftOffset, xLeftOffset + plotWidth-2))
+ sugg_coords = "%d, %d, %d, %d" % (startPosX, suggestiveY-2, rightEdge + 2*zoom, suggestiveY+2)
+ sig_coords = "%d, %d, %d, %d" % (startPosX, significantY-2, rightEdge + 2*zoom, significantY+2)
+ if self.LRS_LOD == 'LRS':
+ sugg_title = "Suggestive LRS = %0.2f" % self.suggestive
+ sig_title = "Significant LRS = %0.2f" % self.significance
+ else:
+ sugg_title = "Suggestive LOD = %0.2f" % (self.suggestive/4.61)
+ sig_title = "Significant LOD = %0.2f" % (self.significance/4.61)
+ Areas1 = HT.Area(shape='rect',coords=sugg_coords,title=sugg_title)
+ Areas2 = HT.Area(shape='rect',coords=sig_coords,title=sig_title)
+ gifmap.areas.append(Areas1)
+ gifmap.areas.append(Areas2)
+
+ startPosX += (self.ChrLengthDistList[i]+self.GraphInterval)*plotXScale
+
+
+ if self.multipleInterval:
+ lrsEdgeWidth = 1
+ else:
+ #additiveMax = max(map(lambda X : abs(X.additive), self.qtlresults[0]))
+ #if INTERCROSS:
+ # dominanceMax = max(map(lambda X : abs(X.dominance), self.qtlresults[0]))
+ #else:
+ # dominanceMax = -1
+ lrsEdgeWidth = 2
+
+ if zoom == 2:
+ lrsEdgeWidth = 2 * lrsEdgeWidth
+ print("DRAW QTL RESULT CURVE")
+
+ LRSCoordXY = []
+ AdditiveCoordXY = []
+ DominanceCoordXY = []
+
+ previous_chr = 1
+ previous_chr_as_int = 1
+ for i, qtlresult in enumerate(self.qtlresults):
+ m = 0
+ startPosX = xLeftOffset
+ thisLRSColor = self.colorCollection[0]
+ #for j, _chr in enumerate(self.genotype):
+ if 1 == 1:
+ #LRSCoordXY = []
+ #AdditiveCoordXY = []
+ #DominanceCoordXY = []
+ #for k, _locus in enumerate(_chr):
+ if 1 == 1:
+ if self.plotScale == 'physic':
+ #Xc = startPosX + (_locus.Mb-startMb)*plotXScale
+ Xc = startPosX + (qtlresult['Mb']-startMb)*plotXScale
+ else:
+ #Xc = startPosX + (_locus.cM-_chr[0].cM)*plotXScale
+ Xc = startPosX + (qtlresult['cM']-qtlresult[0]['cM'])*plotXScale
+
+ # updated by NL 06-18-2011:
+ # fix the over limit LRS graph issue since genotype trait may give infinite LRS;
+ # for any lrs is over than 460(LRS max in this system), it will be reset to 460
+ if qtlresult['lrs_value'] > 460 or qtlresult['lrs_value']=='inf':
+ #if self.qtlresults[j]['lrs_value'] > 460 or self.qtlresults[j]['lrs_value']=='inf':
+ Yc = yZero - webqtlConfig.MAXLRS*LRSHeightThresh/LRSMax
+ else:
+ Yc = yZero - qtlresult['lrs_value']*LRSHeightThresh/LRSMax
+
+ LRSCoordXY.append((Xc, Yc))
+ #if not self.multipleInterval and self.additiveChecked:
+ # if additiveMax == 0.0:
+ # additiveMax = 0.000001
+ # Yc = yZero - qtlresult[m].additive*AdditiveHeightThresh/additiveMax
+ # AdditiveCoordXY.append((Xc, Yc))
+ #if not self.multipleInterval and INTERCROSS and self.additiveChecked:
+ # Yc = yZero - qtlresult[m].dominance*DominanceHeightThresh/dominanceMax
+ # DominanceCoordXY.append((Xc, Yc))
+ m += 1
+ #canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+
+ lineWidth = 1
+ if not self.multipleInterval and self.additiveChecked:
+ plusColor = self.ADDITIVE_COLOR_POSITIVE
+ minusColor = self.ADDITIVE_COLOR_NEGATIVE
+ for k, aPoint in enumerate(AdditiveCoordXY):
+ if k > 0:
+ Xc0, Yc0 = AdditiveCoordXY[k-1]
+ Xc, Yc = aPoint
+ if (Yc0-yZero)*(Yc-yZero) < 0:
+ if Xc == Xc0: #genotype , locus distance is 0
+ Xcm = Xc
+ else:
+ Xcm = (yZero-Yc0)/((Yc-Yc0)/(Xc-Xc0)) +Xc0
+ if Yc0 < yZero:
+ canvas.drawLine(Xc0, Yc0, Xcm, yZero, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ canvas.drawLine(Xcm, yZero, Xc, yZero-(Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xcm, yZero, color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ canvas.drawLine(Xcm, yZero, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ elif (Yc0-yZero)*(Yc-yZero) > 0:
+ if Yc < yZero:
+ canvas.drawLine(Xc0, Yc0, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xc, yZero - (Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ minYc = min(Yc-yZero, Yc0-yZero)
+ if minYc < 0:
+ canvas.drawLine(Xc0, Yc0, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xc, yZero - (Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ if not self.multipleInterval and INTERCROSS and self.dominanceChecked:
+ plusColor = self.DOMINANCE_COLOR_POSITIVE
+ minusColor = self.DOMINANCE_COLOR_NEGATIVE
+ for k, aPoint in enumerate(DominanceCoordXY):
+ if k > 0:
+ Xc0, Yc0 = DominanceCoordXY[k-1]
+ Xc, Yc = aPoint
+ if (Yc0-yZero)*(Yc-yZero) < 0:
+ if Xc == Xc0: #genotype , locus distance is 0
+ Xcm = Xc
+ else:
+ Xcm = (yZero-Yc0)/((Yc-Yc0)/(Xc-Xc0)) +Xc0
+ if Yc0 < yZero:
+ canvas.drawLine(Xc0, Yc0, Xcm, yZero, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ canvas.drawLine(Xcm, yZero, Xc, yZero-(Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xcm, yZero, color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ canvas.drawLine(Xcm, yZero, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ elif (Yc0-yZero)*(Yc-yZero) > 0:
+ if Yc < yZero:
+ canvas.drawLine(Xc0, Yc0, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xc, yZero - (Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ minYc = min(Yc-yZero, Yc0-yZero)
+ if minYc < 0:
+ canvas.drawLine(Xc0, Yc0, Xc, Yc, color=plusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+ else:
+ canvas.drawLine(Xc0, yZero - (Yc0-yZero), Xc, yZero - (Yc-yZero), color=minusColor, width=lineWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+
+ print("previous_chr:", previous_chr_as_int)
+ startPosX += (self.ChrLengthDistList[previous_chr_as_int-1]+self.GraphInterval)*plotXScale
+ #startPosX += (self.ChrLengthDistList[j]+self.GraphInterval)*plotXScale
+
+ if qtlresult['chr'] != previous_chr:
+ previous_chr = qtlresult['chr']
+ try:
+ previous_chr_as_int = int(previous_chr)
+ except:
+ previous_chr_as_int += 1
+
+ canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
+
+ print("AFTER QTL CURVE")
+
+ ###draw additive scale
+ if not self.multipleInterval and self.additiveChecked:
+ additiveScaleFont=pid.Font(ttf="verdana",size=16*zoom,bold=0)
+ additiveScale = Plot.detScaleOld(0,additiveMax)
+ additiveStep = (additiveScale[1]-additiveScale[0])/additiveScale[2]
+ additiveAxisList = Plot.frange(0, additiveScale[1], additiveStep)
+ maxAdd = additiveScale[1]
+ addPlotScale = AdditiveHeightThresh/additiveMax
+
+ additiveAxisList.append(additiveScale[1])
+ for item in additiveAxisList:
+ additiveY = yZero - item*addPlotScale
+ canvas.drawLine(xLeftOffset + plotWidth,additiveY,xLeftOffset+4+ plotWidth,additiveY,color=self.ADDITIVE_COLOR_POSITIVE, width=1*zoom)
+ scaleStr = "%2.3f" % item
+ canvas.drawString(scaleStr,xLeftOffset + plotWidth +6,additiveY+5,font=additiveScaleFont,color=self.ADDITIVE_COLOR_POSITIVE)
+
+ canvas.drawLine(xLeftOffset+plotWidth,additiveY,xLeftOffset+plotWidth,yZero,color=self.ADDITIVE_COLOR_POSITIVE, width=1*zoom)
+
+ canvas.drawLine(xLeftOffset, yZero, xLeftOffset, yTopOffset + 30*(zoom - 1), color=self.LRS_COLOR, width=1*zoom) #the blue line running up the y axis
+
+
+ def drawGraphBackground(self, canvas, gifmap, offset= (80, 120, 80, 50), zoom = 1, startMb = None, endMb = None):
+ ##conditions
+ ##multiple Chromosome view
+ ##single Chromosome Physical
+ ##single Chromosome Genetic
+ xLeftOffset, xRightOffset, yTopOffset, yBottomOffset = offset
+ plotWidth = canvas.size[0] - xLeftOffset - xRightOffset
+ plotHeight = canvas.size[1] - yTopOffset - yBottomOffset
+ yBottom = yTopOffset+plotHeight
+ fontZoom = zoom
+ if zoom == 2:
+ fontZoom = 1.5
+ yTopOffset += 30
+
+ #calculate plot scale
+ if self.plotScale != 'physic':
+ self.ChrLengthDistList = self.ChrLengthCMList
+ drawRegionDistance = self.ChrLengthCMSum
+ else:
+ self.ChrLengthDistList = self.ChrLengthMbList
+ drawRegionDistance = self.ChrLengthMbSum
+
+ if self.selectedChr > -1: #single chromosome view
+ spacingAmt = plotWidth/13.5
+ i = 0
+ for startPix in Plot.frange(xLeftOffset, xLeftOffset+plotWidth, spacingAmt):
+ if (i % 2 == 0):
+ theBackColor = self.GRAPH_BACK_DARK_COLOR
+ else:
+ theBackColor = self.GRAPH_BACK_LIGHT_COLOR
+ i += 1
+ canvas.drawRect(startPix, yTopOffset, min(startPix+spacingAmt, xLeftOffset+plotWidth), \
+ yBottom, edgeColor=theBackColor, fillColor=theBackColor)
+
+ drawRegionDistance = self.ChrLengthDistList[self.selectedChr]
+ self.ChrLengthDistList = [drawRegionDistance]
+ if self.plotScale == 'physic':
+ plotXScale = plotWidth / (endMb-startMb)
+ else:
+ plotXScale = plotWidth / drawRegionDistance
+
+ else: #multiple chromosome view
+ plotXScale = plotWidth / ((len(self.genotype)-1)*self.GraphInterval + drawRegionDistance)
+
+ startPosX = xLeftOffset
+ if fontZoom == 1.5:
+ chrFontZoom = 2
+ else:
+ chrFontZoom = 1
+ chrLabelFont=pid.Font(ttf="verdana",size=24*chrFontZoom,bold=0)
+
+ for i, _chr in enumerate(self.genotype):
+ if (i % 2 == 0):
+ theBackColor = self.GRAPH_BACK_DARK_COLOR
+ else:
+ theBackColor = self.GRAPH_BACK_LIGHT_COLOR
+
+ #draw the shaded boxes and the sig/sug thick lines
+ canvas.drawRect(startPosX, yTopOffset, startPosX + self.ChrLengthDistList[i]*plotXScale, \
+ yBottom, edgeColor=pid.gainsboro,fillColor=theBackColor)
+
+ chrNameWidth = canvas.stringWidth(_chr.name, font=chrLabelFont)
+ chrStartPix = startPosX + (self.ChrLengthDistList[i]*plotXScale -chrNameWidth)/2
+ chrEndPix = startPosX + (self.ChrLengthDistList[i]*plotXScale +chrNameWidth)/2
+
+ canvas.drawString(_chr.name, chrStartPix, yTopOffset + 20 ,font = chrLabelFont,color=pid.black)
+ COORDS = "%d,%d,%d,%d" %(chrStartPix, yTopOffset, chrEndPix,yTopOffset +20)
+
+ #add by NL 09-03-2010
+ HREF = "javascript placeholder"
+ #HREF = "javascript:changeView(%d,%s);" % (i,self.ChrLengthMbList)
+ Areas = HT.Area(shape='rect',coords=COORDS,href=HREF)
+ gifmap.areas.append(Areas)
+ startPosX += (self.ChrLengthDistList[i]+self.GraphInterval)*plotXScale
+
+ return plotXScale
+
+ def calculateAllResult(self, fd):
+
+ weightedRegression = fd.formdata.getvalue('applyVarianceSE')
+
+ self.genotype = self.genotype.addinterval()
+ resultSlice = []
+ controlGeno = []
+
+ if self.multipleInterval:
+ self.suggestive = 0
+ self.significance = 0
+ if self.selectedChr > -1:
+ self.genotype.chromosome = [self.genotype[self.selectedChr]]
+ else:
+ #single interval mapping
+ try:
+ self.suggestive = float(fd.formdata.getvalue('permSuggestive'))
+ self.significance = float(fd.formdata.getvalue('permSignificance'))
+ except:
+ self.suggestive = None
+ self.significance = None
+
+ _strains, _vals, _vars = self.traitList[0].exportInformative(weightedRegression)
+
+ if webqtlUtil.ListNotNull(_vars):
+ pass
+ else:
+ weightedRegression = 0
+ _strains, _vals, _vars = self.traitList[0].exportInformative()
+
+ ##locate genotype of control Locus
+ if self.controlLocus:
+ controlGeno2 = []
+ _FIND = 0
+ for _chr in self.genotype:
+ for _locus in _chr:
+ if _locus.name == self.controlLocus:
+ controlGeno2 = _locus.genotype
+ _FIND = 1
+ break
+ if _FIND:
+ break
+ if controlGeno2:
+ _prgy = list(self.genotype.prgy)
+ for _strain in _strains:
+ _idx = _prgy.index(_strain)
+ controlGeno.append(controlGeno2[_idx])
+ else:
+ return "The control marker you selected is not in the genofile."
+
+ if weightedRegression:
+ self.LRSArray = self.genotype.permutation(strains = _strains, trait = _vals,
+ variance = _vars, nperm=self.nperm)
+ else:
+ self.LRSArray = self.genotype.permutation(strains = _strains, trait = _vals,
+ nperm=self.nperm)
+
+ if self.significance and self.suggestive:
+ pass
+ else:
+ if self.nperm < 100:
+ self.suggestive = 0
+ self.significance = 0
+ else:
+ self.suggestive = self.LRSArray[int(self.nperm*0.37-1)]
+ self.significance = self.LRSArray[int(self.nperm*0.95-1)]
+
+ #calculating bootstrap
+ #from now on, genotype could only contain a single chromosome
+ #permutation need to be performed genome wide, this is not the case for bootstrap
+
+ #due to the design of qtlreaper, composite regression need to be performed genome wide
+ if not self.controlLocus and self.selectedChr > -1:
+ self.genotype.chromosome = [self.genotype[self.selectedChr]]
+ elif self.selectedChr > -1: #self.controlLocus and self.selectedChr > -1
+ lociPerChr = map(len, self.genotype)
+ resultSlice = reduce(lambda X, Y: X+Y, lociPerChr[:self.selectedChr], 0)
+ resultSlice = [resultSlice,resultSlice+lociPerChr[self.selectedChr]]
+ else:
+ pass
+
+ #calculate QTL for each trait
+ self.qtlresults = []
+
+ for thisTrait in self.traitList:
+ _strains, _vals, _vars = thisTrait.exportInformative(weightedRegression)
+ if self.controlLocus:
+ if weightedRegression:
+ qtlresult = self.genotype.regression(strains = _strains, trait = _vals,
+ variance = _vars, control = self.controlLocus)
+ else:
+ qtlresult = self.genotype.regression(strains = _strains, trait = _vals,
+ control = self.controlLocus)
+ if resultSlice:
+ qtlresult = qtlresult[resultSlice[0]:resultSlice[1]]
+ else:
+ if weightedRegression:
+ qtlresult = self.genotype.regression(strains = _strains, trait = _vals,
+ variance = _vars)
+ else:
+ qtlresult = self.genotype.regression(strains = _strains, trait = _vals)
+
+ self.qtlresults.append(qtlresult)
+
+ if not self.multipleInterval:
+ if self.controlLocus and self.selectedChr > -1:
+ self.genotype.chromosome = [self.genotype[self.selectedChr]]
+
+ if self.bootChecked:
+ if controlGeno:
+ self.bootResult = self.genotype.bootstrap(strains = _strains, trait = _vals,
+ control = controlGeno, nboot=fd.nboot)
+ elif weightedRegression:
+ self.bootResult = self.genotype.bootstrap(strains = _strains, trait = _vals,
+ variance = _vars, nboot=fd.nboot)
+ else:
+ self.bootResult = self.genotype.bootstrap(strains = _strains, trait = _vals,
+ nboot=fd.nboot)
+ else:
+ self.bootResult = []
+
+ def calculatePValue (self, query_LRS, permutation_LRS_array):
+ query_index = len(permutation_LRS_array)
+ for i, one_permutation_LRS in enumerate(permutation_LRS_array):
+ if one_permutation_LRS >= query_LRS:
+ query_index = i
+ break
+ try:
+ P_value = float(len(permutation_LRS_array) - query_index) / len(permutation_LRS_array)
+ except:
+ P_value = ''
+ return P_value
+
+ def helpButton(self, anchor):
+ return HT.Href(self.HELP_PAGE_REF + '#%s' % anchor, self.qmarkImg, target=self.HELP_WINDOW_NAME)
+
+
+ def traitRemapTD(self, cursor, fd):
+ chrList = HT.Select(name="chromosomes", data=self.ChrList, selected=[self.selectedChr],
+ onChange="chrLength(this.form.chromosomes.value, this.form.scale.value, this.form, self.ChrLengthMbList);")
+
+ physicOnly = HT.Span(' *', Class="cr")
+
+ showSNPCheck = HT.Input(type='checkbox', Class='checkbox', name='showSNP', value='ON', checked=self.SNPChecked)
+ showSNPText = HT.Span('SNP Track ', self.helpButton("snpSeismograph"), Class="fs12 fwn")
+
+ showGenesCheck = HT.Input(type='checkbox', Class='checkbox', name='showGenes', value='ON', checked=self.geneChecked)
+ showGenesText = HT.Span('Gene Track', Class="fs12 fwn")
+
+ showIntervalAnalystCheck = HT.Input(type='checkbox', Class='checkbox', name='intervalAnalystCheck', value='ON', checked=self.intervalAnalystChecked)
+ showIntervalAnalystText = HT.Span('Interval Analyst', Class="fs12 fwn")
+## BEGIN HaplotypeAnalyst
+
+ showHaplotypeAnalystCheck = HT.Input(type='checkbox', Class='checkbox', name='haplotypeAnalystCheck', value='ON', checked=self.haplotypeAnalystChecked)
+ showHaplotypeAnalystText = HT.Span('Haplotype Analyst', Class="fs12 fwn")
+## END HaplotypeAnalyst
+
+ leftBox = HT.Input(type="text", name="startMb", size=10)
+ rightBox = HT.Input(type="text", name="endMb", size=10)
+ if self.selectedChr > -1 and self.plotScale=='physic':
+ leftBox.value = self.startMb
+ rightBox.value = self.endMb
+
+ scaleBox = HT.Select(name="scale", onChange="chrLength(this.form.chromosomes.value, this.form.scale.value, this.form, self.ChrLengthMbList);")
+ scaleBox.append(("Genetic", "morgan"))
+ if fd.genotype.Mbmap:
+ scaleBox.append(("Physical", "physic"))
+ scaleBox.selected.append(self.plotScale)
+
+ permBox = HT.Input(type="checkbox", name="permCheck", value='ON', checked=self.permChecked, Class="checkbox")
+ permText = HT.Span("Permutation Test ", self.helpButton("Permutation"), Class="fs12 fwn")
+ bootBox = HT.Input(type="checkbox", name="bootCheck", value='ON', checked=self.bootChecked, Class="checkbox")
+ bootText = HT.Span("Bootstrap Test ", self.helpButton("bootstrap"), Class="fs12 fwn")
+ additiveBox = HT.Input(type="checkbox", name="additiveCheck", value='ON', checked=self.additiveChecked, Class="checkbox")
+ additiveText = HT.Span("Allele Effects ", self.helpButton("additive"), Class="fs12 fwn")
+ dominanceBox = HT.Input(type="checkbox", name="dominanceCheck", value='ON', checked=self.dominanceChecked, Class="checkbox")
+ dominanceText = HT.Span("Dominance Effects ", self.helpButton("Dominance"), Class="fs12 fwn")
+
+ lrsRadio = HT.Input(type="radio", name="LRSCheck", value='LRS', checked = (self.LRS_LOD == "LRS"))
+ lodRadio = HT.Input(type="radio", name="LRSCheck", value='LOD', checked = (self.LRS_LOD != "LRS"))
+ lrsMaxBox = HT.Input(type="text", name="lrsMax", value=self.lrsMax, size=3)
+ widthBox = HT.Input(type="text", name="graphWidth", size=5, value=str(self.graphWidth))
+ legendBox = HT.Input(type="checkbox", name="viewLegend", value='ON', checked=self.legendChecked, Class="checkbox")
+ legendText = HT.Span("Legend", Class="fs12 fwn")
+
+ draw2XBox = HT.Input(type="checkbox", name="draw2X", value='ON', Class="checkbox")
+ draw2XText = HT.Span("2X Plot", Class="fs12 fwn")
+
+ regraphButton = HT.Input(type="button", Class="button", onClick="javascript:databaseFunc(this.form,'showIntMap');", value="Remap")
+ controlsForm = HT.Form(cgi= os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE), enctype="multipart/form-data", name="changeViewForm", submit=HT.Input(type='hidden'))
+ controlsTable = HT.TableLite(border=0)
+ innerControlsTable = HT.TableLite(border=0)
+ if self.selectedChr == -1:
+ minimumGraphWidth = self.MULT_GRAPH_MIN_WIDTH
+ else:
+ minimumGraphWidth = self.GRAPH_MIN_WIDTH
+ innerControlsTable.append(
+ HT.TR(HT.TD("Chr: ", Class="fs12 fwb ffl"),HT.TD(chrList, scaleBox, regraphButton)),
+ HT.TR(HT.TD("View: ", Class="fs12 fwb ffl"),HT.TD(leftBox, " to ", rightBox, "Mb", physicOnly, NOWRAP="on")),
+ HT.TR(HT.TD("Units: ", Class="fs12 fwb ffl"), HT.TD(lrsRadio, "LRS ", lodRadio, "LOD ", self.helpButton("LOD"))),
+ HT.TR(HT.TD(" ", Class="fs12 fwb ffl"), HT.TD(lrsMaxBox, "units on Y-axis (0 for default)", Class="fs11 fwn")),
+ HT.TR(HT.TD("Width: ", Class="fs12 fwb ffl"), HT.TD(widthBox, "pixels (minimum=%d)" % minimumGraphWidth, Class="fs11 fwn "))
+ )
+ #whether SNP
+ # comment this, because this will make caculation very slow.
+ #cursor.execute("Select Species.Id from SnpAll, Species where SnpAll.SpeciesId = Species.Id and Species.Name = %s limit 1", self.species)
+ #SNPorNot = cursor.fetchall()
+ SNPorNot = True
+ #Whether Gene
+ cursor.execute("Select Species.Id from GeneList, Species where GeneList.SpeciesId = Species.Id and Species.Name = %s limit 1", self.species)
+ GeneorNot = cursor.fetchall()
+
+ if self.multipleInterval:
+ optionPanel = HT.TD(valign="top", NOWRAP="on")
+ else:
+ optionPanel = HT.TD(permBox, permText, HT.BR(), bootBox, bootText, HT.BR(), additiveBox, additiveText, HT.BR(), valign="top", NOWRAP="on")
+ #whether dominance
+ if self.genotype.type == 'intercross':
+ optionPanel.append(dominanceBox, dominanceText, HT.BR())
+ if SNPorNot:
+ optionPanel.append(showSNPCheck, showSNPText, physicOnly, HT.BR())
+ if GeneorNot:
+ optionPanel.append(showGenesCheck, showGenesText, physicOnly, HT.BR(),
+ showIntervalAnalystCheck, showIntervalAnalystText, physicOnly, HT.BR())
+## BEGIN HaplotypeAnalyst
+ optionPanel.append(showHaplotypeAnalystCheck, showHaplotypeAnalystText, physicOnly, HT.BR())
+## END HaplotypeAnalyst
+ optionPanel.append(legendBox, legendText, HT.BR(),draw2XBox, draw2XText)
+ controlsTable.append(
+ HT.TR(HT.TD(innerControlsTable, valign="top"),
+ HT.TD("&nbsp;", width=15), optionPanel),
+ HT.TR(HT.TD(physicOnly, " only apply to single chromosome physical mapping", align="Center", colspan=3, Class="fs11 fwn"))
+ )
+ controlsForm.append(controlsTable)
+
+ controlsForm.append(HT.Input(name="permSuggestive", value=self.suggestive, type="hidden"))
+ controlsForm.append(HT.Input(name="permSignificance", value=self.significance, type="hidden"))
+
+## BEGIN HaplotypeAnalyst #### haplotypeAnalystCheck added below
+## END HaplotypeAnalyst
+
+ for key in fd.formdata.keys():
+ if key == "searchResult" and type([]) == type(fd.formdata.getvalue(key)):
+ controlsForm.append(HT.Input(name=key, value=string.join(fd.formdata.getvalue(key), "\t"), type="hidden"))
+ elif key not in ("endMb", "startMb", "chromosomes", "scale", "permCheck", "bootCheck", "additiveCheck", "dominanceCheck",
+ "LRSCheck", "intervalAnalystCheck", "haplotypeAnalystCheck", "lrsMax", "graphWidth", "viewLegend", 'showGenes', 'showSNP', 'draw2X',
+ 'permSuggestive', "permSignificance"):
+ controlsForm.append(HT.Input(name=key, value=fd.formdata.getvalue(key), type="hidden"))
+ else:
+ pass
+
+ # updated by NL, move function changeView(i) to webqtl.js and change it to function changeView(i, Chr_Mb_list)
+ # move function chrLength(a, b, c) to webqtl.js and change it to function chrLength(a, b, c, Chr_Mb_list)
+ self.dict['js1'] = '<script src="/javascript/sorttable.js"></script>'
+ return HT.TD(controlsForm, Class="doubleBorder", width=400)
+
+ def traitInfoTD(self, fd):
+ if self.selectedChr == -1:
+ intMapHeading = HT.Paragraph('Map Viewer: Whole Genome', Class="title")
+ else:
+ intMapHeading = HT.Paragraph('Map Viewer: Chr %s' % self.genotype[0].name, Class="title")
+
+ heading2 = HT.Paragraph(HT.Strong('Population: '), "%s %s" % (self.species.title(), fd.RISet) , HT.BR())
+ #Trait is from an database
+ if self.traitList and self.traitList[0] and self.traitList[0].db:
+ #single trait
+ if len(self.traitList) == 1:
+ thisTrait = self.traitList[0]
+ trait_url = HT.Href(text=thisTrait.name, url = os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE) + \
+ "?FormID=showDatabase&incparentsf1=1&database=%s&ProbeSetID=%s" % (thisTrait.db.name, thisTrait.name), \
+ target='_blank', Class="normalsize")
+ heading2.append(HT.Strong("Database: "), HT.Href(text=thisTrait.db.fullname, url = webqtlConfig.INFOPAGEHREF % thisTrait.db.name ,\
+ target='_blank',Class="normalsize"),HT.BR())
+ if thisTrait.db.type == 'ProbeSet':
+ heading2.append(HT.Strong('Trait ID: '), trait_url, HT.BR(),
+ HT.Strong("Gene Symbol: "), HT.Italic('%s' % thisTrait.symbol,id="green"),HT.BR())
+ if thisTrait.chr and thisTrait.mb:
+ heading2.append(HT.Strong("Location: "), 'Chr %s @ %s Mb' % (thisTrait.chr, thisTrait.mb))
+ elif thisTrait.db.type == 'Geno':
+ heading2.append(HT.Strong('Locus : '), trait_url, HT.BR())
+ if thisTrait.chr and thisTrait.mb:
+ heading2.append(HT.Strong("Location: "), 'Chr %s @ %s Mb' % (thisTrait.chr, thisTrait.mb))
+ elif thisTrait.db.type == 'Publish':
+ heading2.append(HT.Strong('Record ID: '), trait_url, HT.BR())
+ else:
+ pass
+ else:
+ heading2.append(HT.Strong("Traits: "), "Multiple Traits")
+ else:
+ heading2.append(HT.Strong("Trait Name: "), fd.identification)
+ return HT.TD(intMapHeading, heading2, valign="top")
+
+ def drawPermutationHistogram(self):
+ #########################################
+ # Permutation Graph
+ #########################################
+ myCanvas = pid.PILCanvas(size=(400,300))
+ #plotBar(myCanvas,10,10,390,290,LRSArray,XLabel='LRS',YLabel='Frequency',title=' Histogram of Permutation Test',identification=fd.identification)
+ Plot.plotBar(myCanvas, self.LRSArray,XLabel='LRS',YLabel='Frequency',title=' Histogram of Permutation Test')
+ filename= webqtlUtil.genRandStr("Reg_")
+ myCanvas.save(webqtlConfig.IMGDIR+filename, format='gif')
+ img=HT.Image('/image/'+filename+'.gif',border=0,alt='Histogram of Permutation Test')
+
+
+ self.suggestive = self.LRSArray[int(self.nperm*0.37-1)]
+ self.significant = self.LRSArray[int(self.nperm*0.95-1)]
+ self.highlysignificant = self.LRSArray[int(self.nperm*0.99-1)]
+
+ permutationHeading = HT.Paragraph('Histogram of Permutation Test')
+ permutationHeading.__setattr__("class","title")
+
+ permutation = HT.TableLite()
+ permutation.append(HT.TR(HT.TD(img)),
+ HT.TR(HT.TD('')),
+ HT.TR(HT.TD('Total of %d permutations'%self.nperm)))
+
+ return permutation
+
+ def permutationTextFile(self):
+ filename= webqtlUtil.genRandStr("Reg_")
+ fpText = open('%s.txt' % (webqtlConfig.TMPDIR+filename), 'wb')
+ fpText.write('Suggestive LRS (p = 0.63) = %3.2f\n'%self.suggestive)
+ fpText.write('Significant LRS (p = 0.05) = %3.2f\n'%self.significant)
+ fpText.write('Highly Significant LRS (p = 0.01) = %3.2f\n\n'%self.highlysignificant)
+ fpText.write('%s Permutations\n\n' % str(len(self.LRSArray)))
+ LRSInfo =HT.Paragraph('&nbsp;&nbsp;&nbsp;&nbsp;Suggestive LRS = %3.2f\n'%self.suggestive,
+ HT.BR(),
+ '&nbsp;&nbsp;&nbsp;&nbsp;Significant LRS =%3.2f\n'%self.significant,
+ HT.BR(),
+ '&nbsp;&nbsp;&nbsp;&nbsp;Highly Significant LRS =%3.2f\n' % self.highlysignificant)
+
+ for lrs_value in self.LRSArray:
+ fpText.write(str(lrs_value) + "\n")
+
+ textUrl = HT.Href(text = 'Download Permutation Results', url= '/tmp/'+filename+'.txt', target = "_blank", Class='fs12 fwn')
+
+ return textUrl
+
+ def geneTable(self, geneCol, refGene=None):
+ #SNPLink = 0 #Not sure what this is used for
+
+ if self.species == 'mouse' or self.species == 'rat':
+
+ gene_tblobj = {}
+ gene_tblobj["header"] = self.getGeneTableHeader(refGene=None)
+ gene_tblobj["body"] = self.getGeneTableBody(geneCol, refGene=None)
+
+ sortby = self.getSortByValue()
+
+ filename= webqtlUtil.genRandStr("Mapping_")
+
+ objfile = open('%s.obj' % (webqtlConfig.TMPDIR+filename), 'wb')
+ cPickle.dump(gene_tblobj, objfile)
+ objfile.close()
+
+ gene_table = webqtlUtil.genTableObj(tblobj=gene_tblobj, file=filename, sortby=sortby, tableID="sortable", addIndex="0")
+
+ else:
+ gene_table = ""
+
+ return gene_table
+
+ def getLiteratureCorrelation(cursor,geneId1=None,geneId2=None):
+ if not geneId1 or not geneId2:
+ return None
+ if geneId1 == geneId2:
+ return 1.0
+ geneId1 = str(geneId1)
+ geneId2 = str(geneId2)
+ lCorr = None
+ try:
+ query = 'SELECT Value FROM LCorrRamin3 WHERE GeneId1 = %s and GeneId2 = %s'
+ for x,y in [(geneId1,geneId2),(geneId2,geneId1)]:
+ cursor.execute(query,(x,y))
+ lCorr = cursor.fetchone()
+ if lCorr:
+ lCorr = lCorr[0]
+ break
+ except: raise #lCorr = None
+ return lCorr
+
+ def getGeneTableHeader(self, refGene=None):
+
+ gene_tblobj_header = []
+
+ col_class = "fs14 fwb ffl b1 cw cbrb"
+
+ if self.species == "mouse":
+
+ if refGene:
+ gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0),
+ THCell(HT.TD('Symbol', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="symbol", idx=1),
+ THCell(HT.TD('Mb Start',HT.BR(),'(mm9)', align='left', width=100, Class=col_class), text="mb_start_mm9", idx=2),
+ THCell(HT.TD('Length (Kb)', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="length", idx=3),
+ THCell(HT.TD('SNP',HT.BR(),'Count', align='left', width=47, Class=col_class), text="snp_count", idx=4),
+ THCell(HT.TD('SNP',HT.BR(),'Density', align='left', width=78, Class=col_class), text="snp_density", idx=5),
+ THCell(HT.TD('Avg',HT.BR(),'Expr', HT.BR(), HT.BR(), align='left', width=44, Class=col_class), sort=0, idx=6),
+ THCell(HT.TD('Human',HT.BR(),'Chr', align='left', width=60, Class=col_class), text="human_chr", idx=7),
+ THCell(HT.TD('Mb Start',HT.BR(),'(hg19)', align='left', width=100, Class=col_class), text="mb_start_hg19", idx=8),
+ THCell(HT.TD('Literature',HT.BR(),'Correlation', align='left', width=100, Class=col_class), text="lit_corr", idx=9),
+ THCell(HT.TD('Gene Description', HT.BR(), HT.BR(), align='left', width=290, Class=col_class), text="description", idx=10),
+ THCell(HT.TD('PolymiRTS',HT.BR(),'Database', HT.BR(), HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank", Class="normalsize"),
+ align='left', width=100, Class=col_class), sort=0, idx=11),
+ THCell(HT.TD('Gene Weaver', HT.BR(), 'Info Content', HT.BR(), HT.Href(url='http://geneweaver.org/', text='>>', target="_blank", Class="normalsize"),
+ align='left', width=110, Class=col_class), sort=0, idx=12),
+ ]]
+ else:
+ gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0),
+ THCell(HT.TD('Symbol', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="symbol", idx=1),
+ THCell(HT.TD('Mb Start',HT.BR(),'(mm9)', align='left', width=100, Class=col_class), text="mb_start_mm9", idx=2),
+ THCell(HT.TD('Length (Kb)', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="length", idx=3),
+ THCell(HT.TD('SNP',HT.BR(),'Count', align='left', width=47, Class=col_class), text="snp_count", idx=4),
+ THCell(HT.TD('SNP',HT.BR(),'Density', align='left', width=78, Class=col_class), text="snp_density", idx=5),
+ THCell(HT.TD('Avg',HT.BR(),'Expr', HT.BR(), HT.BR(), align='left', width=44, Class=col_class), sort=0, idx=6),
+ THCell(HT.TD('Human',HT.BR(),'Chr', align='left', width=60, Class=col_class), text="human_chr", idx=7),
+ THCell(HT.TD('Mb Start',HT.BR(),'(hg19)', align='left', width=100, Class=col_class), text="mb_start_hg19", idx=8),
+ THCell(HT.TD('Gene Description', HT.BR(), HT.BR(), align='left', width=290, Class=col_class), text="description", idx=9),
+ THCell(HT.TD('PolymiRTS',HT.BR(),'Database', HT.BR(), HT.Href(url='http://compbio.uthsc.edu/miRSNP/', text='>>', target="_blank", Class="normalsize"),
+ align='left', width=100, Class=col_class), sort=0, idx=10),
+ THCell(HT.TD('Gene Weaver', HT.BR(), 'Info Content', HT.BR(), HT.Href(url='http://geneweaver.org/', text='>>', target="_blank", Class="normalsize"),
+ align='left', width=110, Class=col_class), sort=0, idx=11),
+ ]]
+
+ elif self.species == "rat":
+
+ gene_tblobj_header = [[THCell(HT.TD('Index', HT.BR(), HT.BR(), align='left', width=50, Class=col_class), text="index", idx=0),
+ THCell(HT.TD('Symbol', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="symbol", idx=1),
+ THCell(HT.TD('Mb Start',HT.BR(),'(rn3)', align='left', width=100, Class=col_class), text="mb_start_rn3", idx=2),
+ THCell(HT.TD('Length (Kb)', HT.BR(), HT.BR(), align='left', width=100, Class=col_class), text="length", idx=3),
+ THCell(HT.TD('Avg',HT.BR(),'Expr', HT.BR(), HT.BR(), align='left', width=44, Class=col_class), sort=0, idx=4),
+ THCell(HT.TD('Mouse',HT.BR(),'Chr', align='left', width=60, Class=col_class), text="mouse_chr", idx=5),
+ THCell(HT.TD('Mb Start',HT.BR(),'(mm9)', align='left', width=100, Class=col_class), text="mb_start_mm9", idx=6),
+ THCell(HT.TD('Human',HT.BR(),'Chr', align='left', width=60, Class=col_class), text="human_chr", idx=7),
+ THCell(HT.TD('Mb Start',HT.BR(),'(hg19)', align='left', width=100, Class=col_class), text="mb_start_hg19", idx=8),
+ THCell(HT.TD('Gene Description', HT.BR(), HT.BR(), align='left', Class=col_class), text="description", idx=9)]]
+
+ else:
+ pass
+
+ return gene_tblobj_header
+
+ def getGeneTableBody(self, geneCol, refGene=None):
+
+ tblobj_body = [] #contains table rows
+ className = "fs13 b1 c222"
+
+ tableIterationsCnt = 0
+ if self.species == "mouse":
+
+ # polymiRTS
+ # http://lily.uthsc.edu:8080/20090422_UTHSC_cuiyan/PolymiRTS_CLS?chrom=2&chrom_from=115&chrom_to=125
+ #XZ: We can NOT assume their web service is always on. We must put this block of code in try except.
+ try:
+ conn = httplib.HTTPConnection("lily.uthsc.edu:8080")
+ conn.request("GET", "/20090422_UTHSC_cuiyan/PolymiRTS_CLS?chrom=%s&chrom_from=%s&chrom_to=%s" % (self.genotype[0].name, self.startMb, self.endMb))
+ response = conn.getresponse()
+ data = response.read()
+ data = data.split()
+ conn.close()
+ dic = {}
+ index = 0
+ for i in data:
+ if index%3==0:
+ dic[data[index]] = HT.Href(url=data[index+2], text=data[index+1], target="_blank", Class="normalsize")
+ index = index+1
+ except Exception:
+ dic={}
+
+ for gIndex, theGO in enumerate(geneCol):
+
+ tableIterationsCnt = tableIterationsCnt + 1
+
+ this_row = [] #container for the cells of each row
+ selectCheck = HT.Input(type="checkbox", name="searchResult", value=theGO["GeneSymbol"], Class="checkbox", onClick="highlight(this)") #checkbox for each row
+
+ geneLength = (theGO["TxEnd"] - theGO["TxStart"])*1000.0
+ tenPercentLength = geneLength*0.0001
+ txStart = theGO["TxStart"]
+ txEnd = theGO["TxEnd"]
+ theGO["snpDensity"] = theGO["snpCount"]/geneLength
+ if self.ALEX_DEBUG_BOOL_PRINT_GENE_LIST:
+ #accessionString = 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=Display&DB=gene&term=%s' % theGO["NM_ID"]
+ geneIdString = 'http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s' % theGO["GeneID"]
+
+ allProbeString = '%s?cmd=sch&gene=%s&alias=1' % (os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE), theGO["GeneSymbol"])
+ if theGO["snpCount"]:
+ snpString = HT.Href(url="%s&chr=%s&start=%s&end=%s&geneName=%s&s1=%d&s2=%d" % (os.path.join(webqtlConfig.CGIDIR, 'main.py?FormID=snpBrowser'),
+ theGO["Chromosome"], theGO["TxStart"], theGO["TxEnd"], theGO["GeneSymbol"], self.diffCol[0], self.diffCol[1]),
+ text=theGO["snpCount"], target="_blank", Class="normalsize")
+ else:
+ snpString = 0
+
+ mouseStartString = "http://genome.ucsc.edu/cgi-bin/hgTracks?clade=vertebrate&org=Mouse&db=mm9&position=chr" + theGO["Chromosome"] + "%3A" + str(int(theGO["TxStart"] * 1000000.0)) + "-" + str(int(theGO["TxEnd"]*1000000.0)) +"&pix=620&Submit=submit"
+
+ #Used for sorting
+ mouseStartValue = int(theGO["TxStart"])
+
+
+ #the chromosomes for human 1 are 1qXX.XX
+ if theGO['humanGene']:
+ if theGO['humanGene']["TxStart"] == '':
+ humanStartDisplay = ""
+ else:
+ humanStartDisplay = "%0.6f" % theGO['humanGene']["TxStart"]
+
+ humanChr = theGO['humanGene']["Chromosome"]
+ if humanChr.find('q'):
+ humanChrSort = humanChr[:humanChr.find("q")].join(humanChr[(humanChr.find("q")+1):]) #value used when sorting table
+ elif humanChr.find('p'):
+ humanChrSort = humanChr[:humanChr.find("p")].join(humanChr[(humanChr.find("p")+1):]) #value used when sorting table
+ else:
+ humanChrSort = humanChr
+ humanTxStart = theGO['humanGene']["TxStart"]
+
+ #Used for sorting
+ humanStartValue = float(theGO['humanGene']["TxStart"])
+
+ humanStartString = "http://genome.ucsc.edu/cgi-bin/hgTracks?clade=vertebrate&org=Human&db=hg17&position=chr%s:%d-%d" % (humanChr, int(1000000*theGO['humanGene']["TxStart"]), int(1000000*theGO['humanGene']["TxEnd"]))
+ else:
+ humanStartString = humanChr = humanChrSort = humanStartDisplay = humanStartValue = "--"
+
+ geneDescription = theGO["GeneDescription"]
+ if len(geneDescription) > 26:
+ geneDescription = geneDescription[:26]+"..."
+ probeSetSearch = HT.Href(allProbeString, HT.Image("/images/webqtl_search.gif", border=0), target="_blank")
+
+ if theGO["snpDensity"] < 0.000001:
+ snpDensityStr = "0"
+ else:
+ snpDensityStr = "%0.6f" % theGO["snpDensity"]
+
+ avgExpr = [] #theGO["avgExprVal"]
+ if avgExpr in ([], None):
+ avgExpr = "--"
+ else:
+ avgExpr = "%0.6f" % avgExpr
+
+ # polymiRTS
+ polymiRTS = ' '
+ if dic.has_key(theGO["GeneID"]):
+ polymiRTS = dic[theGO["GeneID"]]
+
+ # If we have a referenceGene then we will show the Literature Correlation
+ if refGene:
+ try:
+ literatureCorrelation = self.getLiteratureCorrelation(self.cursor,refGene,theGO['GeneID'])
+ except:
+ literatureCorrelation = "N/A"
+
+ literatureCorrelationString = str(self.getLiteratureCorrelation(self.cursor,refGene,theGO['GeneID']) or "N/A")
+
+ this_row.append(TDCell(HT.TD(tableIterationsCnt, selectCheck, width=30, align='right', Class=className), tableIterationsCnt, tableIterationsCnt))
+ this_row.append(TDCell(HT.TD(HT.Href(geneIdString, theGO["GeneSymbol"], target="_blank"), "&nbsp;", probeSetSearch, align='right', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"]))
+ this_row.append(TDCell(HT.TD(HT.Href(mouseStartString, "%0.6f" % txStart, target="_blank"), align='right', Class=className), str(mouseStartValue), mouseStartValue))
+ this_row.append(TDCell(HT.TD(HT.Href("javascript:centerIntervalMapOnRange2('%s', " % theGO["Chromosome"]+str(txStart-tenPercentLength) + ", " + str(txEnd+tenPercentLength) + ", document.changeViewForm)", "%0.3f" % geneLength), align='right', Class=className), "%0.3f" % geneLength, geneLength))
+ this_row.append(TDCell(HT.TD(snpString, align='right', Class=className), str(theGO["snpCount"]), theGO["snpCount"]))
+ this_row.append(TDCell(HT.TD(snpDensityStr, align='right', Class=className), snpDensityStr, theGO["snpDensity"]))
+ this_row.append(TDCell(HT.TD(avgExpr, align='right', Class=className), "--", "--"))
+ this_row.append(TDCell(HT.TD(humanChr, align='right', Class=className), humanChr, humanChrSort))
+ this_row.append(TDCell(HT.TD(HT.Href(humanStartString, humanStartDisplay, target="_blank"), align='right', Class=className), humanStartDisplay, humanStartValue))
+ this_row.append(TDCell(HT.TD(literatureCorrelationString, align='right', Class=className), literatureCorrelationString, literatureCorrelation))
+ this_row.append(TDCell(HT.TD(geneDescription, align='right', Class=className), geneDescription, geneDescription))
+ this_row.append(TDCell(HT.TD(polymiRTS, align='right', Class=className), "", ""))
+ this_row.append(TDCell(HT.TD("", align='right', Class=className), "", ""))
+
+ else:
+ this_row.append(TDCell(HT.TD(tableIterationsCnt, selectCheck, width=30, align='right', Class=className), tableIterationsCnt, tableIterationsCnt))
+ this_row.append(TDCell(HT.TD(HT.Href(geneIdString, theGO["GeneSymbol"], target="_blank"), "&nbsp;", probeSetSearch, align='right', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"]))
+ this_row.append(TDCell(HT.TD(HT.Href(mouseStartString, "%0.6f" % txStart, target="_blank"), align='right', Class=className), str(mouseStartValue), mouseStartValue))
+ this_row.append(TDCell(HT.TD(HT.Href("javascript:centerIntervalMapOnRange2('%s', " % theGO["Chromosome"]+str(txStart-tenPercentLength) + ", " + str(txEnd+tenPercentLength) + ", document.changeViewForm)", "%0.3f" % geneLength), align='right', Class=className), "%0.3f" % geneLength, geneLength))
+ this_row.append(TDCell(HT.TD(snpString, align='right', Class=className), str(theGO["snpCount"]), theGO["snpCount"]))
+ this_row.append(TDCell(HT.TD(snpDensityStr, align='right', Class=className), snpDensityStr, theGO["snpDensity"]))
+ this_row.append(TDCell(HT.TD(avgExpr, align='right', Class=className), "--", "--"))
+ this_row.append(TDCell(HT.TD(humanChr, align='right', Class=className), humanChr, humanChrSort))
+ this_row.append(TDCell(HT.TD(HT.Href(humanStartString, humanStartDisplay, target="_blank"), align='right', Class=className), humanStartDisplay, humanStartValue))
+ this_row.append(TDCell(HT.TD(geneDescription, align='right', Class=className), geneDescription, geneDescription))
+ this_row.append(TDCell(HT.TD(polymiRTS, align='right', Class=className), "", ""))
+ this_row.append(TDCell(HT.TD("", align='right', Class=className), "", ""))
+
+ tblobj_body.append(this_row)
+
+ elif self.species == 'rat':
+
+ for gIndex, theGO in enumerate(geneCol):
+
+ this_row = [] #container for the cells of each row
+ selectCheck = HT.Input(type="checkbox", name="searchResult", Class="checkbox", onClick="highlight(this)") #checkbox for each row
+
+ webqtlSearch = HT.Href(os.path.join(webqtlConfig.CGIDIR, webqtlConfig.SCRIPTFILE)+"?cmd=sch&gene=%s&alias=1&species=rat" % theGO["GeneSymbol"], HT.Image("/images/webqtl_search.gif", border=0), target="_blank")
+
+ if theGO["GeneID"] != "":
+ geneSymbolNCBI = HT.Href("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s" % theGO["GeneID"], theGO["GeneSymbol"], Class="normalsize", target="_blanK")
+ else:
+ geneSymbolNCBI = theGO["GeneSymbol"]
+
+ geneLength = (float(theGO["TxEnd"]) - float(theGO["TxStart"]))
+ geneLengthURL = "javascript:centerIntervalMapOnRange2('%s', %f, %f, document.changeViewForm)" % (theGO["Chromosome"], float(theGO["TxStart"])-(geneLength*0.1), float(theGO["TxEnd"])+(geneLength*0.1))
+
+ avgExprVal = []
+ if avgExprVal != "" and avgExprVal:
+ avgExprVal = "%0.5f" % float(avgExprVal)
+ else:
+ avgExprVal = ""
+
+ #Mouse Gene
+ if theGO['mouseGene']:
+ mouseChr = theGO['mouseGene']["Chromosome"]
+ mouseTxStart = theGO['mouseGene']["TxStart"]
+ else:
+ mouseChr = mouseTxStart = ""
+
+ #the chromosomes for human 1 are 1qXX.XX
+ if theGO['humanGene']:
+ humanChr = theGO['humanGene']["Chromosome"]
+ if 'q' in humanChr:
+ humanChrSort = humanChr[:humanChr.find("q")].join(humanChr[(humanChr.find("q")+1):]) #value used when sorting table
+ elif 'p' in humanChr:
+ humanChrSort = humanChr[:humanChr.find("p")].join(humanChr[(humanChr.find("p")+1):]) #value used when sorting table
+ else:
+ humanChrSort = humanChr
+ humanTxStart = theGO['humanGene']["TxStart"]
+ else:
+ humanChr = humanTxStart = humanChrSort = ""
+
+ geneDesc = theGO["GeneDescription"]
+ if geneDesc == "---":
+ geneDesc = ""
+
+ """
+ if len(geneDesc) > 40:
+ geneDesc = gene0So apparently Angola prison (which used to be a slave plantation) has a rodeo that they invite the general public to.
+The prisoners are not trained before hand
+But its cool because its completely voluntary.
+And by voluntary, according to HFG when I talked to him, they have a choice between doing it or door number two and "door number 2 is... rather worse than volunteering"Desc[:37] + "..."
+ """
+
+ this_row.append(TDCell(HT.TD(gIndex + 1, selectCheck, align='left', Class=className), str(gIndex+1), gIndex+1))
+ this_row.append(TDCell(HT.TD(webqtlSearch, geneSymbolNCBI, align='left', Class=className), theGO["GeneSymbol"], theGO["GeneSymbol"]))
+ this_row.append(TDCell(HT.TD(theGO["TxStart"], align='left', Class=className), theGO["TxStart"], theGO["TxStart"]))
+ this_row.append(TDCell(HT.TD(HT.Href(geneLengthURL, "%0.3f" % (geneLength*1000.0)), align='left', Class=className), "%0.3f" % (geneLength*1000.0), (geneLength*1000.0)))
+ this_row.append(TDCell(HT.TD(avgExprVal, align='left', Class=className), "", ""))
+ this_row.append(TDCell(HT.TD(mouseChr, align='left', Class=className), mouseChr, mouseChr))
+ this_row.append(TDCell(HT.TD(mouseTxStart, align='left', Class=className), mouseTxStart, mouseTxStart))
+ this_row.append(TDCell(HT.TD(humanChr, align='left', Class=className), humanChr, humanChrSort))
+ this_row.append(TDCell(HT.TD(humanTxStart, align='left', Class=className), humanTxStart, humanTxStart))
+ this_row.append(TDCell(HT.TD(geneDesc, align='left', Class=className), geneDesc, geneDesc))
+
+ tblobj_body.append(this_row)
+
+ else:
+ pass
+
+ return tblobj_body
+
+
+ def getSortByValue(self):
+
+ sortby = ("", "")
+
+ return sortby \ No newline at end of file
diff --git a/wqflask/wqflask/my_pylmm/data/genofile_parser.py b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
index 9191f345..61a00136 100755
--- a/wqflask/wqflask/my_pylmm/data/genofile_parser.py
+++ b/wqflask/wqflask/my_pylmm/data/genofile_parser.py
@@ -65,11 +65,11 @@ class ConvertGenoFile(object):
self.configurations = {}
#self.skipped_cols = 3
- if self.input_file.endswith(".geno.gz"):
- print("self.input_file: ", self.input_file)
- self.input_fh = gzip.open(self.input_file)
- else:
- self.input_fh = open(self.input_file)
+ #if self.input_file.endswith(".geno.gz"):
+ # print("self.input_file: ", self.input_file)
+ # self.input_fh = gzip.open(self.input_file)
+ #else:
+ self.input_fh = open(self.input_file)
with open(self.output_file, "w") as self.output_fh:
#if self.file_type == "geno":
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 12ea44d8..fb03f027 100755
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -93,8 +93,10 @@ class SearchResultPage(object):
else:
dataset_type = "ProbeSet"
self.dataset = create_dataset(kw['dataset'], dataset_type)
+ print("KEYWORD:", self.search_terms)
self.search()
- self.gen_search_result()
+ if self.search_term_exists:
+ self.gen_search_result()
@@ -253,15 +255,19 @@ class SearchResultPage(object):
results = the_search.execute(final_query)
self.results.extend(results)
else:
- for a_search in self.search_terms:
- the_search = self.get_search_ob(a_search)
- if the_search != None:
- self.results.extend(the_search.run())
- else:
- self.search_term_exists = False
-
- if the_search != None:
- self.header_fields = the_search.header_fields
+ if self.search_terms == []:
+ self.search_term_exists = False
+ else:
+ for a_search in self.search_terms:
+ the_search = self.get_search_ob(a_search)
+ if the_search != None:
+ self.results.extend(the_search.run())
+ else:
+ self.search_term_exists = False
+
+ if self.search_term_exists:
+ if the_search != None:
+ self.header_fields = the_search.header_fields
def get_search_ob(self, a_search):
print("[kodak] item is:", pf(a_search))
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 850c99a7..aa6f9562 100755
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -167,7 +167,7 @@ class ShowTrait(object):
return False
def check_pylmm_rqtl():
- if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno"):
+ if os.path.isfile(webqtlConfig.GENODIR+self.dataset.group.name+".geno") and (os.path.getsize(webqtlConfig.NEWGENODIR+self.dataset.group.name+".json") > 0):
return True
else:
return False
diff --git a/wqflask/wqflask/static/dbdoc/TODO.md b/wqflask/wqflask/static/dbdoc/TODO.md
new file mode 100644
index 00000000..c0a8bab7
--- /dev/null
+++ b/wqflask/wqflask/static/dbdoc/TODO.md
@@ -0,0 +1 @@
+TODO: Add all database documentation into this folder
diff --git a/wqflask/wqflask/static/new/css/corr_matrix.css b/wqflask/wqflask/static/new/css/corr_matrix.css
index f4838f77..495ca28c 100755
--- a/wqflask/wqflask/static/new/css/corr_matrix.css
+++ b/wqflask/wqflask/static/new/css/corr_matrix.css
@@ -10,3 +10,21 @@
width: 100px;
float: left;
}
+
+.chart {
+
+}
+
+.main text {
+ font: 10px sans-serif;
+}
+
+.axis line, .axis path {
+ shape-rendering: crispEdges;
+ stroke: black;
+ fill: none;
+}
+
+circle {
+ fill: steelblue;
+}
diff --git a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
index 616a89f6..c6fb52d8 100644
--- a/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
+++ b/wqflask/wqflask/static/new/javascript/chr_lod_chart.js
@@ -2,11 +2,12 @@
var Chr_Lod_Chart;
Chr_Lod_Chart = (function() {
- function Chr_Lod_Chart(plot_height, plot_width, chr, manhattanPlot) {
+ function Chr_Lod_Chart(plot_height, plot_width, chr, manhattanPlot, mappingScale) {
this.plot_height = plot_height;
this.plot_width = plot_width;
this.chr = chr;
this.manhattanPlot = manhattanPlot;
+ this.mappingScale = mappingScale;
this.qtl_results = js_data.qtl_results;
console.log("qtl_results are:", this.qtl_results);
console.log("chr is:", this.chr);
@@ -65,8 +66,6 @@ Chr_Lod_Chart = (function() {
} else {
this_chr = result.chr;
}
- console.log("this_chr is:", this_chr);
- console.log("@chr[0] is:", parseInt(this.chr[0]));
if (this_chr > parseInt(this.chr[0])) {
break;
}
@@ -120,7 +119,19 @@ Chr_Lod_Chart = (function() {
};
Chr_Lod_Chart.prototype.create_scales = function() {
- this.x_scale = d3.scale.linear().domain([0, this.chr[1]]).range([this.x_buffer, this.plot_width]);
+ if (this.mappingScale == "morgan") {
+ max_pos = 0
+ for (i = 0, len = this.these_results.length; i < len; i++) {
+ marker = this.these_results[i]
+ if (parseFloat(marker['Mb']) > max_pos){
+ max_pos = parseFloat(marker.Mb)
+ }
+ }
+ this.x_scale = d3.scale.linear().domain([0, max_pos]).range([this.x_buffer, this.plot_width]);
+ }
+ else {
+ this.x_scale = d3.scale.linear().domain([0, this.chr[1]]).range([this.x_buffer, this.plot_width]);
+ }
return this.y_scale = d3.scale.linear().domain([0, this.y_max]).range([this.plot_height, this.y_buffer]);
};
diff --git a/wqflask/wqflask/static/new/javascript/create_lodchart.js b/wqflask/wqflask/static/new/javascript/create_lodchart.js
index b8fcf1f8..c756d842 100644
--- a/wqflask/wqflask/static/new/javascript/create_lodchart.js
+++ b/wqflask/wqflask/static/new/javascript/create_lodchart.js
@@ -16,8 +16,8 @@
halfh = h + margin.top + margin.bottom;
totalh = halfh * 2;
totalw = w + margin.left + margin.right;
- //console.log("js_data:", js_data);
- mychart = lodchart().lodvarname("lod.hk").height(h).width(w).margin(margin).ylab(js_data.result_score_type + " score").manhattanPlot(js_data.manhattan_plot);
+ console.log("js_data:", js_data);
+ mychart = lodchart().lodvarname("lod.hk").height(h).width(w).margin(margin).ylab(js_data.result_score_type + " score").mappingScale(js_data.mapping_scale).manhattanPlot(js_data.manhattan_plot);
data = js_data.json_data;
d3.select("div#topchart").datum(data).call(mychart);
chrrect = mychart.chrSelect();
diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
index e790c9c0..da9beb9b 100755
--- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
+++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
@@ -58,18 +58,22 @@
"QSM": {
"Leaf mRNA": [
[
+ "236",
"B1LI0809R",
"Barley1 Leaf INOC TTKS (Aug09) RMA"
],
[
+ "235",
"B1LI0809M5",
"Barley1 Leaf INOC TTKS (Aug09) MAS5"
],
[
+ "237",
"B1MI0809M5",
"Barley1 Leaf MOCK TTKS (Aug09) MAS5"
],
[
+ "238",
"B1MI0809R",
"Barley1 Leaf MOCK TTKS (Aug09) RMA"
]
@@ -78,14 +82,17 @@
"SXM": {
"Embryo mRNA": [
[
+ "128",
"B139_K_1206_R",
"Barley1 Embryo gcRMA SCRI (Dec06)"
],
[
+ "124",
"B139_K_1206_M",
"Barley1 Embryo MAS 5.0 SCRI (Dec06)"
],
[
+ "114",
"B150_K_0406_R",
"Barley1 Embryo0 gcRMA SCRI (Apr06)"
]
@@ -98,16 +105,19 @@
],
"Leaf mRNA": [
[
+ "127",
"B30_K_1206_M",
"Barley1 Leaf MAS 5.0 SCRI (Dec06)"
],
[
- "B30_K_1206_R",
- "Barley1 Leaf gcRMA SCRI (Dec06)"
- ],
- [
+ "126",
"B30_K_1206_Rn",
"Barley1 Leaf gcRMAn SCRI (Dec06)"
+ ],
+ [
+ "125",
+ "B30_K_1206_R",
+ "Barley1 Leaf gcRMA SCRI (Dec06)"
]
],
"Phenotypes": [
@@ -122,6 +132,7 @@
"DGRP": {
"Whole Body mRNA": [
[
+ "297",
"NCSU_DrosWB_LC_RMA_0111",
"NCSU Drosophila Whole Body (Jan11) RMA"
]
@@ -130,10 +141,12 @@
"Oregon-R_x_2b3": {
"Whole Body mRNA": [
[
+ "249",
"UAB_DrosWB_LC_RMA_1009",
"UAB Whole body D.m. mRNA control (Oct09) RMA"
],
[
+ "250",
"UAB_DrosWB_LE_RMA_1009",
"UAB Whole body D.m. mRNA lead (pbAc) (Oct09) RMA"
]
@@ -144,18 +157,22 @@
"AD-cases-controls": {
"Brain mRNA": [
[
+ "314",
"GSE5281_F_RMA_N_0709",
"GSE5281 Human Brain Normal Full Liang (Jul09) RMA"
],
[
+ "313",
"GSE5281_F_RMA_Alzh_0709",
"GSE5281 Human Brain Alzheimer Full Liang (Jul09) RMA"
],
[
+ "233",
"GSE5281_F_RMA0709",
"GSE5281 Human Brain Full Liang (Jul09) RMA"
],
[
+ "232",
"GSE5281_RMA0709",
"GSE5281 Human Brain Best 102 Liang (Jul09) RMA"
]
@@ -164,14 +181,17 @@
"AD-cases-controls-Myers": {
"Brain mRNA": [
[
+ "234",
"GSE15222_F_RI_0409",
"GSE15222 Human Brain All Cases Myers (Apr09) RankInv"
],
[
+ "290",
"GSE15222_F_N_RI_0409",
"GSE15222 Human Brain Normal Myers (Apr09) RankInv"
],
[
+ "289",
"GSE15222_F_A_RI_0409",
"GSE15222 Human Brain Alzheimer Myers (Apr09) RankInv"
]
@@ -186,24 +206,28 @@
"Aging-Brain-UCI": {
"Entorhinal Cortex mRNA": [
[
+ "460",
"UCI_EC_0913",
"GSE11882 UCI Human Entorhinal Cortex Affy U133 Plus2 (Sep13) RMA"
]
],
"Hippocampus mRNA": [
[
+ "461",
"UCI_HC_0913",
"GSE11882 UCI Human Hippocampus Affy U133 Plus2 (Sep13) RMA"
]
],
"Postcentral Gyrus mRNA": [
[
+ "462",
"UCI_PCG_0913",
"GSE11882 UCI Human Postcentral Gyrus Affy U133 Plus2 (Sep13) RMA"
]
],
"Superior Frontal Gyrus mRNA": [
[
+ "463",
"UCI_SG_0913",
"GSE11882 UCI Human Superior Frontal Gyrus Affy U133 Plus2 (Sep13) RMA"
]
@@ -212,24 +236,28 @@
"Brain-Normal-NIH-Gibbs": {
"Cerebellum mRNA": [
[
+ "481",
"GSE15745-GPL6104_Cer0510",
"GSE15745 NIH Human Brain Cerebellum ILM humanRef-8 v2.0 (May10) RankInv"
]
],
"Pons mRNA": [
[
+ "484",
"GSE15745-GPL6104_Po0510",
"GSE15745 NIH Human Brain Pons ILM humanRef-8 v2.0 (May10) RankInv"
]
],
"Prefrontal Cortex mRNA": [
[
+ "482",
"GSE15745-GPL6104_PFC0510",
"GSE15745 NIH Human Brain Prefrontal Cortex ILM humanRef-8 v2.0 (May10) RankInv"
]
],
"Temporal Cerebral Wall mRNA": [
[
+ "483",
"GSE15745-GPL6104_TC0510",
"GSE15745 NIH Human Brain Temporal Cerebral ILM humanRef-8 v2.0 (May10) RankInv"
]
@@ -238,16 +266,19 @@
"CANDLE": {
"Methylation": [
[
+ "423",
"CANDLE_Meth27_0313",
"CANDLE Newborn Cord ILM HumanMethylation27 (Mar13) **"
],
[
+ "422",
"CANDLE_Meth_0313",
"CANDLE Newborn Cord ILM HumanMethylation27 (Mar13) Z-Score **"
]
],
"Newborn Cord Blood mRNA": [
[
+ "324",
"CANDLE_NB_0711",
"CANDLE Newborn Cord ILMv6.3 (Jun11) QUANT"
]
@@ -262,10 +293,12 @@
"CEPH-2004": {
"Lymphoblast B-cell mRNA": [
[
+ "241",
"UT_CEPH_RankInv0909",
"UTHSC CEPH B-cells Illumina (Sep09) RankInv"
],
[
+ "215",
"Human_1008",
"Monks CEPH B-cells Agilent (Dec04) Log10Ratio"
]
@@ -274,470 +307,564 @@
"GTEx": {
"Adrenal Gland mRNA": [
[
+ "545",
"GTEx_log2_Adren_0314",
"GTEx Human Adrenal Gland (Mar14) RPKM Log2"
],
[
+ "495",
"GTEx_Adren_0414",
"GTEx Human Adrenal Gland (Apr14) RPKM"
]
],
"Amygdala mRNA": [
[
+ "542",
"GTEx_log2_AMY_0314",
"GTEx Human Amygdala (Mar14) RPKM Log2"
],
[
+ "492",
"GTEx_AMY_0314",
"GTEx Human Amygdala (Mar14) RPKM"
]
],
"Anterior Cingulate Cortex mRNA": [
[
+ "546",
"GTEx_log2_Anter_0314",
"GTEx Human Anterior Cingulate Cortex (Mar14) RPKM Log2"
],
[
+ "496",
"GTEx_Anter_0414",
"GTEx Human Anterior Cingulate Cortex (Apr14) RPKM"
]
],
"Aorta mRNA": [
[
+ "547",
"GTEx_log2_Aorta_0314",
"GTEx Human Aorta (Mar14) RPKM Log2"
],
[
+ "497",
"GTEx_Aorta_0414",
"GTEx Human Aorta (Apr14) RPKM"
]
],
"Blood, Cells - EBV-Transformed Lymphocytes mRNA": [
[
+ "548",
"GTEx_log2_Blood_0314",
"GTEx Human Blood, Cells - EBV-Transformed Lymphocytes (Mar14) RPKM Log2"
],
[
+ "498",
"GTEx_Blood_0414",
"GTEx Human Blood, Cells - EBV-Transformed Lymphocytes (Apr14) RPKM"
]
],
"Breast - Mammary Tissue mRNA": [
[
+ "549",
"GTEx_log2_Breas_0314",
"GTEx Human Breast - Mammary Tissue (Mar14) RPKM Log2"
],
[
+ "499",
"GTEx_Breas_0414",
"GTEx Human Breast - Mammary Tissue (Apr14) RPKM"
]
],
"Caudate mRNA": [
[
+ "550",
"GTEx_log2_Cauda_0314",
"GTEx Human Caudate (Mar14) RPKM Log2"
],
[
+ "500",
"GTEx_Cauda_0414",
"GTEx Human Caudate (Apr14) RPKM"
]
],
"Cells - EBV-Transformed Lymphocytes mRNA": [
[
+ "551",
"GTEx_log2_CellsEBV_0314",
"GTEx Human Cells - EBV-Transformed Lymphocytes (Mar14) RPKM Log2"
],
[
+ "501",
"GTEx_CellsEBV_0414",
"GTEx Human Cells - EBV-Transformed Lymphocytes (Apr14) RPKM"
]
],
"Cells - Leukemia Cell Line (CML) mRNA": [
[
+ "552",
"GTEx_log2_CellsLe_0314",
"GTEx Human Cells - Leukemia Cell Line (CML) (Mar14) RPKM Log2"
],
[
+ "502",
"GTEx_CellsLe_0414",
"GTEx Human Cells - Leukemia Cell Line (CML) (Apr14) RPKM"
]
],
"Cells - Transformed Fibroblasts mRNA": [
[
+ "553",
"GTEx_log2_CellsTr_0314",
"GTEx Human Cells - Transformed Fibroblasts (Mar14) RPKM Log2"
],
[
+ "503",
"GTEx_CellsTr_0414",
"GTEx Human Cells - Transformed Fibroblasts (Apr14) RPKM"
]
],
"Cerebellar Cortex mRNA": [
[
+ "554",
"GTEx_log2_CerebC_0314",
"GTEx Human Cerebellar Cortex (Mar14) RPKM Log2"
],
[
+ "504",
"GTEx_CerebC_0414",
"GTEx Human Cerebellar Cortex (Apr14) RPKM"
]
],
"Cerebellar Hemisphere mRNA": [
[
+ "555",
"GTEx_log2_CerebH_0314",
"GTEx Human Cerebellar Hemisphere (Mar14) RPKM Log2"
],
[
+ "505",
"GTEx_CerebH_0414",
"GTEx Human Cerebellar Hemisphere (Apr14) RPKM"
]
],
"Cerebellum mRNA": [
[
+ "543",
"GTEx_log2_CER_0314",
"GTEx Human Cerebellum (Mar14) RPKM Log2"
],
[
+ "493",
"GTEx_CER_0314",
"GTEx Human Cerebellum (Mar14) RPKM"
]
],
"Colon - Transverse mRNA": [
[
+ "556",
"GTEx_log2_Colon_0314",
"GTEx Human Colon - Transverse (Mar14) RPKM Log2"
],
[
+ "506",
"GTEx_Colon_0414",
"GTEx Human Colon - Transverse (Apr14) RPKM"
]
],
"Coronary mRNA": [
[
+ "557",
"GTEx_log2_Coron_0314",
"GTEx Human Coronary (Mar14) RPKM Log2"
],
[
+ "507",
"GTEx_Coron_0414",
"GTEx Human Coronary (Apr14) RPKM"
]
],
"Esophagus - Mucosa mRNA": [
[
+ "558",
"GTEx_log2_EsophMuc_0314",
"GTEx Human Esophagus - Mucosa (Mar14) RPKM Log2"
],
[
+ "508",
"GTEx_EsophMuc_0414",
"GTEx Human Esophagus - Mucosa (Apr14) RPKM"
]
],
"Esophagus - Muscularis mRNA": [
[
+ "559",
"GTEx_log2_EsophMus_0314",
"GTEx Human Esophagus - Muscularis (Mar14) RPKM Log2"
],
[
+ "509",
"GTEx_EsophMus_0414",
"GTEx Human Esophagus - Muscularis (Apr14) RPKM"
]
],
"Fallopian Tube mRNA": [
[
+ "560",
"GTEx_log2_Fallo_0314",
"GTEx Human Fallopian Tube (Mar14) RPKM Log2"
],
[
+ "510",
"GTEx_Fallo_0414",
"GTEx Human Fallopian Tube (Apr14) RPKM"
]
],
"Frontal Cortex mRNA": [
[
+ "561",
"GTEx_log2_Front_0314",
"GTEx Human Frontal Cortex (Mar14) RPKM Log2"
],
[
+ "511",
"GTEx_Front_0414",
"GTEx Human Frontal Cortex (Apr14) RPKM"
]
],
"Heart - Atrial Appendage mRNA": [
[
+ "562",
"GTEx_log2_HeartAt_0314",
"GTEx Human Heart - Atrial Appendage (Mar14) RPKM Log2"
],
[
+ "512",
"GTEx_HeartAt_0414",
"GTEx Human Heart - Atrial Appendage (Apr14) RPKM"
]
],
"Heart - Left Ventricle mRNA": [
[
+ "563",
"GTEx_log2_HeartLV_0314",
"GTEx Human Heart - Left Ventricle (Mar14) RPKM Log2"
],
[
+ "513",
"GTEx_HeartLV_0414",
"GTEx Human Heart - Left Ventricle (Apr14) RPKM"
]
],
"Hippocampus mRNA": [
[
+ "544",
"GTEx_log2_HIP_0314",
"GTEx Human Hippocampus (Mar14) RPKM Log2"
],
[
+ "494",
"GTEx_HIP_0314",
"GTEx Human Hippocampus (Mar14) RPKM"
]
],
"Hypothalamus mRNA": [
[
+ "564",
"GTEx_log2_Hypot_0314",
"GTEx Human Hypothalamus (Mar14) RPKM Log2"
],
[
+ "514",
"GTEx_Hypot_0414",
"GTEx Human Hypothalamus (Apr14) RPKM"
]
],
"Kidney mRNA": [
[
+ "565",
"GTEx_log2_Kidne_0314",
"GTEx Human Kidney (Mar14) RPKM Log2"
],
[
+ "515",
"GTEx_Kidne_0414",
"GTEx Human Kidney (Apr14) RPKM"
]
],
"Liver mRNA": [
[
+ "566",
"GTEx_log2_Liver_0314",
"GTEx Human Liver (Mar14) RPKM Log2"
],
[
+ "516",
"GTEx_Liver_0414",
"GTEx Human Liver (Apr14) RPKM"
]
],
"Lung mRNA": [
[
+ "567",
"GTEx_log2_Lung_0314",
"GTEx Human Lung (Mar14) RPKM Log2"
],
[
+ "517",
"GTEx_Lung _0414",
"GTEx Human Lung (Apr14) RPKM"
]
],
"Muscle mRNA": [
[
+ "568",
"GTEx_log2_Muscle_0314",
"GTEx Human Muscle (Mar14) RPKM Log2"
],
[
+ "518",
"GTEx_Muscl_0414",
"GTEx Human Muscle (Apr14) RPKM"
]
],
"Nerve - Tibial mRNA": [
[
+ "569",
"GTEx_log2_Nerve_0314",
"GTEx Human Nerve - Tibial (Mar14) RPKM Log2"
],
[
+ "519",
"GTEx_Nerve_0414",
"GTEx Human Nerve - Tibial (Apr14) RPKM"
]
],
"Nucleus Accumbens mRNA": [
[
+ "570",
"GTEx_log2_Nucle_0314",
"GTEx Human Nucleus Accumbens (Mar14) RPKM Log2"
],
[
+ "520",
"GTEx_Nucle_0414",
"GTEx Human Nucleus Accumbens (Apr14) RPKM"
]
],
"Ovary mRNA": [
[
+ "571",
"GTEx_log2_Ovary_0314",
"GTEx Human Ovary (Mar14) RPKM Log2"
],
[
+ "521",
"GTEx_Ovary_0414",
"GTEx Human Ovary (Apr14) RPKM"
]
],
"Pancreas mRNA": [
[
+ "572",
"GTEx_log2_Pancr_0314",
"GTEx Human Pancreas (Mar14) RPKM Log2"
],
[
+ "522",
"GTEx_Pancr_0414",
"GTEx Human Pancreas (Apr14) RPKM"
]
],
"Pituitary Gland mRNA": [
[
+ "573",
"GTEx_log2_Pitui_0314",
"GTEx Human Pituitary (Mar14) RPKM Log2"
],
[
+ "523",
"GTEx_Pitui_0414",
"GTEx Human Pituitary (Apr14) RPKM"
]
],
"Prostate mRNA": [
[
+ "574",
"GTEx_log2_Prost_0314",
"GTEx Human Prostate (Mar14) RPKM Log2"
],
[
+ "524",
"GTEx_Prost_0414",
"GTEx Human Prostate (Apr14) RPKM"
]
],
"Putamen mRNA": [
[
+ "575",
"GTEx_log2_Putam_0314",
"GTEx Human Putamen (Mar14) RPKM Log2"
],
[
+ "525",
"GTEx_Putam_0414",
"GTEx Human Putamen (Apr14) RPKM"
]
],
"Skin - Not Sun Exposed (Suprapubic) mRNA": [
[
+ "576",
"GTEx_log2_SkinN_0314",
"GTEx Human Skin-Not Sun Exposed (Suprapubic) (Mar14) RPKM Log2"
],
[
+ "526",
"GTEx_SkinN_0414",
"GTEx Human Skin-Not Sun Exposed (Suprapubic) (Apr14) RPKM"
]
],
"Skin - Sun Exposed (Lower leg) mRNA": [
[
+ "577",
"GTEx_log2_SkinE_0314",
"GTEx Human Skin-Sun Exposed (Lower leg) (Mar14) RPKM Log2"
],
[
+ "527",
"GTEx_SkinE_0414",
"GTEx Human Skin-Sun Exposed (Lower leg) (Apr14) RPKM"
]
],
"Spinal Cord mRNA": [
[
+ "578",
"GTEx_log2_Spina_0314",
"GTEx Human Spinal Cord (Mar14) RPKM Log2"
],
[
+ "528",
"GTEx_Spina_0414",
"GTEx Human Spinal Cord (Apr14) RPKM"
]
],
"Stomach mRNA": [
[
+ "579",
"GTEx_log2_Stoma_0314",
"GTEx Human Stomach (Mar14) RPKM Log2"
],
[
+ "529",
"GTEx_Stoma_0414",
"GTEx Human Stomach (Apr14) RPKM"
]
],
"Subcutaneous mRNA": [
[
+ "580",
"GTEx_log2_Subcu_0314",
"GTEx Human Subcutaneous (Mar14) RPKM Log2"
],
[
+ "530",
"GTEx_Subcu_0414",
"GTEx Human Subcutaneous (Apr14) RPKM"
]
],
"Substantia Nigra mRNA": [
[
+ "581",
"GTEx_log2_Subst_0314",
"GTEx Human Substantia Nigra (Mar14) RPKM Log2"
],
[
+ "531",
"GTEx_Subst_0414",
"GTEx Human Substantia Nigra (Apr14) RPKM"
]
],
"Testis mRNA": [
[
+ "582",
"GTEx_log2_Testi_0314",
"GTEx Human Testis (Mar14) RPKM Log2"
],
[
+ "532",
"GTEx_Testi_0414",
"GTEx Human Testis (Apr14) RPKM"
]
],
"Thyroid mRNA": [
[
+ "583",
"GTEx_log2_Thyro_0314",
"GTEx Human Thyroid (Mar14) RPKM Log2"
],
[
+ "533",
"GTEx_Thyro_0414",
"GTEx Human Thyroid (Apr14) RPKM"
]
],
"Tibial mRNA": [
[
+ "584",
"GTEx_log2_Tibial_0314",
"GTEx Human Tibial (Mar14) RPKM Log2"
],
[
+ "534",
"GTEx_Tibia_0414",
"GTEx Human Tibial (Apr14) RPKM"
]
],
"Uterus mRNA": [
[
+ "585",
"GTEx_log2_Uterus_0314",
"GTEx Human Uterus (Mar14) RPKM Log2"
],
[
+ "535",
"GTEx_Uteru_0414",
"GTEx Human Uterus (Apr14) RPKM"
]
],
"Vagina mRNA": [
[
+ "586",
"GTEx_log2_Vagin_0314",
"GTEx Human Vagina (Mar14) RPKM Log2"
],
[
+ "536",
"GTEx_Vagin_0414",
"GTEx Human Vagina (Apr14) RPKM"
]
],
"Visceral mRNA": [
[
+ "587",
"GTEx_log2_Visce_0314",
"GTEx Human Visceral (Mar14) RPKM Log2"
],
[
+ "537",
"GTEx_Visce_0414",
"GTEx Human Visceral (Apr14) RPKM"
]
],
"Whole Blood mRNA": [
[
+ "588",
"GTEx_log2_WholeB_0314",
"GTEx Human Whole Blood (Mar14) RPKM Log2"
],
[
+ "538",
"GTEx_Whole_0414",
"GTEx Human Whole Blood (Apr14) RPKM"
]
@@ -746,54 +873,66 @@
"HB": {
"Cerebellum mRNA": [
[
+ "326",
"HBTRC-MLC_0611",
"HBTRC-MLC Human Cerebellum Agilent (Jun11) mlratio"
],
[
+ "361",
"HBTRC-MLC_N_0611",
"HBTRC-MLC Human Cerebellum Agilent Normal (Jun11) mlratio"
],
[
+ "362",
"HBTRC-MLC_AD_0611",
"HBTRC-MLC Human Cerebellum Agilent AD (Jun11) mlratio"
],
[
+ "363",
"HBTRC-MLC_HD_0611",
"HBTRC-MLC Human Cerebellum Agilent HD (Jun11) mlratio"
]
],
"Prefrontal Cortex mRNA": [
[
+ "328",
"HBTRC-MLPFC_0611",
"HBTRC-MLC Human Prefrontal Cortex Agilent (Jun11) mlratio"
],
[
+ "367",
"HBTRC-MLPFC_N_0611",
"HBTRC-MLC Human Prefrontal Cortex Agilent Normal (Jun11) mlratio"
],
[
+ "368",
"HBTRC-MLPFC_AD_0611",
"HBTRC-MLC Human Prefrontal Cortex Agilent AD (Jun11) mlratio"
],
[
+ "369",
"HBTRC-MLPFC_HD_0611",
"HBTRC-MLC Human Prefrontal Cortex Agilent HD (Jun11) mlratio"
]
],
"Primary Visual Cortex mRNA": [
[
+ "327",
"HBTRC-MLVC_0611",
"HBTRC-MLC Human Visual Cortex Agilent (Jun11) mlratio"
],
[
+ "364",
"HBTRC-MLVC_N_0611",
"HBTRC-MLC Human Visual Cortex Agilent Normal (Jun11) mlratio"
],
[
+ "365",
"HBTRC-MLVC_AD_0611",
"HBTRC-MLC Human Visual Cortex Agilent AD (Jun11) mlratio"
],
[
+ "366",
"HBTRC-MLVC_HD_0611",
"HBTRC-MLC Human Visual Cortex Agilent HD (Jun11) mlratio"
]
@@ -810,14 +949,17 @@
"HLC": {
"Liver mRNA": [
[
+ "320",
"HLC_0311",
"GSE9588 Human Liver Normal (Mar11) Both Sexes"
],
[
+ "383",
"HLCM_0311",
"GSE9588 Human Liver Normal (Mar11) Males"
],
[
+ "384",
"HLCF_0311",
"GSE9588 Human Liver Normal (Mar11) Females"
]
@@ -832,18 +974,22 @@
"HLT": {
"Lung mRNA": [
[
+ "455",
"GSE23546HLT0613",
"Super Series GSE23546 Whole-Genome GXD Non-Tumorous Human Lung Tissues Affy HuRSTA array (Jun11) RMA"
],
[
+ "452",
"luCA_GSE23352HLT0613",
"UL/GSE23352 Whole-Genome GXD Non-Tumorous Human Lung Tissues Affy HuRSTA (Jun11) RMA"
],
[
+ "453",
"UBC-GSE23529HLT0613",
"UBC/GSE23529 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"
]
@@ -852,96 +998,112 @@
"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"
]
],
"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"
]
@@ -952,30 +1114,35 @@
"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 **"
]
@@ -992,28 +1159,33 @@
],
"Mammary Tumors mRNA": [
[
+ "224",
"NCI_Agil_Mam_Tum_RMA_0409",
"NCI Mammary LMT miRNA v2 (Apr09) RMA"
],
[
- "MA_M_0704_M",
- "NCI Mammary mRNA M430 (July04) MAS5"
- ],
- [
+ "37",
"MA_M_0704_R",
"NCI Mammary mRNA M430 (July04) RMA"
+ ],
+ [
+ "36",
+ "MA_M_0704_M",
+ "NCI Mammary mRNA M430 (July04) MAS5"
]
]
},
"AXBXA": {
"Bone Femur mRNA": [
[
+ "411",
"UCLA_AXB/BXA_Femur_0113_RSN",
"UCLA GSE27483 AXB/BXA Bone Femur ILM Mouse WG-6 v1, v1.1 (Jan13) RSN"
]
],
"Eye mRNA": [
[
+ "210",
"Eye_AXBXA_1008_RankInv",
"Eye AXBXA Illumina V6.2(Oct08) RankInv Beta"
]
@@ -1026,12 +1198,14 @@
],
"Heart mRNA": [
[
+ "421",
"IRCM_AXBXA_HRI0213",
"IRCM AXB/BXA Mouse Heart ILM MouseRef-8 v2.0 (Feb13) RankInv"
]
],
"Liver mRNA": [
[
+ "352",
"GSE16780AB_UCLA_ML0911",
"GSE16780 UCLA Mouse AXB/BXA Liver Affy HT M430A (Sep11) RMA"
]
@@ -1052,12 +1226,14 @@
],
"Liver mRNA": [
[
- "LVF2_M_0704_M",
- "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5"
- ],
- [
+ "39",
"LVF2_M_0704_R",
"(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) RMA"
+ ],
+ [
+ "38",
+ "LVF2_M_0704_M",
+ "(B6 x BTBR)F2-ob/ob Liver mRNA M430 (Jul04) MAS5"
]
],
"Phenotypes": [
@@ -1070,28 +1246,34 @@
"B6D2F2": {
"Brain mRNA": [
[
+ "76",
+ "BRF2_M_0805_M",
+ "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) MAS5"
+ ],
+ [
+ "78",
"BRF2_M_0805_P",
"OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) PDNN"
],
[
+ "77",
"BRF2_M_0805_R",
"OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) RMA"
],
[
- "BRF2_M_0805_M",
- "OHSU/VA B6D2F2 Brain mRNA M430 (Aug05) MAS5"
- ],
- [
+ "33",
"BRF2_M_0304_P",
"OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) PDNN"
],
[
- "BRF2_M_0304_M",
- "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5"
- ],
- [
+ "32",
"BRF2_M_0304_R",
"OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) RMA"
+ ],
+ [
+ "31",
+ "BRF2_M_0304_M",
+ "OHSU/VA B6D2F2 Brain mRNA M430A (Mar04) MAS5"
]
],
"Genotypes": [
@@ -1110,18 +1292,22 @@
],
"Muscle mRNA": [
[
+ "134",
"PSU-B6D2F2_0812",
"PSU B6D2F2 Muscle Affy Mouse Genome 430 2.0 (Aug12) RMA **"
],
[
+ "404",
"PSU-B6D2F2_F0812",
"PSU B6D2F2 Muscle Affy Mouse Genome 430 2.0 (Aug12) RMA Females **"
],
[
+ "405",
"PSU-B6D2F2_M0812",
"PSU B6D2F2 Muscle Affy Mouse Genome 430 2.0 (Aug12) RMA Males **"
],
[
+ "406",
"PSU-B6D2F2_M2000812",
"PSU B6D2F2 Muscle Affy Mouse Genome 430 2.0 (Aug12) RMA Males Aged 200 **"
]
@@ -1130,6 +1316,7 @@
"B6D2RI": {
"Hippocampus mRNA": [
[
+ "391",
"UTHSC_B6D2RI_H_0912",
"UTHSC B6D2RI Aged Hippocampus Affy Mouse Gene 1.0 ST (Sep12) RMA **"
]
@@ -1144,6 +1331,7 @@
],
"Liver mRNA": [
[
+ "169",
"UCLA_BDF2_LIVER_1999",
"UCLA BDF2 Liver (1999) mlratio"
]
@@ -1158,44 +1346,53 @@
],
"Striatum mRNA": [
[
+ "84",
+ "SA_M2_0905_R",
+ "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA"
+ ],
+ [
+ "83",
"SA_M2_0905_M",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) MAS5"
],
[
+ "85",
"SA_M2_0905_P",
"OHSU/VA B6D2F2 Striatum M430v2 (Sep05) PDNN"
- ],
- [
- "SA_M2_0905_R",
- "OHSU/VA B6D2F2 Striatum M430v2 (Sep05) RMA"
]
]
},
"BHF2": {
"Adipose mRNA": [
[
- "UCLA_BHF2_ADIPOSE_FEMALE",
- "UCLA BHF2 Adipose Female mlratio"
- ],
- [
+ "196",
"UCLA_BHF2_ADIPOSE_MALE",
"UCLA BHF2 Adipose Male mlratio"
],
[
+ "197",
+ "UCLA_BHF2_ADIPOSE_FEMALE",
+ "UCLA BHF2 Adipose Female mlratio"
+ ],
+ [
+ "165",
"UCLA_BHF2_ADIPOSE_0605",
"UCLA BHF2 Adipose (June05) mlratio"
]
],
"Brain mRNA": [
[
- "UCLA_BHF2_BRAIN_FEMALE",
- "UCLA BHF2 Brain Female mlratio"
- ],
- [
+ "198",
"UCLA_BHF2_BRAIN_MALE",
"UCLA BHF2 Brain Male mlratio"
],
[
+ "199",
+ "UCLA_BHF2_BRAIN_FEMALE",
+ "UCLA BHF2 Brain Female mlratio"
+ ],
+ [
+ "166",
"UCLA_BHF2_BRAIN_0605",
"UCLA BHF2 Brain (June05) mlratio"
]
@@ -1208,28 +1405,34 @@
],
"Liver mRNA": [
[
- "UCLA_BHF2_LIVER_FEMALE",
- "UCLA BHF2 Liver Female mlratio"
- ],
- [
+ "200",
"UCLA_BHF2_LIVER_MALE",
"UCLA BHF2 Liver Male mlratio"
],
[
+ "201",
+ "UCLA_BHF2_LIVER_FEMALE",
+ "UCLA BHF2 Liver Female mlratio"
+ ],
+ [
+ "167",
"UCLA_BHF2_LIVER_0605",
"UCLA BHF2 Liver (June05) mlratio"
]
],
"Muscle mRNA": [
[
- "UCLA_BHF2_MUSCLE_FEMALE",
- "UCLA BHF2 Muscle Female mlratio **"
- ],
- [
+ "202",
"UCLA_BHF2_MUSCLE_MALE",
"UCLA BHF2 Muscle Male mlratio **"
],
[
+ "203",
+ "UCLA_BHF2_MUSCLE_FEMALE",
+ "UCLA BHF2 Muscle Female mlratio **"
+ ],
+ [
+ "168",
"UCLA_BHF2_MUSCLE_0605",
"UCLA BHF2 Muscle (June05) mlratio **"
]
@@ -1238,28 +1441,34 @@
"BHHBF2": {
"Adipose mRNA": [
[
+ "174",
"UCLA_BHHBF2_ADIPOSE_2005",
"UCLA BHHBF2 Adipose (2005) mlratio"
],
[
+ "180",
"UCLA_BHHBF2_ADIPOSE_MALE",
"UCLA BHHBF2 Adipose Male Only"
],
[
+ "181",
"UCLA_BHHBF2_ADIPOSE_FEMALE",
"UCLA BHHBF2 Adipose Female Only"
]
],
"Brain mRNA": [
[
+ "175",
"UCLA_BHHBF2_BRAIN_2005",
"UCLA BHHBF2 Brain (2005) mlratio"
],
[
+ "182",
"UCLA_BHHBF2_BRAIN_MALE",
"UCLA BHHBF2 Brain Male Only"
],
[
+ "183",
"UCLA_BHHBF2_BRAIN_FEMALE",
"UCLA BHHBF2 Brain Female Only"
]
@@ -1272,28 +1481,34 @@
],
"Liver mRNA": [
[
+ "176",
"UCLA_BHHBF2_LIVER_2005",
"UCLA BHHBF2 Liver (2005) mlratio"
],
[
+ "184",
"UCLA_BHHBF2_LIVER_MALE",
"UCLA BHHBF2 Liver Male Only"
],
[
+ "185",
"UCLA_BHHBF2_LIVER_FEMALE",
"UCLA BHHBF2 Liver Female Only"
]
],
"Muscle mRNA": [
[
+ "177",
"UCLA_BHHBF2_MUSCLE_2005",
"UCLA BHHBF2 Muscle (2005) mlratio"
],
[
+ "186",
"UCLA_BHHBF2_MUSCLE_MALE",
"UCLA BHHBF2 Muscle Male Only"
],
[
+ "187",
"UCLA_BHHBF2_MUSCLE_FEMALE",
"UCLA BHHBF2 Muscle Female Only"
]
@@ -1302,250 +1517,308 @@
"BXD": {
"Adipose mRNA": [
[
+ "469",
"EPFLADGL1013",
"EPFL/LISP BXD CD Brown Adipose Affy Mouse Gene 2.0 ST Gene Level (Oct13) RMA"
],
[
+ "470",
"EPFLADEL1013",
"EPFL/LISP BXD CD Brown Adipose Affy Mouse Gene 2.0 ST Exon Level (Oct13) RMA"
]
],
"Adrenal Gland mRNA": [
[
+ "388",
"INIA_Adrenal_RMA_0612",
"INIA Adrenal Affy MoGene 1.0ST (Jun12) RMA"
],
[
+ "426",
"INIA_Adrenal_RMA_F_0612",
"INIA Adrenal Affy MoGene 1.0ST (Jun12) RMA Females"
],
[
+ "425",
"INIA_Adrenal_RMA_M_0612",
"INIA Adrenal Affy MoGene 1.0ST (Jun12) RMA Males"
],
[
+ "334",
"INIA_Adrenal_RMA_Ex_0612",
"INIA Adrenal Affy MoGene 1.0ST (Jun12) RMA Exon Level"
]
],
"Amygdala mRNA": [
[
+ "323",
"INIA_AmgCoh_0311",
"INIA Amygdala Cohort Affy MoGene 1.0 ST (Mar11) RMA"
],
[
+ "280",
"INIA_Amg_BLA_RMA_1110",
"INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA"
],
[
+ "316",
"INIA_Amg_BLA_RMA_M_1110",
"INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA Male"
],
[
+ "315",
"INIA_Amg_BLA_RMA_F_1110",
"INIA Amygdala Affy MoGene 1.0 ST (Nov10) RMA Female"
],
[
+ "158",
"INIA_Amg_BLA_Ex-RMA_1110",
"INIA Amygdala Exon Affy MoGene 1.0 ST (Nov10) RMA"
]
],
"Bone Femur mRNA": [
[
+ "410",
"UCLA_BXD_Femur_0113_RSN",
"UCLA GSE27483 BXD Bone Femur ILM Mouse WG-6 v1, v1.1 (Jan13) RSN"
],
[
+ "414",
"UCLA_BXD-on_Femur_0113_RSN",
"UCLA GSE27483 BXD Only Bone Femur ILM Mouse WG-6 v2.0 (Jan13) RSN"
],
[
+ "464",
"UTHSCWGU88BFMG1013",
"UTHSC WGU88 Male Bone Femur AFFY Mouse Gene ST 2.0 Gene Level (Oct13) RMA **"
],
[
+ "465",
"UTHSCWGU88BFMEx1013",
"UTHSC WGU88 Male Bone Femur AFFY Mouse Gene ST 2.0 Exon Level (Oct13) RMA **"
],
[
+ "466",
"UTHSCWGU88BFFG1013",
"UTHSC WGU88 Female Bone Femur AFFY Mouse Gene ST 2.0 Gene Level (Oct13) RMA **"
],
[
+ "467",
"UTHSCWGU88BFFEx1013",
"UTHSC WGU88 Female Bone Femur AFFY Mouse Gene ST 2.0 Exon Level (Oct13) RMA **"
]
],
"Brain mRNA": [
[
+ "589",
"UTHSC_BXD_WB_RNASeqtrim1112",
"UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Trimmed 2.0"
],
[
- "UTHSC_BXD_WB_RNASeqtrim1_1112",
- "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Trimmed 1.0"
- ],
- [
+ "164",
"UTHSC_BXD_WB_RNASeq1112",
"UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Untrimmed"
],
[
+ "590",
+ "UTHSC_BXD_WB_RNASeqtrim1_1112",
+ "UTHSC Mouse BXD Whole Brain RNA Sequence (Nov12) RPKM Trimmed 1.0"
+ ],
+ [
+ "394",
"UTHSC_BXD_WB_RNASeqEx1112",
"UTHSC Mouse BXD Whole Brain RNA Sequence Exon Level (Nov12) RPKM"
],
[
+ "123",
"BR_M2_1106_R",
"UCHSC BXD Whole Brain M430 2.0 (Nov06) RMA"
],
[
+ "95",
"BR_U_1105_P",
"UTHSC Brain mRNA U74Av2 (Nov05) PDNN"
],
[
- "BR_U_0805_P",
- "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
- ],
- [
+ "80",
"BR_U_0805_M",
"UTHSC Brain mRNA U74Av2 (Aug05) MAS5"
],
[
+ "82",
"BR_U_0805_R",
"UTHSC Brain mRNA U74Av2 (Aug05) RMA"
],
[
+ "81",
+ "BR_U_0805_P",
+ "UTHSC Brain mRNA U74Av2 (Aug05) PDNN"
+ ],
+ [
+ "42",
"CB_M_0204_P",
"INIA Brain mRNA M430 (Feb04) PDNN"
]
],
"Cartilage mRNA": [
[
+ "208",
"UCLA_BXDBXH_CARTILAGE_V2",
"UCLA BXD and BXH Cartilage v2"
],
[
+ "204",
"UCLA_BXDBXH_CARTILAGE",
"UCLA BXD and BXH Cartilage"
],
[
+ "178",
"UCLA_BXD_CARTILAGE",
"UCLA BXD Cartilage"
]
],
"Cerebellum mRNA": [
[
+ "46",
"CB_M_1004_R",
"SJUT Cerebellum mRNA M430 (Oct04) RMA"
],
[
+ "45",
"CB_M_1004_P",
"SJUT Cerebellum mRNA M430 (Oct04) PDNN"
],
[
+ "44",
"CB_M_1004_M",
"SJUT Cerebellum mRNA M430 (Oct04) MAS5"
],
[
+ "9",
"CB_M_1003_M",
"SJUT Cerebellum mRNA M430 (Oct03) MAS5"
],
[
+ "436",
"CMMTUBCBXDCerILM0513",
"UBC/CMMT BXD Cerebellum All Ages Combined ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "441",
"CMMTUBCBXDG12CerILM0513",
"UBC/CMMT BXD E12 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "442",
"CMMTUBCBXDG15CerILM0513",
"UBC/CMMT BXD E15 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "443",
"CMMTUBCBXDG18CerILM0513",
"UBC/CMMT BXD E18 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "437",
"CMMTUBCBXDP00CerILM0513",
"UBC/CMMT BXD P0 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "438",
"CMMTUBCBXDP03CerILM0513",
"UBC/CMMT BXD P3 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "439",
"CMMTUBCBXDP06CerILM0513",
"UBC/CMMT BXD P6 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "440",
"CMMTUBCBXDP09CerILM0513",
"UBC/CMMT BXD P9 Cerebellum ILM Mouse WG-6 v2.0 (May13) RankInv **"
],
[
+ "415",
"GenEx_BXD_CerebEt_RMA_0213",
"GenEx BXD EtOH Cerebellum Affy M430 2.0 (Feb13) RMA Both Sexes **"
],
[
+ "416",
"GenEx_BXD_CerebEt_RMA_F_0213",
"GenEx BXD EtOH Cerebellum Affy M430 2.0 (Feb13) RMA Females **"
],
[
+ "417",
"GenEx_BXD_CerebEt_RMA_M_0213",
"GenEx BXD EtOH Cerebellum Affy M430 2.0 (Feb13) RMA Males **"
],
[
+ "418",
"GenEx_BXD_CerebSal_RMA_0213",
"GenEx BXD Sal Cerebellum Affy M430 2.0 (Feb13) RMA Both Sexes **"
],
[
+ "419",
"GenEx_BXD_CerebSal_RMA_F_0213",
"GenEx BXD Sal Cerebellum Affy M430 2.0 (Feb13) RMA Females **"
],
[
+ "420",
"GenEx_BXD_CerebSal_RMA_M_0213",
"GenEx BXD Sal Cerebellum Affy M430 2.0 (Feb13) RMA Males **"
]
],
"Eye mRNA": [
[
+ "207",
"Eye_M2_0908_R",
"Eye M430v2 (Sep08) RMA"
],
[
+ "10",
"gn10",
"Eye M430v2 No Mutant/Mutant (Aug12) RMA **"
],
[
+ "261",
"Eye_M2_0908_R_NB",
"Eye M430v2 Mutant Gpnmb (Sep08) RMA **"
],
[
+ "262",
"Eye_M2_0908_R_ND",
"Eye M430v2 WT Gpnmb (Sep08) RMA **"
],
[
+ "278",
+ "Eye_M2_0908_R_MT",
+ "Eye M430v2 Mutant Tyrp1 (Sep08) RMA **"
+ ],
+ [
+ "382",
"Eye_M2_0908_WTWT",
"Eye M430v2 WT WT (Sep08) RMA **"
],
[
+ "279",
"Eye_M2_0908_R_WT",
"Eye M430v2 WT Tyrp1 (Sep08) RMA **"
],
[
- "Eye_M2_0908_R_MT",
- "Eye M430v2 Mutant Tyrp1 (Sep08) RMA **"
- ],
- [
+ "400",
"DBA2J-ONH-1212",
"Howell et al. 2011, DBA/2J Glaucoma Optic Nerve Head M430 2.0 (Dec12) RMA"
],
[
+ "360",
"BXD_GLA_0911",
"Howell et al. 2011, DBA/2J Glaucoma Retina M430 2.0 (Sep11) RMA"
]
],
"Gastrointestinal mRNA": [
[
+ "539",
"UTHSC_GutGL_0414",
"UTHSC Mouse BXD Gastrointestinal Affy MoGene 1.0 ST Gene Level (Apr14) RMA **"
]
@@ -1558,408 +1831,502 @@
],
"Heart mRNA": [
[
+ "485",
"EPFL-LISPBXDHeCD0114",
"EPFL/LISP BXD CD Heart Affy Mouse Gene 2.0 ST Gene Level (Jan14) RMA **"
],
[
+ "486",
"EPFL-LISPBXDHeHFD0114",
"EPFL/LISP BXD HFD Heart Affy Mouse Gene 2.0 ST Gene Level (Jan14) RMA **"
],
[
+ "487",
"EPFL-LISPBXDHeCDEx0114",
"EPFL/LISP BXD CD Heart Affy Mouse Gene 2.0 ST Exon Level (Jan14) RMA **"
],
[
+ "488",
"EPFL-LISPBXDHeHFDEx0114",
"EPFL/LISP BXD HFD Heart Affy Mouse Gene 2.0 ST Exon Level (Jan14) RMA **"
]
],
"Hematopoietic Cells mRNA": [
[
+ "149",
"UMCG_0907_HemaStem_ori",
"UMCG Stem Cells ILM6v1.1 (Apr09) original"
],
[
+ "145",
"UMCG_0907_HemaStem",
"UMCG Stem Cells ILM6v1.1 (Apr09) transformed"
],
[
+ "151",
"UMCG_0907_Pro_ori",
"UMCG Progenitor Cells ILM6v1.1 (Apr09) original"
],
[
+ "147",
"UMCG_0907_Pro",
"UMCG Progenitor Cells ILM6v1.1 (Apr09) transformed"
],
[
+ "150",
"UMCG_0907_Eryth_ori",
"UMCG Erythroid Cells ILM6v1.1 (Apr09) original"
],
[
+ "146",
"UMCG_0907_Eryth",
"UMCG Erythroid Cells ILM6v1.1 (Apr09) transformed"
],
[
+ "148",
"UMCG_0907_Myeloid_ori",
"UMCG Myeloid Cells ILM6v1.1 (Apr09) original"
],
[
+ "144",
"UMCG_0907_Myeloid",
"UMCG Myeloid Cells ILM6v1.1 (Apr09) transformed"
],
[
+ "7",
"HC_U_0304_R",
"GNF Stem Cells U74Av2 (Mar04) RMA"
]
],
"Hippocampus mRNA": [
[
+ "112",
"HC_M2_0606_P",
"Hippocampus Consortium M430v2 (Jun06) PDNN"
],
[
+ "111",
"HC_M2_0606_M",
"Hippocampus Consortium M430v2 (Jun06) MAS5"
],
[
+ "110",
"HC_M2_0606_R",
"Hippocampus Consortium M430v2 (Jun06) RMA"
],
[
+ "291",
"UT_ILM_BXD_hipp_5T_1112",
"UTHSC Hippocampus Illumina v6.1 All Combined (Nov12) RankInv"
],
[
+ "292",
"UT_ILM_BXD_hipp_NON_1112",
"UTHSC Hippocampus Illumina v6.1 NON (Nov12) RankInv"
],
[
+ "293",
"UT_ILM_BXD_hipp_NOS_1112",
"UTHSC Hippocampus Illumina v6.1 NOS (Nov12) RankInv"
],
[
+ "294",
"UT_ILM_BXD_hipp_NOE_1112",
"UTHSC Hippocampus Illumina v6.1 NOE (Nov12) RankInv"
],
[
+ "295",
"UT_ILM_BXD_hipp_RSS_1112",
"UTHSC Hippocampus Illumina v6.1 RSS (Nov12) RankInv"
],
[
- "UT_ILM_BXD_hipp_RSE_1112",
- "UTHSC Hippocampus Illumina v6.1 RSE (Nov12) RankInv"
- ],
- [
+ "206",
"UMUTAffyExon_0209_RMA",
"UMUTAffy Hippocampus Exon (Feb09) RMA"
],
[
+ "296",
+ "UT_ILM_BXD_hipp_RSE_1112",
+ "UTHSC Hippocampus Illumina v6.1 RSE (Nov12) RankInv"
+ ],
+ [
+ "242",
"UT_ILM_BXD_hipp_NON_0909",
"UTHSC Hippocampus Illumina v6.1 NON (Sep09) RankInv"
],
[
+ "243",
"UT_ILM_BXD_hipp_NOS_0909",
"UTHSC Hippocampus Illumina v6.1 NOS (Sep09) RankInv"
],
[
+ "246",
"UT_ILM_BXD_hipp_NOE_0909",
"UTHSC Hippocampus Illumina v6.1 NOE (Sep09) RankInv"
],
[
+ "244",
"UT_ILM_BXD_hipp_RSS_0909",
"UTHSC Hippocampus Illumina v6.1 RSS (Sep09) RankInv"
],
[
+ "245",
"UT_ILM_BXD_hipp_RSE_0909",
"UTHSC Hippocampus Illumina v6.1 RSE (Sep09) RankInv"
],
[
+ "393",
"UTHSC_BXD_HArev3_0912",
"UTHSC BXD Aged Hippocampus rev3 Affy Mouse Gene 1.0 ST (Sep12) RMA **"
],
[
+ "392",
"UTHSC_BXD_H_0912",
"UTHSC BXD Aged Hippocampus Affy Mouse Gene 1.0 ST (Sep12) RMA Exon Level **"
]
],
"Hippocampus microRNA": [
[
+ "491",
"UTHSC_BXD_Hip_miRNASeq0214",
"UTHSC BXD Hippocampus Ion Torrent microRNA (Feb14) RPKM **"
]
],
"Hypothalamus mRNA": [
[
+ "281",
"INIA_Hyp_RMA_1110",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10)"
],
[
+ "318",
"INIA_Hyp_M_RMA_1110",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) Male"
],
[
+ "317",
"INIA_Hyp_F_RMA_1110",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) Female"
],
[
+ "459",
"INIA_Hyp_PCA_0813_v4",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080913"
],
[
+ "458",
"INIA_Hyp_PCA_0813_v3",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080813"
],
[
+ "457",
"INIA_Hyp_PCA_0813_v2",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080513"
],
[
+ "456",
"INIA_Hyp_PCA_0813",
"INIA Hypothalamus Affy MoGene 1.0 ST (Nov10) PCA Test v080213"
],
[
+ "159",
"INIA_Hyp_RMA_Ex-1110",
"INIA Hypothalamus Exon Affy MoGene 1.0 ST (Nov10)"
]
],
"Kidney mRNA": [
[
+ "240",
"MA_M2M_0706_R",
"Mouse kidney M430v2 Male (Aug06) RMA"
],
[
+ "239",
"MA_M2F_0706_R",
"Mouse kidney M430v2 Female (Aug06) RMA"
],
[
+ "118",
"MA_M2_0806_R",
"Mouse kidney M430v2 Sex Balanced (Aug06) RMA"
],
[
+ "117",
"MA_M2_0806_P",
"Mouse Kidney M430v2 Sex Balanced (Aug06) PDNN"
],
[
- "MA_M2_0706_R",
- "Mouse Kidney M430v2 (Jul06) RMA"
- ],
- [
+ "116",
"MA_M2_0706_P",
"Mouse Kidney M430v2 (Jul06) PDNN"
+ ],
+ [
+ "115",
+ "MA_M2_0706_R",
+ "Mouse Kidney M430v2 (Jul06) RMA"
]
],
"Leucocytes mRNA": [
[
+ "218",
"Illum_BXD_PBL_1108",
"UWA Illumina PBL (Nov08) RSN **"
]
],
"Liver Metabolome": [
[
+ "474",
"EPFL-LISP_LivPMetHFD1213",
"EPFL/LISP BXD Liver Polar Metabolites HFD (Jun14) **"
],
[
+ "475",
"EPFL-LISP_LivPMetCD1213",
"EPFL/LISP BXD Liver Polar Metabolites CD (Jun14) **"
]
],
"Liver Proteome": [
[
- "EPFLETHZBXDprotCD0514",
- "EPFL/ETHZ BXD Liver, Soluble Proteins CD (May14) SWATH **"
- ],
- [
+ "541",
"EPFLETHZBXDprotHFD0514",
"EPFL/ETHZ BXD Liver, Soluble Proteins HFD (May14) SWATH **"
],
[
+ "540",
+ "EPFLETHZBXDprotCD0514",
+ "EPFL/ETHZ BXD Liver, Soluble Proteins CD (May14) SWATH **"
+ ],
+ [
+ "489",
"EPFLBXDprotHFDRPN0214",
"EPFL/LISP BXD Liver, Soluble Proteins HFD (Feb14) SRM **"
],
[
+ "490",
"EPFLBXDprotCDRPN0214",
"EPFL/LISP BXD Liver, Soluble Proteins CD (Feb14) SRM **"
]
],
"Liver mRNA": [
[
+ "373",
"GSE16780_UCLA_ML0911",
"GSE16780 UCLA Hybrid MDP Liver Affy HT M430A (Sep11) RMA"
],
[
+ "325",
"SUH_Liv_RMA_0611",
"SUH BXD Liver CCl4-treated Affy Mouse Gene 1.0 ST (Jun11) RMA"
],
[
+ "430",
"EPFLMouseLiverRMA0413",
"EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
+ "431",
"EPFLMouseLiverHFDRMA0413",
"EPFL/LISP BXD HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
+ "432",
"EPFLMouseLiverCDRMA0413",
"EPFL/LISP BXD CD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA"
],
[
+ "433",
"EPFLMouseLiverBothExRMA0413",
"EPFL/LISP BXD CD+HFD Liver Affy Mouse Gene 1.0 ST (Apr13) RMA Exon Level **"
],
[
+ "256",
"GenEx_BXD_liverEt_M5_0912",
"GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Both Sexes **"
],
[
+ "257",
"GenEx_BXD_liverEt_M5M_0912",
"GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Males **"
],
[
+ "258",
"GenEx_BXD_liverEt_M5F_0912",
"GenEx BXD EtOH Liver Affy M430 2.0 (Sep12) MAS5 Females **"
],
[
+ "307",
"GenEx_BXD_liverEt_RMA_0211",
"GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Both Sexes **"
],
[
+ "308",
"GenEx_BXD_liverEt_RMA_M_0211",
"GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Males **"
],
[
+ "309",
"GenEx_BXD_liverEt_RMA_F_0211",
"GenEx BXD EtOH Liver Affy M430 2.0 (Feb11) RMA Females **"
],
[
+ "310",
"GenEx_BXD_liverSal_RMA_0211",
"GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Both Sexes **"
],
[
+ "311",
"GenEx_BXD_liverSal_RMA_M_0211",
"GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Males **"
],
[
+ "312",
"GenEx_BXD_liverSal_RMA_F_0211",
"GenEx BXD Sal Liver Affy M430 2.0 (Feb11) RMA Females **"
]
],
"Lung mRNA": [
[
+ "160",
"HZI_0408_R",
"HZI Lung M430v2 (Apr08) RMA"
],
[
+ "161",
"HZI_0408_M",
"HZI Lung M430v2 (Apr08) MAS5"
],
[
+ "468",
"HZI_PR8M-F_1113",
"HZI PR8M-Infected Lungs Females RNAseq (Nov13) RPKM **"
],
[
+ "387",
"HZI_PR8M_Q_0612",
"HZI PR8M-Infected Lungs Agilent4x44 (Apr12) Quantile Females **"
],
[
+ "424",
"HZI_LTCF_0313",
"HZI Lung Time Course Flu PR8M (Mar13) Schughart **"
]
],
"Midbrain mRNA": [
[
+ "381",
"VUBXDMouseMidBrainQ0512",
"VU BXD Midbrain Agilent SurePrint G3 Mouse GE (May12) Quantile"
]
],
"Muscle Metabolome": [
[
+ "477",
"EPFL-LISP_MusPMetHFD1213",
"EPFL/LISP BXD Muscle Polar Metabolites HFD (Jun14) **"
],
[
+ "478",
"EPFL-LISP_MusPMetCD1213",
"EPFL/LISP BXD Muscle Polar Metabolites CD (Jun14) **"
]
],
"Muscle mRNA": [
[
+ "395",
"EPFLMouseMuscleRMA_Ex1112",
"EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
+ "396",
"EPFLMouseMuscleHFDRMAEx1112",
"EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
+ "397",
"EPFLMouseMuscleCDRMAEx1112",
"EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Nov12) RMA Exon Level"
],
[
+ "378",
"EPFLMouseMuscleRMA1211",
"EPFL/LISP BXD CD+HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
],
[
+ "380",
"EPFLMouseMuscleHFDRMA1211",
"EPFL/LISP BXD HFD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
],
[
+ "379",
"EPFLMouseMuscleCDRMA1211",
"EPFL/LISP BXD CD Muscle Affy Mouse Gene 1.0 ST (Dec11) RMA"
]
],
"Neocortex mRNA": [
[
- "DevNeocortex_ILM6.2P3RInv_1111",
- "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv"
- ],
- [
+ "375",
"DevNeocortex_ILM6.2P14RInv_1111",
"BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov11) RankInv"
],
[
+ "374",
+ "DevNeocortex_ILM6.2P3RInv_1111",
+ "BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov11) RankInv"
+ ],
+ [
+ "284",
"HQFNeoc_1210v2_RankInv",
"HQF BXD Neocortex ILM6v1.1 (Dec10v2) RankInv"
],
[
+ "282",
"HQFNeoc_1210_RankInv",
"HQF BXD Neocortex ILM6v1.1 (Dec10) RankInv"
],
[
+ "157",
"HQFNeoc_0208_RankInv",
"HQF BXD Neocortex ILM6v1.1 (Feb08) RankInv"
],
[
- "DevNeocortex_ILM6.2P14RInv_1110",
- "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv"
- ],
- [
+ "274",
"DevNeocortex_ILM6.2P3RInv_1110",
"BIDMC/UTHSC Dev Neocortex P3 ILMv6.2 (Nov10) RankInv"
+ ],
+ [
+ "275",
+ "DevNeocortex_ILM6.2P14RInv_1110",
+ "BIDMC/UTHSC Dev Neocortex P14 ILMv6.2 (Nov10) RankInv"
]
],
"Nucleus Accumbens mRNA": [
[
+ "156",
"VCUSalo_1007_R",
"VCU BXD NAc Sal M430 2.0 (Oct07) RMA"
],
[
+ "155",
"VCUEtOH_1007_R",
"VCU BXD NAc EtOH M430 2.0 (Oct07) RMA **"
],
[
+ "154",
"VCUSal_1007_R",
"VCU BXD NAc EtOH vs Sal M430 2.0 (Oct07) Sscore **"
],
[
+ "409",
"VCU_NAc_Air_0113_R",
"VCU BXD NAc CIE Air M430 2.0 (Jan13) RMA **"
],
[
+ "408",
"VCU_NAc_Et_0113_R",
"VCU BXD NAc CIE EtOH M430 2.0 (Jan13) RMA **"
],
[
+ "407",
"VCU_NAc_AvE_0113_Ss",
"VCU BXD NAc EtOH vs CIE Air M430 2.0 (Jan13) Sscore **"
]
@@ -1972,246 +2339,301 @@
],
"Pituitary Gland mRNA": [
[
+ "389",
"INIA_PG_RMA_0612",
"INIA Pituitary Affy MoGene 1.0ST (Jun12) RMA"
],
[
+ "427",
"INIA_Pituitary_RMA_F_0612",
"INIA Pituitary Affy MoGene 1.0ST (Jun12) RMA Females"
],
[
+ "428",
"INIA_Pituitary_RMA_M_0612",
"INIA Pituitary Affy MoGene 1.0ST (Jun12) RMA Males"
],
[
+ "335",
"INIA_PG_RMA_Ex_0612",
"INIA Pituitary Affy MoGene 1.0ST (Jun12) RMA Exon Level"
]
],
"Popliteal Lymph Node mRNA": [
[
+ "390",
"STJ_PLN_0912",
"St Jude BXD Popliteal Lymph Node Affy HT MG-430 PM (Sep12) RMA **"
]
],
"Prefrontal Cortex mRNA": [
[
+ "135",
"VCUSal_1206_R",
"VCU BXD PFC Sal M430 2.0 (Dec06) 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"
],
[
+ "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 **"
],
[
+ "301",
"VCU_PF_Air_0111_R",
"VCU BXD PFC CIE Air M430 2.0 (Jan11) RMA **"
]
],
"Retina mRNA": [
[
+ "302",
"G2NEI_ILM_Retina_BXD_RI0410",
"Normal HEI Retina (April 2010) RankInv"
],
[
+ "267",
"Illum_Retina_BXD_RankInv0410",
"Full HEI Retina (April 2010) RankInv"
],
[
+ "385",
"ONCRetILM6_0412",
"ONC HEI Retina (April 2012) RankInv"
],
[
- "DoDTATRCRetExMoGene2_1313",
- "DoD TATRC Retina Affy MoGene 2.0 ST (Dec13) RMA Exon Level"
- ],
- [
+ "471",
"DoDTATRCRetMoGene2_1313",
"DoD TATRC Retina Affy MoGene 2.0 ST (Dec13) RMA"
],
[
+ "472",
+ "DoDTATRCRetExMoGene2_1313",
+ "DoD TATRC Retina Affy MoGene 2.0 ST (Dec13) RMA Exon Level"
+ ],
+ [
+ "434",
"ONCRetMoGene2_0413",
"DoD TATRC Retina Affy MoGene 2.0 ST (Oct13) RMA **"
],
[
+ "435",
"ONCRetExMoGene2_0413",
"DoD TATRC Retina Affy MoGene 2.0 ST (Oct13) RMA Exon Level **"
],
[
+ "479",
"DoDTATRCRetBLMoGene2_1213",
"DoD TATRC Retina Blast Affy MoGene 2.0 ST (Dec13) RMA **"
],
[
+ "480",
"DoDTATRCRetBLExMoGene2_1213",
"DoD TATRC Retina Blast Affy MoGene 2.0 ST (Dec13) RMA Exon Level **"
],
[
+ "386",
"B6D2ONCILM_0412",
"B6D2 ONC Retina (April 2012) RankInv **"
],
[
- "G2HEIONCRetILM6_0911",
- "G2 HEI ONC Retina Illumina V6.2 (Sep11) RankInv **"
- ],
- [
+ "371",
"HEIONCvsCRetILM6_0911",
"HEI ONC vs Control Retina Illumina V6.2 (Sep11) RankInv **"
+ ],
+ [
+ "372",
+ "G2HEIONCRetILM6_0911",
+ "G2 HEI ONC Retina Illumina V6.2 (Sep11) RankInv **"
]
],
"Spleen mRNA": [
[
+ "283",
"UTHSC_SPL_RMA_1210",
"UTHSC Affy MoGene 1.0 ST Spleen (Dec10) RMA"
],
[
+ "286",
"UTHSC_SPL_RMA_1210M",
"UTHSC Affy MoGene 1.0 ST Spleen (Dec10) RMA Males"
],
[
+ "287",
"UTHSC_SPL_RMA_1210F",
"UTHSC Affy MoGene 1.0 ST Spleen (Dec10) RMA Females"
],
[
+ "429",
"UTHSC_SPL_RMAEx_1210",
"UTHSC Affy MoGene 1.0 ST Spleen (Dec10) RMA Exon Level"
],
[
+ "271",
"UTHSC_SPL_RMA_1010",
"UTHSC Affy MoGene 1.0 ST Spleen (Oct10) RMA"
],
[
+ "260",
"UTK_BXDSpl_VST_0110",
"UTK Spleen ILM6.1 (Jan10) VST"
],
[
+ "227",
"IoP_SPL_RMA_0509",
"IoP Affy MOE 430v2 Spleen (May09) RMA"
],
[
+ "216",
"Illum_BXD_Spl_1108",
"UWA Illumina Spleen (Nov08) RSN **"
]
],
"Striatum mRNA": [
[
+ "399",
"Striatum_Exon_1212",
"HQF Striatum Affy Mouse Exon 1.0ST Gene Level (Dec09) RMA"
],
[
+ "163",
"Striatum_Exon_0209",
"HQF Striatum Affy Mouse Exon 1.0ST Exon Level (Dec09) RMA"
],
[
+ "285",
"UTHSC_Striatum_RankInv_1210",
"HQF BXD Striatum ILM6.1 (Dec10v2) RankInv"
],
[
+ "298",
"UTHSC_Str_RankInv_1210",
"HQF BXD Striatum ILM6.1 (Dec10) RankInv"
],
[
+ "152",
"UTHSC_1107_RankInv",
"HQF BXD Striatum ILM6.1 (Nov07) RankInv"
],
[
+ "74",
"SA_M2_0405_MC",
"HBP Rosen Striatum M430V2 (Apr05) MAS5 Clean"
],
[
+ "69",
"SA_M2_0405_RC",
"HBP Rosen Striatum M430V2 (Apr05) RMA Clean"
],
[
+ "68",
"SA_M2_0405_PC",
"HBP Rosen Striatum M430V2 (Apr05) PDNN Clean"
],
[
+ "67",
"SA_M2_0405_SS",
"HBP Rosen Striatum M430V2 (Apr05) SScore"
],
[
+ "66",
"SA_M2_0405_RR",
"HBP Rosen Striatum M430V2 (Apr05) RMA Orig"
],
[
+ "376",
"DevStriatum_ILM6.2P3RInv_1111",
"BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov11) RankInv **"
],
[
+ "377",
"DevStriatum_ILM6.2P14RInv_1111",
"BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov11) RankInv **"
],
[
- "DevStriatum_ILM6.2P3RInv_1110",
- "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov10) RankInv **"
- ],
- [
+ "277",
"DevStriatum_ILM6.2P14RInv_1110",
"BIDMC/UTHSC Dev Striatum P14 ILMv6.2 (Nov10) RankInv **"
+ ],
+ [
+ "276",
+ "DevStriatum_ILM6.2P3RInv_1110",
+ "BIDMC/UTHSC Dev Striatum P3 ILMv6.2 (Nov10) RankInv **"
]
],
"T Cell (helper) mRNA": [
[
+ "319",
"RTHC_0211_R",
"HZI Thelp M430v2 (Feb11) RMA"
]
],
"T Cell (regulatory) mRNA": [
[
+ "122",
"RTC_1106_R",
"HZI Treg M430v2 (Feb11) RMA"
]
],
"Thymus mRNA": [
[
+ "217",
"Illum_BXD_Thy_1108",
"UWA Illumina Thymus (Nov08) RSN **"
]
],
"Ventral Tegmental Area mRNA": [
[
+ "229",
+ "VCUEtOH_0609_R",
+ "VCU BXD VTA EtOH M430 2.0 (Jun09) RMA **"
+ ],
+ [
+ "228",
"VCUSal_0609_R",
"VCU BXD VTA Sal M430 2.0 (Jun09) RMA **"
],
[
+ "230",
"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 **"
]
]
},
"BXH": {
"Bone Femur mRNA": [
[
+ "412",
"UCLA_BXH_Femur_0113_RSN",
"UCLA GSE27483 BXH Bone Femur ILM Mouse WG-6 v1, v1.1 (Jan13) RSN"
]
],
"Cartilage mRNA": [
[
+ "209",
"UCLA_BXHBXD_CARTILAGE_V2",
"UCLA BXH and BXD Cartilage v2"
],
[
+ "205",
"UCLA_BXHBXD_CARTILAGE",
"UCLA BXH and BXD Cartilage"
],
[
+ "179",
"UCLA_BXH_CARTILAGE",
"UCLA BXH Cartilage"
]
@@ -2224,6 +2646,7 @@
],
"Liver mRNA": [
[
+ "353",
"GSE16780BXH_UCLA_ML0911",
"GSE16780 UCLA Mouse BXH Liver Affy HT M430A (Sep11) RMA"
]
@@ -2252,28 +2675,34 @@
"CTB6F2": {
"Adipose mRNA": [
[
+ "170",
"UCLA_CTB6B6CTF2_ADIPOSE_2005",
"UCLA CTB6/B6CTF2 Adipose (2005) mlratio"
],
[
+ "189",
"UCLA_CTB6B6CTF2_ADIPOSE_FEMALE",
"UCLA CTB6B6CTF2 Adipose Female mlratio **"
],
[
+ "188",
"UCLA_CTB6B6CTF2_ADIPOSE_MALE",
"UCLA CTB6B6CTF2 Adipose Male mlratio **"
]
],
"Brain mRNA": [
[
+ "171",
"UCLA_CTB6B6CTF2_BRAIN_2005",
"UCLA CTB6/B6CTF2 Brain (2005) mlratio"
],
[
+ "190",
"UCLA_CTB6B6CTF2_BRAIN_MALE",
"UCLA CTB6/B6CTF2 Brain Males (2005) mlratio"
],
[
+ "191",
"UCLA_CTB6B6CTF2_BRAIN_FEMALE",
"UCLA CTB6/B6CTF2 Brain Females (2005) mlratio"
]
@@ -2286,28 +2715,34 @@
],
"Liver mRNA": [
[
+ "172",
"UCLA_CTB6B6CTF2_LIVER_2005",
"UCLA CTB6/B6CTF2 Liver (2005) mlratio"
],
[
+ "193",
"UCLA_CTB6B6CTF2_LIVER_FEMALE",
"UCLA CTB6B6CTF2 Liver Female mlratio **"
],
[
+ "192",
"UCLA_CTB6B6CTF2_LIVER_MALE",
"UCLA CTB6B6CTF2 Liver Male mlratio **"
]
],
"Muscle mRNA": [
[
+ "173",
"UCLA_CTB6B6CTF2_MUSCLE_2005",
"UCLA CTB6/B6CTF2 Muscle (2005) mlratio"
],
[
+ "195",
"UCLA_CTB6B6CTF2_MUSCLE_FEMALE",
"UCLA CTB6B6CTF2 Muscle Female mlratio **"
],
[
+ "194",
"UCLA_CTB6B6CTF2_MUSCLE_MALE",
"UCLA CTB6B6CTF2 Muscle Male mlratio **"
]
@@ -2328,12 +2763,14 @@
],
"Hippocampus mRNA": [
[
- "HC_M2CB_1205_P",
- "Hippocampus Consortium M430v2 CXB (Dec05) PDNN"
- ],
- [
+ "100",
"HC_M2CB_1205_R",
"Hippocampus Consortium M430v2 CXB (Dec05) RMA"
+ ],
+ [
+ "99",
+ "HC_M2CB_1205_P",
+ "Hippocampus Consortium M430v2 CXB (Dec05) PDNN"
]
],
"Phenotypes": [
@@ -2344,6 +2781,7 @@
],
"Spleen mRNA": [
[
+ "153",
"STSPL_1107_R",
"Stuart Spleen M430v2 (Nov07) RMA"
]
@@ -2352,18 +2790,21 @@
"HS": {
"Hippocampus mRNA": [
[
+ "268",
"OXUKHS_ILMHipp_RI0510",
"OX UK HS ILM6v1.1 Hippocampus (May 2010) RankInv"
]
],
"Liver mRNA": [
[
+ "269",
"OXUKHS_ILMLiver_RI0510",
"OX UK HS ILM6v1.1 Liver (May 2010) RankInv"
]
],
"Lung mRNA": [
[
+ "270",
"OXUKHS_ILMLung_RI0510",
"OX UK HS ILM6v1.1 Lung (May 2010) RankInv"
]
@@ -2378,6 +2819,7 @@
"HS-CC": {
"Striatum mRNA": [
[
+ "304",
"OHSU_HS-CC_ILMStr_0211",
"OHSU HS-CC Striatum ILM6v1 (Feb11) RankInv"
]
@@ -2392,52 +2834,64 @@
],
"Hippocampus mRNA": [
[
+ "143",
"Illum_LXS_Hipp_loess0807",
"Hippocampus Illumina (Aug07) LOESS"
],
[
+ "142",
"Illum_LXS_Hipp_loess_nb0807",
"Hippocampus Illumina (Aug07) LOESS_NB"
],
[
+ "141",
"Illum_LXS_Hipp_quant0807",
"Hippocampus Illumina (Aug07) QUANT"
],
[
+ "140",
"Illum_LXS_Hipp_quant_nb0807",
"Hippocampus Illumina (Aug07) QUANT_NB"
],
[
+ "139",
"Illum_LXS_Hipp_rsn0807",
"Hippocampus Illumina (Aug07) RSN"
],
[
+ "138",
"Illum_LXS_Hipp_rsn_nb0807",
"Hippocampus Illumina (Aug07) RSN_NB"
],
[
+ "133",
"Hipp_Illumina_RankInv_0507",
"Hippocampus Illumina (May07) RankInv"
],
[
+ "212",
+ "Illum_LXS_Hipp_RSE_1008",
+ "Hippocampus Illumina RSE (Oct08) RankInv beta"
+ ],
+ [
+ "214",
"Illum_LXS_Hipp_NOE_1008",
"Hippocampus Illumina NOE (Oct08) RankInv beta"
],
[
+ "211",
"Illum_LXS_Hipp_RSS_1008",
"Hippocampus Illumina RSS (Oct08) RankInv beta"
],
[
+ "213",
"Illum_LXS_Hipp_NOS_1008",
"Hippocampus Illumina NOS (Oct08) RankInv beta"
],
[
+ "219",
"Illum_LXS_Hipp_NON_1008",
"Hippocampus Illumina NON (Oct08) RankInv beta"
- ],
- [
- "Illum_LXS_Hipp_RSE_1008",
- "Hippocampus Illumina RSE (Oct08) RankInv beta"
]
],
"Phenotypes": [
@@ -2448,16 +2902,19 @@
],
"Prefrontal Cortex mRNA": [
[
+ "131",
+ "VCUEtOH_0806_R",
+ "VCU LXS PFC EtOH M430A 2.0 (Aug06) RMA **"
+ ],
+ [
+ "130",
"VCUSal_0806_R",
"VCU LXS PFC Sal M430A 2.0 (Aug06) RMA"
],
[
+ "132",
"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 **"
]
]
},
@@ -2478,12 +2935,14 @@
"MDP": {
"Bone Femur mRNA": [
[
+ "413",
"UCLA_MDP_Femur_0113_RSN",
"UCLA GSE27483 MDP Bone Femur ILM Mouse WG-6 v1, v1.1 (Jan13) RSN"
]
],
"Dorsal Root Ganglia mRNA": [
[
+ "402",
"TSRI-DRG-AffyMOE430_0113-MDP",
"TSRI DRG Affy Mouse Genome 430 2.0 (Jan13) RMA MDP"
]
@@ -2496,32 +2955,39 @@
],
"Hippocampus mRNA": [
[
- "HC_M2_0606_MDP",
- "Hippocampus Consortium M430v2 (Jun06) RMA MDP"
- ],
- [
+ "273",
"UMUTAffyExon_0209_RMA_MDP",
"UMUTAffy Hippocampus Exon (Feb09) RMA MDP"
+ ],
+ [
+ "272",
+ "HC_M2_0606_MDP",
+ "Hippocampus Consortium M430v2 (Jun06) RMA MDP"
]
],
"Liver mRNA": [
[
+ "370",
"GSE16780MDP_UCLA_ML0911",
"GSE16780 UCLA Mouse MDP Liver Affy HT M430A (Sep11) RMA"
],
[
+ "357",
"JAX_CSB_L_0711",
"JAX Liver Affy M430 2.0 (Jul11) MDP"
],
[
+ "358",
"JAX_CSB_L_HF_0711",
"JAX Liver HF Affy M430 2.0 (Jul11) MDP"
],
[
+ "359",
"JAX_CSB_L_6C_0711",
"JAX Liver 6C Affy M430 2.0 (Jul11) MDP"
],
[
+ "403",
"JAX_liver_agil_MDP-0113",
"Harrill-Rusyn MDP Liver Acetaminophen Tox Study (G4121A, 2009)"
]
@@ -2536,6 +3002,7 @@
"NZBXFVB-N2": {
"Mammary Tumors mRNA": [
[
+ "225",
"NCI_Mam_Tum_RMA_0409",
"NCI Mammary M430v2 (Apr09) RMA"
]
@@ -2558,10 +3025,12 @@
"Scripps-2013": {
"Anterior Cingulate Cortex mRNA": [
[
+ "450",
"ScrBXDACC4G0513",
"Scripps BXD ACC 4 Groups Affy Mouse Gene 1.0 ST (May13) RMA Gene Level **"
],
[
+ "451",
"ScrBXDACC4GEx0513",
"Scripps BXD ACC 4 Groups Affy Mouse Gene 1.0 ST (May13) RMA Exon Level **"
]
@@ -2580,6 +3049,7 @@
"HXBBXH": {
"Adrenal Gland mRNA": [
[
+ "220",
"HXB_Adrenal_1208",
"MDC/CAS/UCL Adrenal 230A (Dec08) RMA"
]
@@ -2592,42 +3062,50 @@
],
"Heart mRNA": [
[
+ "221",
"HXB_Heart_1208",
"MDC/CAS/UCL Heart 230_V2 (Dec08) RMA"
]
],
"Hippocampus mRNA": [
[
+ "231",
"UT_HippRatEx_RMA_0709",
"UT Hippocampus Affy RaEx 1.0 Exon (Jul09) RMA"
]
],
"Kidney mRNA": [
[
+ "70",
"KI_2A_0405_M",
"MDC/CAS/ICL Kidney 230A (Apr05) MAS5"
],
[
+ "65",
"KI_2A_0405_Rz",
"MDC/CAS/ICL Kidney 230A (Apr05) RMA 2z+8"
],
[
+ "64",
"KI_2A_0405_R",
"MDC/CAS/ICL Kidney 230A (Apr05) RMA"
]
],
"Liver mRNA": [
[
+ "222",
"HXB_Liver_1208",
"MDC/CAS/UCL Liver 230v2 (Dec08) RMA"
]
],
"Peritoneal Fat mRNA": [
[
+ "79",
"FT_2A_0805_M",
"MDC/CAS/ICL Peritoneal Fat 230A (Aug05) MAS5"
],
[
+ "75",
"FT_2A_0605_Rz",
"MDC/CAS/ICL Peritoneal Fat 230A (Jun05) RMA 2z+8"
]
@@ -2642,6 +3120,7 @@
"SRxSHRSPF2": {
"Eye mRNA": [
[
+ "226",
"UIOWA_Eye_RMA_0906",
"UIOWA Eye mRNA RAE230v2 (Sep06) RMA"
]
diff --git a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
index f91504be..1fe4cf75 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
+++ b/wqflask/wqflask/static/new/javascript/dataset_select_menu.js
@@ -28,6 +28,7 @@ $(function() {
window.populate_group = populate_group;
populate_type = function() {
var group, species, type_list;
+ console.log("in populate type");
species = $('#species').val();
group = $('#group').val();
type_list = this.jdata.types[species][group];
@@ -37,6 +38,7 @@ $(function() {
window.populate_type = populate_type;
populate_dataset = function() {
var dataset_list, group, species, type;
+ console.log("in populate dataset");
species = $('#species').val();
group = $('#group').val();
type = $('#type').val();
@@ -53,7 +55,11 @@ $(function() {
_results = [];
for (_i = 0, _len = items.length; _i < _len; _i++) {
item = items[_i];
- _results.push(dropdown.append($("<option />").val(item[0]).text(item[1])));
+ if (item.length > 2){
+ _results.push(dropdown.append($("<option data-id=\""+item[0]+"\" />").val(item[1]).text(item[2])));
+ } else {
+ _results.push(dropdown.append($("<option />").val(item[0]).text(item[1])));
+ }
}
return _results;
};
@@ -87,8 +93,8 @@ $(function() {
$('#group_info').click(group_info);
dataset_info = function() {
var dataset, url;
- dataset = $('#dataset').val();
- url = "/webqtl/main.py?FormID=sharinginfo&InfoPageName=" + dataset;
+ accession_id = $('#dataset option:selected').data("id");
+ url = "http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId=" + accession_id;
return open_window(url, "Dataset Info");
};
$('#dataset_info').click(dataset_info);
diff --git a/wqflask/wqflask/static/new/javascript/lod_chart.js b/wqflask/wqflask/static/new/javascript/lod_chart.js
index d0d39fe6..014bf59b 100644
--- a/wqflask/wqflask/static/new/javascript/lod_chart.js
+++ b/wqflask/wqflask/static/new/javascript/lod_chart.js
@@ -2,7 +2,7 @@
var lodchart;
lodchart = function() {
- var additive, additive_ylab, additive_ylim, additive_yscale, additive_yticks, additivelinecolor, axispos, chart, chrGap, chrSelect, darkrect, height, lightrect, linewidth, lodcurve, lodlinecolor, lodvarname, manhattanPlot, margin, markerSelect, nyticks, pad4heatmap, pointcolor, pointsAtMarkers, pointsize, pointstroke, rotate_ylab, significantcolor, suggestivecolor, title, titlepos, width, xlab, xscale, ylab, ylim, yscale, yticks;
+ var additive, additive_ylab, additive_ylim, additive_yscale, additive_yticks, additivelinecolor, axispos, chart, chrGap, chrSelect, darkrect, height, lightrect, linewidth, lodcurve, lodlinecolor, lodvarname, manhattanPlot, mappingScale, margin, markerSelect, nyticks, pad4heatmap, pointcolor, pointsAtMarkers, pointsize, pointstroke, rotate_ylab, significantcolor, suggestivecolor, title, titlepos, width, xlab, xscale, ylab, ylim, yscale, yticks;
width = 800;
height = 500;
margin = {
@@ -97,7 +97,7 @@ lodchart = function() {
additive_yticks = additive_yticks != null ? additive_yticks : additive_yscale.ticks(nyticks);
}
reorgLodData(data, lodvarname);
- data = chrscales(data, width, chrGap, margin.left, pad4heatmap);
+ data = chrscales(data, width, chrGap, margin.left, pad4heatmap, mappingScale);
xscale = data.xscale;
chrSelect = g.append("g").attr("class", "chrRect").selectAll("empty").data(data.chrnames).enter().append("rect").attr("id", function(d) {
return "chrrect" + d[0];
@@ -133,7 +133,7 @@ lodchart = function() {
var chr_plot;
$('#topchart').remove();
$('#chart_container').append('<div class="qtlcharts" id="topchart"></div>');
- return chr_plot = new Chr_Lod_Chart(600, 1200, chr_ob, manhattanPlot);
+ return chr_plot = new Chr_Lod_Chart(600, 1200, chr_ob, manhattanPlot, mappingScale);
};
rotate_ylab = rotate_ylab != null ? rotate_ylab : ylab.length > 1;
yaxis = g.append("g").attr("class", "y axis");
@@ -305,6 +305,13 @@ lodchart = function() {
manhattanPlot = value;
return chart;
};
+ chart.mappingScale = function(value) {
+ if (!arguments.length) {
+ return mappingScale;
+ }
+ mappingScale = value;
+ return chart;
+ };
chart.ylim = function(value) {
if (!arguments.length) {
return ylim;
diff --git a/wqflask/wqflask/static/new/javascript/panelutil.js b/wqflask/wqflask/static/new/javascript/panelutil.js
index 113512b4..4c8e77ba 100644
--- a/wqflask/wqflask/static/new/javascript/panelutil.js
+++ b/wqflask/wqflask/static/new/javascript/panelutil.js
@@ -105,7 +105,7 @@ reorgLodData = function(data, lodvarname) {
return data;
};
-chrscales = function(data, width, chrGap, leftMargin, pad4heatmap) {
+chrscales = function(data, width, chrGap, leftMargin, pad4heatmap, mappingScale) {
var L, chr, chrEnd, chrLength, chrStart, cur, d, i, maxd, rng, totalChrLength, w, _i, _j, _len, _len1, _ref, _ref1;
chrStart = [];
chrEnd = [];
@@ -156,7 +156,15 @@ chrscales = function(data, width, chrGap, leftMargin, pad4heatmap) {
w = Math.round((width - chrGap * (data.chrnames.length - pad4heatmap)) / totalChrLength * chrLength[i]);
data.chrEnd.push(cur + w);
cur = data.chrEnd[i] + chrGap;
- data.xscale[chr[0]] = d3.scale.linear().domain([chrStart[i], chrEnd[i]]).range([data.chrStart[i], data.chrEnd[i]]);
+
+ if (mappingScale == "morgan") {
+ max_pos = d3.max(data.posByChr[chr[0]])
+ console.log("max_pos:", max_pos)
+ data.xscale[chr[0]] = d3.scale.linear().domain([chrStart[i], max_pos]).range([data.chrStart[i], data.chrEnd[i]]);
+ }
+ else {
+ data.xscale[chr[0]] = d3.scale.linear().domain([chrStart[i], chrEnd[i]]).range([data.chrStart[i], data.chrEnd[i]]);
+ }
}
return data;
};
diff --git a/wqflask/wqflask/templates/correlation_matrix.html b/wqflask/wqflask/templates/correlation_matrix.html
index c822b8bc..593c7bea 100755
--- a/wqflask/wqflask/templates/correlation_matrix.html
+++ b/wqflask/wqflask/templates/correlation_matrix.html
@@ -12,7 +12,9 @@
{{ header("Correlation Matrix") }}
-
+{% if lowest_overlap < 8 %}
+<div style="margin: 20px;" >Caution: This matrix of correlations contains some cells with small sample sizes of fewer than 8.</div>
+{% endif %}
<table class="matrix" border="1" cellpadding="5" cellspacing="1" style="margin: 20px;" width="80%">
<tbody>
@@ -42,18 +44,48 @@
</tbody>
</table>
+<br>
+
+<div id="loadings_plot"></div>
+
+<table class="table table-hover table-striped" border="1" id='trait_table' style="margin: 20px;" width="40%">
+ <thead>
+ <tr>
+ <th></th>
+ <th align="right" >Factor 1</th>
+ <th align="right" >Factor 2</th>
+ <th align="right" >Factor 2</th>
<!--
-<div class="container">
- <div id="chart"></div>
-</div>
+ {% for row in loadings_array %}
+ <th>Factor {{ loop.index }}</th>
+ {% endfor %}
-->
+ </tr>
+ </thead>
+ <tbody>
+ {% for row in loadings_array %}
+ {% set row_counter = loop.index-1 %}
+ <tr>
+ <td>
+ <a href="{{ url_for('show_trait_page', trait_id = traits[loop.index-1].name, dataset = traits[loop.index-1].dataset.name) }}">
+ {{ traits[loop.index-1].name }}
+ </a>
+ </td>
+ {% for column in row %}
+ <td><span style="float: right;">{{ '%0.3f' % loadings_array[row_counter][loop.index-1]|float }}</span></td>
+ {% endfor %}
+ </tr>
+ {% endfor %}
+
+ </tbody>
+</table>
{% endblock %}
{% block js %}
<script>
- js_data = {{ js_data | safe }}
+ loadings = {{ loadings_array | safe }}
</script>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
@@ -65,7 +97,6 @@
<script language="javascript" type="text/javascript" src="/static/packages/underscore/underscore-min.js"></script>
<script type="text/javascript" src="/static/new/javascript/panelutil.js"></script>
<script language="javascript" type="text/javascript" src="/static/new/js_external/chroma.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/javascript/corr_matrix.js"></script>
- <script language="javascript" type="text/javascript" src="/static/new/javascript/create_corr_matrix.js"></script>
+ <script language="javascript" type="text/javascript" src="/static/new/javascript/loadings_plot.js"></script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/correlation_page.html b/wqflask/wqflask/templates/correlation_page.html
index b2d17b62..9dddc7ce 100755
--- a/wqflask/wqflask/templates/correlation_page.html
+++ b/wqflask/wqflask/templates/correlation_page.html
@@ -15,8 +15,8 @@
<h1>Correlation Table</h1>
</div>
- <p>Values of record {{ this_trait.name }} in the <a href="/dbdoc/{{dataset.fullname}}">{{ dataset.fullname }}</a>
- dataset were compared to all records in the <a href="/dbdoc/{{target_dataset.fullname}}">{{ target_dataset.fullname }}</a>
+ <p>Values of record {{ this_trait.name }} in the <a href="/static/dbdoc/{{dataset.fullname}}">{{ dataset.fullname }}</a>
+ dataset were compared to all records in the <a href="/static/dbdoc/{{target_dataset.fullname}}">{{ target_dataset.fullname }}</a>
dataset. The top {{ return_number }} correlations ranked by the {{ formatted_corr_type }} are displayed.
You can resort this list by clicking the headers. Select the Record ID to open the trait data
and analysis page.
diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html
index 6c630344..5d658bc7 100755
--- a/wqflask/wqflask/templates/index_page.html
+++ b/wqflask/wqflask/templates/index_page.html
@@ -61,10 +61,13 @@
<div class="form-group">
<label for="dataset" class="col-xs-1 control-label" style="width: 65px !important;">Dataset:</label>
<div class="col-xs-10 controls input-append">
- <div class="col-xs-8">
- <select name="dataset" id="dataset" class="form-control span5" style="width: 450px !important;"></select>
+ <div class="col-xs-10">
+ <select name="dataset" id="dataset" class="form-control span5" style="width: 340px !important;"></select>
<i class="icon-question-sign"></i>
</div>
+ <div class="col-xs-2">
+ <button type="button" id="dataset_info" class="btn btn-primary form-control" style="width: 75px !important;">Info</button>
+ </div>
</div>
</div>
@@ -270,10 +273,13 @@
function pressed(e) {
// Has the enter key been pressed?
if ( (window.event ? event.keyCode : e.which) == 13) {
- // If it has been so, manually submit the <form>
- document.forms[1].submit();
+ // If enter key has been pressed and the search fields are non-empty
+ // manually submit the <form>
+ if( event.target.value.trim() != "" ) {
+ document.forms[1].submit();
+ }
}
}
</script>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/wqflask/wqflask/templates/marker_regression.html b/wqflask/wqflask/templates/marker_regression.html
index 2d0b6256..b633f815 100755
--- a/wqflask/wqflask/templates/marker_regression.html
+++ b/wqflask/wqflask/templates/marker_regression.html
@@ -36,7 +36,11 @@
<th>Index</th>
<th>{{ score_type }}</th>
<th>Chr</th>
+ {% if mapping_scale == "centimorgan" %}
+ <th>cM</th>
+ {% else %}
<th>Mb</th>
+ {% endif %}
<th>Locus</th>
</tr>
</thead>
@@ -58,7 +62,15 @@
{% endif %}
<td>{{marker.chr}}</td>
<td>{{ '%0.6f' | format(marker.Mb|float) }}</td>
- <td>{{marker.name}}</td>
+ <td>
+ {{ marker.name }}
+ <!--<a href="{{ url_for('show_trait_page',
+ trait_id = marker.name,
+ dataset = dataset.name
+ )}}">
+ {{ marker.name }}
+ </a>-->
+ </td>
</tr>
{% endif %}
{% endfor %}
diff --git a/wqflask/wqflask/templates/marker_regression_gn1.html b/wqflask/wqflask/templates/marker_regression_gn1.html
new file mode 100644
index 00000000..29f69dea
--- /dev/null
+++ b/wqflask/wqflask/templates/marker_regression_gn1.html
@@ -0,0 +1,204 @@
+<?XML VERSION="1.0" ENCODING="UTF-8">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+<TITLE>Mapping</TITLE>
+
+<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<META NAME="keywords" CONTENT="genetics, bioinformatics, genome, phenome, gene expression, complex trait analysis, gene mapping, SNP, quantitative trait locus QTL, expression eQTL, WebQTL, Traitnet, Traitnetwork, personalized medicine">
+<META NAME="description" CONTENT ="GeneNetwork is a free scientific web resource used to study relationships between differences in genes, environmental factors, phenotypes, and disease risk." >
+<META NAME="author" CONTENT ="GeneNetwork developers" >
+<META NAME="geo.placename" CONTENT ="Memphis, TN" >
+<META NAME="geo.region" CONTENT="US-TN">
+
+<LINK REL="stylesheet" TYPE="text/css" HREF='/css/general.css'>
+<LINK REL="stylesheet" TYPE="text/css" HREF='/css/menu.css'>
+<link rel="stylesheet" media="all" type="text/css" href="/css/tabbed_pages.css" />
+<LINK REL="apple-touch-icon" href="/images/ipad_icon3.png" />
+<link type="text/css" href='/css/custom-theme/jquery-ui-1.10.3.custom.css' rel='Stylesheet' />
+<link type="text/css" href='/css/tab_style.css' rel='Stylesheet' />
+
+<script type="text/javascript" src="/javascript/jquery-1.5.2.min.js"></script>
+<SCRIPT SRC="/javascript/webqtl.js"></SCRIPT>
+<SCRIPT SRC="/javascript/dhtml.js"></SCRIPT>
+<SCRIPT SRC="/javascript/tablesorter.js"></SCRIPT>
+<SCRIPT SRC="/javascript/jqueryFunction.js"></SCRIPT>
+<script src="/javascript/tabbed_pages.js" type="text/javascript"></script>
+<script src="/javascript/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
+<script src="/javascript/sorttable.js"></script>
+
+</HEAD>
+<BODY bottommargin="2" leftmargin="2" rightmargin="2" topmargin="2" text=#000000 bgColor=#ffffff >
+
+<TABLE cellSpacing=5 cellPadding=4 width="100%" border=0>
+ <TBODY>
+ <!-- Start of body -->
+ <TR>
+ <TD bgColor=#eeeeee class="solidBorder">
+ <Table width= "100%" cellSpacing=0 cellPadding=5>
+ <TR>
+ <TD height="200" bgcolor="#eeeeee">
+ <BLOCKQUOTE>
+ <TABLE border="0" cellpadding="0" cellspacing="0">
+ <TR>
+ <TD valign="top">
+ <P class="title">Map Viewer: Whole Genome</P>
+ <P>
+ <STRONG>Population: </STRONG>{{ dataset.species }} {{ dataset.group.name }}<BR>
+ <STRONG>Database: </STRONG><A HREF="http://www.genenetwork.org/webqtl/main.py?FormID=sharinginfo&InfoPageName={{ dataset.name }}" TARGET="_blank" class="normalsize">{{ dataset.fullname }}</A><BR>
+ <STRONG>Trait ID: </STRONG><a href="{{ url_for('show_trait_page', trait_id = this_trait.name, dataset = dataset.name) }}">{{ marker.name }}</a><BR>
+ {% if this_trait.symbol != None %}
+ <STRONG>Gene Symbol: </STRONG><EM id="green">this_trait.symbol</EM><BR>
+ {% if this_trait.dataset.type != 'Publish' %}
+ <STRONG>Location: </STRONG> {{ this_trait.location_fmt }}
+ {% endif %}
+ </P>
+ <P>
+ <BR><A HREF="/tmp/Itvl_bnCx5c3U.txt" TARGET="_blank" class="smallsize">Download</A> results in tab-delimited text format.</TD><TD width="25">&nbsp;</TD><TD class="doubleBorder" width="400">
+<FORM METHOD="POST" ACTION="/webqtl/main.py" ENCTYPE="multipart/form-data" NAME="changeViewForm">
+<TABLE border="0"><TR><TD valign="top"><TABLE border="0"><TR><TD class="fs12 fwb ffl">Chr: </TD><TD><SELECT NAME="chromosomes" SIZE=1 onChange="chrLength(this.form.chromosomes.value, this.form.scale.value, this.form, self.ChrLengthMbList);">
+<OPTION Value="-1" SELECTED>All</OPTION>
+<OPTION Value="0">1</OPTION>
+<OPTION Value="1">2</OPTION>
+<OPTION Value="2">3</OPTION>
+<OPTION Value="3">4</OPTION>
+<OPTION Value="4">5</OPTION>
+<OPTION Value="5">6</OPTION>
+<OPTION Value="6">7</OPTION>
+<OPTION Value="7">8</OPTION>
+<OPTION Value="8">9</OPTION>
+<OPTION Value="9">10</OPTION>
+<OPTION Value="10">11</OPTION>
+<OPTION Value="11">12</OPTION>
+<OPTION Value="12">13</OPTION>
+<OPTION Value="13">14</OPTION>
+<OPTION Value="14">15</OPTION>
+<OPTION Value="15">16</OPTION>
+<OPTION Value="16">17</OPTION>
+<OPTION Value="17">18</OPTION>
+<OPTION Value="18">19</OPTION>
+<OPTION Value="19">X</OPTION>
+</SELECT>
+<SELECT NAME="scale" SIZE=1 onChange="chrLength(this.form.chromosomes.value, this.form.scale.value, this.form, self.ChrLengthMbList);">
+<OPTION Value="morgan">Genetic</OPTION>
+<OPTION Value="physic" SELECTED>Physical</OPTION>
+</SELECT>
+
+<INPUT TYPE="button" NAME="Default_Name" class="button" VALUE="Remap" onClick="javascript:databaseFunc(this.form,'showIntMap');"></TD></TR><TR><TD class="fs12 fwb ffl">View: </TD><TD nowrap="on">
+<INPUT TYPE="text" NAME="startMb" SIZE=10> to
+<INPUT TYPE="text" NAME="endMb" SIZE=10>Mb<SPAN class="cr"> *</SPAN></TD></TR><TR><TD class="fs12 fwb ffl">Units: </TD><TD>
+<INPUT TYPE="radio" NAME="LRSCheck" VALUE="LRS" CHECKED>LRS
+<INPUT TYPE="radio" NAME="LRSCheck" VALUE="LOD">LOD <A HREF="/glossary.html#LOD" TARGET="helpWind"><IMG src="/images/qmarkBoxBlue.gif" height="13" width="10" alt="Glossary" border="0"></A></TD></TR><TR><TD class="fs12 fwb ffl"> </TD><TD class="fs11 fwn">
+<INPUT TYPE="text" NAME="lrsMax" VALUE="0.0" SIZE=3>units on Y-axis (0 for default)</TD></TR><TR><TD class="fs12 fwb ffl">Width: </TD><TD class="fs11 fwn ">
+<INPUT TYPE="text" NAME="graphWidth" VALUE="1600" SIZE=5>pixels (minimum=1400)</TD></TR></TABLE></TD><TD width="15">&nbsp;</TD><TD nowrap="on" valign="top">
+<INPUT TYPE="checkbox" NAME="permCheck" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Permutation Test <A HREF="/glossary.html#Permutation" TARGET="helpWind"><IMG src="/images/qmarkBoxBlue.gif" height="13" width="10" alt="Glossary" border="0"></A></SPAN><BR>
+<INPUT TYPE="checkbox" NAME="bootCheck" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Bootstrap Test <A HREF="/glossary.html#bootstrap" TARGET="helpWind"><IMG src="/images/qmarkBoxBlue.gif" height="13" width="10" alt="Glossary" border="0"></A></SPAN><BR>
+<INPUT TYPE="checkbox" NAME="additiveCheck" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Allele Effects <A HREF="/glossary.html#additive" TARGET="helpWind"><IMG src="/images/qmarkBoxBlue.gif" height="13" width="10" alt="Glossary" border="0"></A></SPAN><BR>
+<INPUT TYPE="checkbox" NAME="showSNP" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">SNP Track <A HREF="/glossary.html#snpSeismograph" TARGET="helpWind"><IMG src="/images/qmarkBoxBlue.gif" height="13" width="10" alt="Glossary" border="0"></A></SPAN><SPAN class="cr"> *</SPAN><BR>
+<INPUT TYPE="checkbox" NAME="showGenes" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Gene Track</SPAN><SPAN class="cr"> *</SPAN><BR>
+<INPUT TYPE="checkbox" NAME="intervalAnalystCheck" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Interval Analyst</SPAN><SPAN class="cr"> *</SPAN><BR>
+<INPUT TYPE="checkbox" NAME="haplotypeAnalystCheck" class="checkbox" VALUE="ON"><SPAN class="fs12 fwn">Haplotype Analyst</SPAN><SPAN class="cr"> *</SPAN><BR>
+<INPUT TYPE="checkbox" NAME="viewLegend" class="checkbox" VALUE="ON" CHECKED><SPAN class="fs12 fwn">Legend</SPAN><BR>
+<INPUT TYPE="checkbox" NAME="draw2X" class="checkbox" VALUE="ON"><SPAN class="fs12 fwn">2X Plot</SPAN></TD></TR><TR><TD class="fs11 fwn" align="Center" colspan="3"><SPAN class="cr"> *</SPAN> only apply to single chromosome physical mapping</TD></TR></TABLE>
+<INPUT TYPE="hidden" NAME="permSuggestive" VALUE="10.7954270978">
+<INPUT TYPE="hidden" NAME="permSignificance" VALUE="17.4487035226">
+<INPUT TYPE="hidden" NAME="FormID" VALUE="dataEditing">
+<INPUT TYPE="hidden" NAME="MDPChoice2" VALUE="1">
+<INPUT TYPE="hidden" NAME="MDPChoice3" VALUE="1">
+<INPUT TYPE="hidden" NAME="MDPChoice1" VALUE="1">
+<INPUT TYPE="hidden" NAME="strainVals" VALUE="_">
+<INPUT TYPE="hidden" NAME="extra_attributes" VALUE="_">
+<INPUT TYPE="hidden" NAME="otherStrainNames" VALUE="_">
+<INPUT TYPE="hidden" NAME="trait_name" VALUE="1457003_at">
+<INPUT TYPE="hidden" NAME="fromDataEditingPage" VALUE="1">
+<INPUT TYPE="hidden" NAME="directPermuCheckbox" VALUE="on">
+<INPUT TYPE="hidden" NAME="otherStrainVals" VALUE="_">
+<INPUT TYPE="hidden" NAME="identification" VALUE="Hippocampus M430v2 BXD 06/06 PDNN : 1457003_at">
+<INPUT TYPE="hidden" NAME="bootCheck1" VALUE="on">
+<INPUT TYPE="hidden" NAME="stats_mdp" VALUE="0">
+<INPUT TYPE="hidden" NAME="orderBy" VALUE="['2', '2', '2']">
+<INPUT TYPE="hidden" NAME="chromosomes1" VALUE="-1">
+<INPUT TYPE="hidden" NAME="chromosomes2" VALUE="-1">
+<INPUT TYPE="hidden" NAME="mappingMethodId" VALUE="1">
+<INPUT TYPE="hidden" NAME="other_extra_attributes" VALUE="_">
+<INPUT TYPE="hidden" NAME="scale2" VALUE="physic">
+<INPUT TYPE="hidden" NAME="criteria3" VALUE="500">
+<INPUT TYPE="hidden" NAME="isSE" VALUE="yes">
+<INPUT TYPE="hidden" NAME="num_perm" VALUE="1000">
+<INPUT TYPE="hidden" NAME="submitID" VALUE="intervalMap">
+<INPUT TYPE="hidden" NAME="description" VALUE="glutamate receptor, ionotropic, NMDA2B (epsilon 2); distal 3' UTR (3' UTR long form splice variant)">
+<INPUT TYPE="hidden" NAME="allstrainlist" VALUE="B6D2F1 D2B6F1 C57BL/6J DBA/2J BXD1 BXD2 BXD5 BXD6 BXD8 BXD9 BXD11 BXD12 BXD13 BXD14 BXD15 BXD16 BXD18 BXD19 BXD20 BXD21 BXD22 BXD23 BXD24 BXD24a BXD25 BXD27 BXD28 BXD29 BXD30 BXD31 BXD32 BXD33 BXD34 BXD35 BXD36 BXD37 BXD38 BXD39 BXD40 BXD41 BXD42 BXD43 BXD44 BXD45 BXD48 BXD48a BXD49 BXD50 BXD51 BXD52 BXD53 BXD54 BXD55 BXD56 BXD59 BXD60 BXD61 BXD62 BXD63 BXD64 BXD65 BXD65a BXD65b BXD66 BXD67 BXD68 BXD69 BXD70 BXD71 BXD72 BXD73 BXD73a BXD73b BXD74 BXD75 BXD76 BXD77 BXD78 BXD79 BXD81 BXD83 BXD84 BXD85 BXD86 BXD87 BXD88 BXD89 BXD90 BXD91 BXD93 BXD94 BXD95 BXD98 BXD99 BXD100 BXD101 BXD102 BALB/cByJ PWK/PhJ A/J KK/HlJ LG/J 129S1/SvImJ NZO/HlLtJ CAST/EiJ PWD/PhJ AKR/J CXB13 CXB12 CXB11 CXB10 WSB/EiJ C3H/HeJ CXB7 CXB6 CXB5 CXB4 CXB3 CXB2 CXB1 CXB9 CXB8 NOD/ShiLtJ C57BL/6ByJ BALB/cJ">
+<INPUT TYPE="hidden" NAME="otherStrainVars" VALUE="_">
+<INPUT TYPE="hidden" NAME="graphSort" VALUE="0">
+<INPUT TYPE="hidden" NAME="stats_method" VALUE="1">
+<INPUT TYPE="hidden" NAME="scale1" VALUE="physic">
+<INPUT TYPE="hidden" NAME="sample_method" VALUE="2">
+<INPUT TYPE="hidden" NAME="db_name" VALUE="Hippocampus Consortium M430v2 (Jun06) PDNN">
+<INPUT TYPE="hidden" NAME="num_perm2" VALUE="2000">
+<INPUT TYPE="hidden" NAME="num_perm1" VALUE="1000">
+<INPUT TYPE="hidden" NAME="pairScanReturn" VALUE="50">
+<INPUT TYPE="hidden" NAME="strainNames" VALUE="_">
+<INPUT TYPE="hidden" NAME="removeField" VALUE="e.g., 4, 6-30, 43">
+<INPUT TYPE="hidden" NAME="location" VALUE=" Chr 6 @ 135.679913 Mb">
+<INPUT TYPE="hidden" NAME="valsHidden" VALUE="OFF">
+<INPUT TYPE="hidden" NAME="incparentsf1" VALUE="ON">
+<INPUT TYPE="hidden" NAME="block_method" VALUE="1">
+<INPUT TYPE="hidden" NAME="fullname" VALUE="HC_M2_0606_P::1457003_at">
+<INPUT TYPE="hidden" NAME="RISet" VALUE="BXD">
+<INPUT TYPE="hidden" NAME="normalPlotTitle" VALUE="Grin2b: 1457003_at">
+<INPUT TYPE="hidden" NAME="trait_type" VALUE="ProbeSet">
+<INPUT TYPE="hidden" NAME="criteria1" VALUE="500">
+<INPUT TYPE="hidden" NAME="criteria2" VALUE="500">
+<INPUT TYPE="hidden" NAME="database1" VALUE="HC_M2_0606_P">
+<INPUT TYPE="hidden" NAME="database2" VALUE="HC_M2_0606_P">
+<INPUT TYPE="hidden" NAME="database3" VALUE="HC_M2_0606_P">
+<INPUT TYPE="hidden" NAME="num_perm3" VALUE="2000">
+<INPUT TYPE="hidden" NAME="symbol" VALUE="Grin2b">
+<INPUT TYPE="hidden" NAME="tissue_method" VALUE="5">
+<INPUT TYPE="hidden" NAME="GeneId" VALUE="14812">
+<INPUT TYPE="hidden" NAME="heritability" VALUE="None">
+<INPUT TYPE="hidden" NAME="Default_Name">
+
+</FORM>
+</TD></TR></TABLE></BLOCKQUOTE><BLOCKQUOTE>
+<MAP NAME="WebQTLImageMap">
+<AREA coords="120,80,135,100" href="javascript:changeView(0,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="219,80,235,100" href="javascript:changeView(1,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="308,80,323,100" href="javascript:changeView(2,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="391,80,406,100" href="javascript:changeView(3,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="472,80,487,100" href="javascript:changeView(4,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="552,80,567,100" href="javascript:changeView(5,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="632,80,647,100" href="javascript:changeView(6,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="707,80,721,100" href="javascript:changeView(7,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="775,80,790,100" href="javascript:changeView(8,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="835,80,866,100" href="javascript:changeView(9,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="903,80,933,100" href="javascript:changeView(10,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="968,80,999,100" href="javascript:changeView(11,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1033,80,1063,100" href="javascript:changeView(12,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1099,80,1129,100" href="javascript:changeView(13,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1160,80,1190,100" href="javascript:changeView(14,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1215,80,1245,100" href="javascript:changeView(15,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1268,80,1298,100" href="javascript:changeView(16,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1320,80,1349,100" href="javascript:changeView(17,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1362,80,1392,100" href="javascript:changeView(18,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="1431,80,1447,100" href="javascript:changeView(19,[197.19543200000001, 181.748087, 159.599783, 155.63012000000001, 152.53725900000001, 149.51703699999999, 152.524553, 131.73887099999999, 124.076172, 129.993255, 121.843856, 121.25753, 120.284312, 125.194864, 103.494974, 98.319149999999993, 95.272650999999996, 90.772030999999998, 61.34243, 166.650296]);" shape="rect"><AREA coords="80, 442, 175, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="80, 407, 175, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="182, 442, 270, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="182, 407, 270, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="277, 442, 354, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="277, 407, 354, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="360, 442, 436, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="360, 407, 436, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="442, 442, 516, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="442, 407, 516, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="523, 442, 595, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="523, 407, 595, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="602, 442, 675, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="602, 407, 675, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="682, 442, 745, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="682, 407, 745, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="752, 442, 812, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="752, 407, 812, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="819, 442, 881, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="819, 407, 881, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="888, 442, 946, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="888, 407, 946, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="953, 442, 1012, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="953, 407, 1012, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1018, 442, 1076, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1018, 407, 1076, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1083, 442, 1143, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1083, 407, 1143, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1150, 442, 1199, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1150, 407, 1199, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1206, 442, 1253, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1206, 407, 1253, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1260, 442, 1305, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1260, 407, 1305, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1312, 442, 1355, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1312, 407, 1355, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1362, 442, 1391, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1362, 407, 1391, 411" nohref shape="rect" title="Significant LRS = 17.45"><AREA coords="1398, 442, 1478, 446" nohref shape="rect" title="Suggestive LRS = 10.80"><AREA coords="1398, 407, 1478, 411" nohref shape="rect" title="Significant LRS = 17.45"></MAP>
+<IMG src="/image/Itvl_bnCx5c3U.png" alt="Itvl_bnCx5c3U.png" border="0" usemap="#WebQTLImageMap">
+<P>
+<P id="smallsize"><BR>A positive additive coefficient (<FONT color="green">green</FONT> line) indicates that DBA/2J alleles increase trait values. In contrast, a negative additive coefficient (<FONT color="red">red</FONT> line) indicates that C57BL/6J alleles increase trait values.</P>
+<P>
+<TABLE><TR><TD><IMG src="/image/Reg_9sObQtW0.gif" alt="Histogram of Permutation Test" border="0"></TD></TR><TR><TD></TD></TR><TR><TD>Total of 1000 permutations</TD></TR></TABLE>
+<P>
+<A HREF="/tmp/Reg_1MWrEXK7.txt" TARGET="_blank" class="fs12 fwn">Download Permutation Results</A></BLOCKQUOTE></TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ <!-- End of body -->
+
+</TABLE>
+
+<!-- menu script itself. you should not modify this file -->
+<script language="JavaScript" src="/javascript/menu_new.js"></script>
+<!-- items structure. menu hierarchy and links are stored there -->
+<script language="JavaScript" src="/javascript/menu_items.js"></script>
+<!-- files with geometry and styles structures -->
+<script language="JavaScript" src="/javascript/menu_tpl.js"></script>
+<script language="JavaScript">
+ <!--//
+ // Note where menu initialization block is located in HTML document.
+ // Don't try to position menu locating menu initialization block in
+ // some table cell or other HTML element. Always put it before </body>
+ // each menu gets two parameters (see demo files)
+ // 1. items structure
+ // 2. geometry structure
+ new menu (MENU_ITEMS, MENU_POS);
+ // make sure files containing definitions for these variables are linked to the document
+ // if you got some javascript error like "MENU_POS is not defined", then you've made syntax
+ // error in menu_tpl.js file or that file isn't linked properly.
+
+ // also take a look at stylesheets loaded in header in order to set styles
+ //-->
+</script>
+</BODY>
+</HTML> \ No newline at end of file
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index f29b907d..02365b1d 100755
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -15,10 +15,34 @@
<input type="hidden" name="uc_id" id="uc_id" value="{{ uc_id }}">
- <p>We searched <a href="/dbdoc/{{dataset.fullname}}">{{ dataset.fullname }}</a>
- to find all records that match
+ <!-- Need to customize text more for other types of searches -->
+ <p>We searched <a href="http://genenetwork.org/webqtl/main.py?FormID=sharinginfo&GN_AccessionId={{dataset.id}}">{{ dataset.fullname }}</a>
+ to find all records
{% for word in search_terms %}
- <strong>{{word.search_term[0]}}</strong> {% if not loop.last %} or {% endif %}
+ {% if word.key|lower == "rif" %}
+ with <u>GeneRIF</u> containing <strong>{{ word.search_term[0] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.key|lower == "go" %}
+ with <u>Gene Ontology ID</u> <strong>{{ word.search_term[0] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.key|lower == "wiki" %}
+ with <u>GeneWiki</u> containing <strong>{{ word.search_term[0] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.key|lower == "mean" %}
+ with <u>MEAN</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.key|lower == "lrs" or word.key|lower == "translrs" or word.key|lower == "cislrs" %}
+ {% if word.search_term|length == 1 %}
+ with {% if word.key|lower == "translrs" %}trans{% elif word.key|lower == "cislrs" %}cis{% endif %}LRS {% if word.separator == ">" %} greater than {% elif word.separator == "<" %} less than {% elif word.separator == ">=" %} greater than or equal to {% elif word.separator == "<=" %} less than or equal to {% endif %} <strong>{{ word.search_term[0] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.search_term|length == 2 %}
+ with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.search_term|length == 3 %}
+ with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong>{% if not loop.last %} and {% endif %}
+ {% elif word.search_term|length == 5 %}
+ with <u>LRS</u> between <strong>{{ word.search_term[0] }}</strong> and <strong>{{ word.search_term[1] }}</strong> on chromosome <strong>{{ word.search_term[2] }}</strong> between <strong>{{ word.search_term[3] }}</strong> and <strong>{{ word.search_term[4] }}</strong> Mb{% if not loop.last %} and {% endif %}
+ {% endif %}
+ {% elif word.key|lower == "position" %}
+ with <u>target genes</u> on chromosome <strong>{% if word.search_term[0].split('chr')|length > 1 %}{{ word.search_term[0].split('chr')[1] }}{% elif word.search_term[0].split('CHR')|length > 1 %}{{ word.search_term[0].split('CHR')[1] }}{% else %}{{ word.search_term[0] }}{% endif %}</strong> between <strong>{{ word.search_term[1] }}</strong> and <strong>{{ word.search_term[2] }}</strong> Mb{% if not loop.last %} and {% endif %}
+ {% else %}
+ with {{ word.key|lower }} matching {{ word.search_term[0] }}
+ {% endif %}
+ <!--<strong>{{word.search_term[0]}}</strong> {% if not loop.last %} or {% endif %}-->
{% endfor %}.
</p>
@@ -49,6 +73,8 @@
<input type="text" id="select_top" class="form-control" style="width: 200px; display: inline;" placeholder="Select Top ...">
<br />
<br />
+<!--
+ Removing this until more options are added and work correctly
{% if dataset.type == 'ProbeSet' %}
<button class="btn btn-default" id="open_options">Open Extra Options</button>
<br />
@@ -60,6 +86,8 @@
<br />
<br />
{% endif %}
+-->
+
<div id="table_container">
<table class="table table-hover table-striped" id='trait_table' {% if dataset.type == 'Geno' %}width="400px"{% endif %} style="float: left;">
<thead>
@@ -159,39 +187,6 @@
}
- function filtering( oSettings, aData, iDataIndex, column) {
- var iColumn = column;
- if (document.getElementById('min').value){
- var iMin = document.getElementById('min').value * 1;
- } else {
- var iMin = 0
- }
- if (document.getElementById('max').value){
- var iMax = document.getElementById('max').value * 1;
- } else {
- var iMax = 10000
- }
-
- var iVersion = aData[iColumn] == "-" ? 0 : aData[iColumn]*1;
- if ( iMin === "" && iMax === "" )
- {
- return true;
- }
- else if ( iMin === "" && iVersion < iMax )
- {
- return true;
- }
- else if ( iMin < iVersion && "" === iMax )
- {
- return true;
- }
- else if ( iMin < iVersion && iVersion < iMax )
- {
- return true;
- }
- return false;
- }
-
jQuery.fn.dataTableExt.oSort['cust-txt-asc'] = function (a, b) {
var x = getValue(a);
var y = getValue(b);
@@ -306,13 +301,6 @@
table.colReorder.reset()
});
- $('#min').keyup( function() { table.draw(); } );
- $('#max').keyup( function() { table.draw(); } );
-
- $('#open_options').click( function () {
- $('#extra_options').toggle();
- });
-
});
</script>
{% endblock %}
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html
index cdaa919e..16c5dc47 100755
--- a/wqflask/wqflask/templates/show_trait_details.html
+++ b/wqflask/wqflask/templates/show_trait_details.html
@@ -17,7 +17,7 @@
<dt>Database</dt>
<dd>
- <a href="{{ url_for('static', filename='/dbdoc/' + dataset.fullname + '.html') }}" target="_blank">
+ <a href="{{ url_for('static', filename='dbdoc/' + dataset.fullname + '.html') }}" target="_blank">
{{ dataset.name }}
</a>
</dd>
diff --git a/wqflask/wqflask/templates/show_trait_statistics_new.html b/wqflask/wqflask/templates/show_trait_statistics_new.html
index 1932d968..34fa2216 100755
--- a/wqflask/wqflask/templates/show_trait_statistics_new.html
+++ b/wqflask/wqflask/templates/show_trait_statistics_new.html
@@ -13,9 +13,11 @@
<li>
<a href="#probability_plot" data-toggle="tab">Probability Plot</a>
</li>
+ {% if g.user_session.user_ob %}
<li>
<a href="#scatterplot_matrix" data-toggle="tab">Scatterplot Matrix</a>
</li>
+ {% endif %}
<!--<li>
<a href="#box_plot_tab" data-toggle="tab">Box Plot</a>
</li>-->
@@ -127,6 +129,7 @@
<div id="box_plot"></div>
</div>
</div>-->
+ {% if g.user_session.user_ob %}
<div class="tab-pane" id="scatterplot_matrix">
<div style="margin-bottom:40px;" class="btn-group">
@@ -141,6 +144,7 @@
<div id="comparison_scatterplot" class="qtlcharts"></div>
</div>
</div>
+ {% endif %}
</div>
</div>
<!--</div>-->
diff --git a/wqflask/wqflask/templates/wgcna_setup.html b/wqflask/wqflask/templates/wgcna_setup.html
index 49181938..8ab8c4a0 100644
--- a/wqflask/wqflask/templates/wgcna_setup.html
+++ b/wqflask/wqflask/templates/wgcna_setup.html
@@ -2,27 +2,51 @@
{% block title %}WCGNA analysis{% endblock %}
{% block content %} <!-- Start of body -->
-<form action="/wgcna_results" method="post">
- <div class="container">
-
- <h1>WGCNA analysis parameters</h1>
- {% if request.form['trait_list'].split(",")|length <= 4 %}
-
- <h2 style="color: #ff0000;">ERROR: Too few phenotypes as input</h2>
- Please make sure you select enough phenotypes / genes to perform WGCNA,
- your collection needs to contain at least 4 different phenotypes. You provided {{request.form['trait_list'].split(',')|length}} phenotypes as input
+<h1> WGCNA analysis parameters</h1>
+<div class="container">
+ {% if request.form['trait_list'].split(",")|length <= 4 %}
+ <div class="alert alert-danger" role="alert">
+ <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
+ <span class="sr-only">Error:</span>
+ <h2>
+ Too few phenotypes as input
+ </h2>
+ Please make sure you select enough phenotypes / genes to perform WGCNA, your collection needs to contain at least 4 different phenotypes. You provided {{request.form['trait_list'].split(',')|length}} phenotypes as input
+ </div>
{% else %}
- <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
- <table>
- <tr><td>Soft threshold:</td><td><input type="text" class="form-inline" name="SoftThresholds" id="SoftThresholds" value="1,2,3,4,5,6,7,8,9"></td></tr>
- <tr><td>Minimum module size:</td><td><input type="text" class="form-inline" name="MinModuleSize" id="MinModuleSize" value="30"></td></tr>
- <tr><td>TOMtype:</td><td><input type="text" class="form-inline" name="TOMtype" id="TOMtype" value="unsigned"></td></tr>
- <tr><td>mergeCutHeight:</td><td><input type="text" class="form-inline" name="mergeCutHeight" id="mergeCutHeight" value="0.25"></td></tr>
- </table>
- <input type="submit" class="btn btn-primary" value="Run WGCNA using these settings" />
- {% endif %}
- </div>
-</form>
+ <form action="/wgcna_results" method="post" class="form-horizontal">
+ <input type="hidden" name="trait_list" id="trait_list" value= "{{request.form['trait_list']}}">
+ <div class="form-group">
+ <label for="SoftThresholds"> Soft threshold: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="SoftThresholds" id="SoftThresholds" value="1,2,3,4,5,6,7,8,9">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="MinModuleSize"> Minimum module size: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="MinModuleSize" id="MinModuleSize" value="30">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="TOMtype"> TOMtype: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="TOMtype" id="TOMtype" value="unsigned">
+ </div>
+ </div>
+ <div class="form-group">
+ <label for="mergeCutHeight"> mergeCutHeight: </label>
+ <div class="col-sm-10">
+ <input type="text" class="form-inline" name="mergeCutHeight" id="mergeCutHeight" value="0.25">
+ </div>
+ </div>
+ <div class="form-group">
+ <div class="col-sm-10">
+ <input type="submit" class="btn btn-primary" value="Run WGCNA using these settings" />
+ </div>
+ </div>
+ </form>
+ {% endif %}
+</div>
{% endblock %}
-
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index dc199ab2..c17d6274 100755
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -42,6 +42,7 @@ from wqflask.show_trait import show_trait
from wqflask.show_trait import export_trait_data
from wqflask.heatmap import heatmap
from wqflask.marker_regression import marker_regression
+from wqflask.marker_regression import marker_regression_gn1
from wqflask.interval_mapping import interval_mapping
from wqflask.correlation import show_corr_results
from wqflask.correlation_matrix import show_corr_matrix
@@ -132,7 +133,7 @@ def search_page():
else:
return render_template("data_sharing.html", **template_vars.__dict__)
else:
- key = "search_results:v2:" + json.dumps(request.args, sort_keys=True)
+ key = "search_results:v1:" + json.dumps(request.args, sort_keys=True)
print("key is:", pf(key))
with Bench("Loading cache"):
result = Redis.get(key)
@@ -334,6 +335,8 @@ def marker_regression_page():
'trait_id',
'dataset',
'method',
+ 'mapping_scale',
+ 'score_type',
'suggestive',
'num_perm',
'maf',
@@ -355,7 +358,8 @@ def marker_regression_page():
key = "marker_regression:{}:".format(version) + json.dumps(start_vars, sort_keys=True)
print("key is:", pf(key))
with Bench("Loading cache"):
- result = Redis.get(key)
+ result = None # Just for testing
+ #result = Redis.get(key)
#print("************************ Starting result *****************")
#print("result is [{}]: {}".format(type(result), result))
@@ -374,14 +378,19 @@ def marker_regression_page():
indent=" ")
result = template_vars.__dict__
+ #print("initial result:", result['qtl_results'])
- print("DATASET:", pf(result['dataset']))
-
- for item in template_vars.__dict__.keys():
- print(" ---**--- {}: {}".format(type(template_vars.__dict__[item]), item))
+ #for item in template_vars.__dict__.keys():
+ # print(" ---**--- {}: {}".format(type(template_vars.__dict__[item]), item))
#causeerror
+ print("TESTING GN1!!!")
+ gn1_template_vars = marker_regression_gn1.MarkerRegression(result).__dict__
+ print("gn1_template_vars:", gn1_template_vars)
+ causeerror
+
+
#qtl_length = len(result['js_data']['qtl_results'])
#print("qtl_length:", qtl_length)
pickled_result = pickle.dumps(result, pickle.HIGHEST_PROTOCOL)
@@ -403,6 +412,7 @@ def marker_regression_page():
rendered_template = render_template("pair_scan_results.html", **result)
else:
rendered_template = render_template("marker_regression.html", **result)
+ #rendered_template = render_template("marker_regression_gn1.html", **result)
return rendered_template