From c05650476b4e925c2bf6e7369ab8d321ce83ad48 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Wed, 3 Jul 2019 22:10:03 -0500
Subject: Fixed bug for creating one of the third party links on the trait page
Changed text in several pages (submit trait, mapping error)
Changed header menu structure some
---
wqflask/base/webqtlConfig.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'wqflask/base')
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index a08acb0a..b9e6abd8 100644
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -53,7 +53,7 @@ ABA_URL = "http://mouse.brain-map.org/search/show?search_type=gene&search_term=%
EBIGWAS_URL = "https://www.ebi.ac.uk/gwas/search?query=%s"
WIKI_PI_URL = "http://severus.dbmi.pitt.edu/wiki-pi/index.php/search?q=%s"
ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Transcript/Idhistory?t=%s"
-DBSNP = 'http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s'
+DBSNP = 'http://ensembl.org/Mus_musculus/Variation/Population?v=%s'
# Temporary storage (note that this TMPDIR can be set as an
# environment variable - use utility.tools.TEMPDIR when you
--
cgit 1.4.1
From 4ef78a90b4b232300a7806afdc5503fcf6fc7c4b Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 18 Jul 2019 17:58:33 -0500
Subject: Made change that should fix encoding issue, fingers crossed
---
wqflask/base/trait.py | 6 ++++--
wqflask/wqflask/database.py | 2 +-
wqflask/wqflask/search_results.py | 2 +-
wqflask/wqflask/views.py | 2 +-
4 files changed, 7 insertions(+), 5 deletions(-)
(limited to 'wqflask/base')
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 6fecf725..0527449b 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -396,8 +396,10 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False):
#XZ: assign SQL query result to trait attributes.
for i, field in enumerate(dataset.display_fields):
holder = trait_info[i]
- if isinstance(trait_info[i], basestring):
- holder = unicode(trait_info[i], "utf-8", "ignore")
+ # if isinstance(trait_info[i], basestring):
+ # logger.debug("HOLDER:", holder)
+ # logger.debug("HOLDER2:", holder.decode(encoding='latin1'))
+ # holder = unicode(trait_info[i], "utf-8", "ignore")
setattr(trait, field, holder)
if dataset.type == 'Publish':
diff --git a/wqflask/wqflask/database.py b/wqflask/wqflask/database.py
index 96c2c301..adeed6ad 100644
--- a/wqflask/wqflask/database.py
+++ b/wqflask/wqflask/database.py
@@ -9,7 +9,7 @@ import utility.logger
logger = utility.logger.getLogger(__name__ )
-engine = create_engine(SQL_URI, convert_unicode=True)
+engine = create_engine(SQL_URI, encoding="latin1")
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py
index 2ce76c37..444e1f40 100644
--- a/wqflask/wqflask/search_results.py
+++ b/wqflask/wqflask/search_results.py
@@ -125,7 +125,7 @@ views.py).
elif this_trait.dataset.type == "Geno":
trait_dict['location'] = this_trait.location_repr
elif this_trait.dataset.type == "Publish":
- trait_dict['description'] = this_trait.description_display.decode('utf-8', 'replace')
+ trait_dict['description'] = this_trait.description_display
trait_dict['authors'] = this_trait.authors
trait_dict['pubmed_id'] = "N/A"
if this_trait.pubmed_id:
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index 109e30cc..2ff6d4d7 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -80,7 +80,7 @@ def connect_db():
db = getattr(g, '_database', None)
if db is None:
logger.debug("Get new database connector")
- g.db = g._database = sqlalchemy.create_engine(SQL_URI)
+ g.db = g._database = sqlalchemy.create_engine(SQL_URI, encoding="latin1")
logger.debug(g.db)
@app.teardown_appcontext
--
cgit 1.4.1
From 5f5adb62bf13ace887c03522b0b8e83181cd6503 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Tue, 23 Jul 2019 11:24:56 -0500
Subject: Added change to automatically update datasets list using rest api
instead of json file
Removed option to edit certain html pages, like news, policies, etc
---
etc/default_settings.py | 1 +
wqflask/base/data_set.py | 4 +-
wqflask/utility/tools.py | 4 ++
.../marker_regression/display_mapping_results.py | 1 -
wqflask/wqflask/marker_regression/run_mapping.py | 17 +++++++-
.../new/javascript/dataset_menu_structure.json | 51 ++++++++++++----------
wqflask/wqflask/templates/docs.html | 4 +-
7 files changed, 53 insertions(+), 29 deletions(-)
(limited to 'wqflask/base')
diff --git a/etc/default_settings.py b/etc/default_settings.py
index a1fe81e5..a16ac3ad 100644
--- a/etc/default_settings.py
+++ b/etc/default_settings.py
@@ -91,4 +91,5 @@ JS_GN_PATH = os.environ['HOME']+"/genenetwork/javascript"
# ---- GN2 Executables (overwrite for testing only)
# PLINK_COMMAND = str.strip(os.popen("which plink2").read())
# GEMMA_COMMAND = str.strip(os.popen("which gemma").read())
+REAPER_COMMAND = HOME + "/gn2-zach/rust-qtlreaper/target/release/qtlreaper"
# GEMMA_WRAPPER_COMMAND = str.strip(os.popen("which gemma-wrapper").read())
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index d766e284..41de8492 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -46,6 +46,8 @@ from utility import chunks
from utility import gen_geno_ob
from utility.tools import locate, locate_ignore_error, flat_files
+from wqflask.api import gen_menu
+
from maintenance import get_group_samplelists
from MySQLdb import escape_string as escape
@@ -92,7 +94,7 @@ Publish or ProbeSet. E.g.
"""
self.datasets = {}
if USE_GN_SERVER:
- data = menu_main()
+ data = gen_menu.gen_dropdown_json()
else:
file_name = "wqflask/static/new/javascript/dataset_menu_structure.json"
with open(file_name, 'r') as fh:
diff --git a/wqflask/utility/tools.py b/wqflask/utility/tools.py
index 8b2260f5..31ab2046 100644
--- a/wqflask/utility/tools.py
+++ b/wqflask/utility/tools.py
@@ -107,6 +107,9 @@ def js_path(module=None):
return try_guix
raise "No JS path found for "+module+" (if not in Guix check JS_GN_PATH)"
+def reaper_command(guess=None):
+ return get_setting("REAPER_COMMAND",guess)
+
def gemma_command(guess=None):
return assert_bin(get_setting("GEMMA_COMMAND",guess))
@@ -274,6 +277,7 @@ SMTP_CONNECT = get_setting('SMTP_CONNECT')
SMTP_USERNAME = get_setting('SMTP_USERNAME')
SMTP_PASSWORD = get_setting('SMTP_PASSWORD')
+REAPER_COMMAND = app_set("REAPER_COMMAND",reaper_command())
GEMMA_COMMAND = app_set("GEMMA_COMMAND",gemma_command())
assert(GEMMA_COMMAND is not None)
PLINK_COMMAND = app_set("PLINK_COMMAND",plink_command())
diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py
index 3bcd613f..d9601405 100644
--- a/wqflask/wqflask/marker_regression/display_mapping_results.py
+++ b/wqflask/wqflask/marker_regression/display_mapping_results.py
@@ -1790,7 +1790,6 @@ class DisplayMappingResults(object):
m = 0
thisLRSColor = self.colorCollection[0]
if qtlresult['chr'] != previous_chr and self.selectedChr == -1:
-
if self.manhattan_plot != True:
canvas.drawPolygon(LRSCoordXY,edgeColor=thisLRSColor,closed=0, edgeWidth=lrsEdgeWidth, clipX=(xLeftOffset, xLeftOffset + plotWidth))
diff --git a/wqflask/wqflask/marker_regression/run_mapping.py b/wqflask/wqflask/marker_regression/run_mapping.py
index 2bde2b53..6e9fe85c 100644
--- a/wqflask/wqflask/marker_regression/run_mapping.py
+++ b/wqflask/wqflask/marker_regression/run_mapping.py
@@ -36,7 +36,7 @@ from utility import helper_functions
from utility import Plot, Bunch
from utility import temp_data
from utility.benchmark import Bench
-from wqflask.marker_regression import gemma_mapping, rqtl_mapping, qtlreaper_mapping, plink_mapping
+from wqflask.marker_regression import gemma_mapping, rqtl_mapping, qtlreaper_mapping, plink_mapping, rust_reaper_mapping
from utility.tools import locate, locate_ignore_error, GEMMA_COMMAND, PLINK_COMMAND, TEMPDIR
from utility.external import shell
@@ -242,7 +242,8 @@ class RunMapping(object):
self.control_marker = start_vars['control_marker']
self.do_control = start_vars['do_control']
logger.info("Running qtlreaper")
- results, self.json_data, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = qtlreaper_mapping.gen_reaper_results(self.this_trait,
+
+ results, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = rust_reaper_mapping.run_reaper(self.this_trait,
self.dataset,
self.samples,
self.vals,
@@ -253,6 +254,18 @@ class RunMapping(object):
self.do_control,
self.control_marker,
self.manhattan_plot)
+
+ # results, self.json_data, self.perm_output, self.suggestive, self.significant, self.bootstrap_results = qtlreaper_mapping.gen_reaper_results(self.this_trait,
+ # self.dataset,
+ # self.samples,
+ # self.vals,
+ # self.json_data,
+ # self.num_perm,
+ # self.bootCheck,
+ # self.num_bootstrap,
+ # self.do_control,
+ # self.control_marker,
+ # self.manhattan_plot)
elif self.mapping_method == "plink":
self.score_type = "-log(p)"
self.manhattan_plot = True
diff --git a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
index 0d73213d..6531f5a0 100644
--- a/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
+++ b/wqflask/wqflask/static/new/javascript/dataset_menu_structure.json
@@ -1440,7 +1440,7 @@
[
"None",
"HSBPublish",
- "HSB Phenotypes"
+ "HSB Published Phenotypes"
]
],
"Posterior Inferior Parietal Cortex mRNA": [
@@ -1721,7 +1721,7 @@
[
"None",
"B6D2Publish",
- "B6D2 Phenotypes"
+ "UTHSC-Glaucoma-Aged-Retina Phenotypes"
]
]
},
@@ -2247,6 +2247,11 @@
"Eye_M2_0908_R_ND",
"Eye M430v2 WT Gpnmb (Sep08) RMA"
],
+ [
+ "382",
+ "Eye_M2_0908_WTWT",
+ "Eye M430v2 WT WT (Sep08) RMA"
+ ],
[
"279",
"Eye_M2_0908_R_WT",
@@ -2257,11 +2262,6 @@
"Eye_M2_0908_R_MT",
"Eye M430v2 Mutant Tyrp1 (Sep08) RMA"
],
- [
- "382",
- "Eye_M2_0908_WTWT",
- "Eye M430v2 WT WT (Sep08) RMA"
- ],
[
"400",
"DBA2J-ONH-1212",
@@ -2500,6 +2500,11 @@
"245",
"UT_ILM_BXD_hipp_RSE_0909",
"UTHSC Hippocampus Illumina v6.1 RSE (Sep09) RankInv"
+ ],
+ [
+ "711",
+ "UTHSC_BXD_AgeHipp0515",
+ "UTHSC BXD Aged Hippocampus Affy MoGene1.0 ST (May15) RMA Gene Level"
]
],
"Hypothalamus mRNA": [
@@ -3028,16 +3033,6 @@
]
],
"Striatum mRNA": [
- [
- "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"
- ],
[
"399",
"Striatum_Exon_1212",
@@ -3048,6 +3043,16 @@
"Striatum_Exon_0209",
"HQF Striatum Affy Mouse Exon 1.0ST Exon Level (Dec09) RMA"
],
+ [
+ "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"
+ ],
[
"285",
"UTHSC_Striatum_RankInv_1210",
@@ -3554,6 +3559,11 @@
]
],
"Hippocampus mRNA": [
+ [
+ "211",
+ "Illum_LXS_Hipp_RSS_1008",
+ "Hippocampus Illumina RSS (Oct08) RankInv beta"
+ ],
[
"213",
"Illum_LXS_Hipp_NOS_1008",
@@ -3574,11 +3584,6 @@
"Illum_LXS_Hipp_NOE_1008",
"Hippocampus Illumina NOE (Oct08) RankInv beta"
],
- [
- "211",
- "Illum_LXS_Hipp_RSS_1008",
- "Hippocampus Illumina RSS (Oct08) RankInv beta"
- ],
[
"143",
"Illum_LXS_Hipp_loess0807",
@@ -3835,7 +3840,7 @@
[
"None",
"HSNIH-RGSMCPublish",
- "HSNIH-RGSMC Phenotypes"
+ "HSNIH Published Phenotypes"
]
]
},
diff --git a/wqflask/wqflask/templates/docs.html b/wqflask/wqflask/templates/docs.html
index c485f757..1a241ce7 100644
--- a/wqflask/wqflask/templates/docs.html
+++ b/wqflask/wqflask/templates/docs.html
@@ -6,9 +6,9 @@
{{title}}
{{content|safe}}
--
cgit 1.4.1
From 823169d970d8b64e955f7316e6df87c5204b4864 Mon Sep 17 00:00:00 2001
From: zsloan
Date: Thu, 1 Aug 2019 12:08:33 -0500
Subject: Made some more aesthetic changes to various pages and charts/figures
Added some information to the mapping loading page
---
wqflask/base/trait.py | 17 +++--
wqflask/wqflask/show_trait/show_trait.py | 83 ++++++++++++----------
.../new/javascript/plotly_probability_plot.js | 19 ++---
.../wqflask/static/new/javascript/show_trait.js | 73 +++++++++++--------
.../new/javascript/show_trait_mapping_tools.js | 2 +-
wqflask/wqflask/templates/base.html | 2 +-
wqflask/wqflask/templates/correlation_matrix.html | 2 +-
wqflask/wqflask/templates/index_page_orig.html | 8 +--
wqflask/wqflask/templates/loading.html | 20 +++++-
.../wqflask/templates/new_security/login_user.html | 83 ++++++++++------------
wqflask/wqflask/templates/search_result_page.html | 11 +--
wqflask/wqflask/views.py | 10 +++
12 files changed, 194 insertions(+), 136 deletions(-)
(limited to 'wqflask/base')
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 0527449b..39dd075e 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -3,6 +3,7 @@ from __future__ import absolute_import, division, print_function
import string
import resource
import codecs
+import requests
import redis
Redis = redis.StrictRedis()
@@ -120,11 +121,17 @@ class GeneralTrait(object):
@property
def alias_fmt(self):
'''Return a text formatted alias'''
- if self.alias:
- alias = string.replace(self.alias, ";", " ")
- alias = string.join(string.split(alias), ", ")
- else:
- alias = 'Not available'
+
+ alias = 'Not available'
+ if self.symbol:
+ response = requests.get("http://gn2.genenetwork.org/gn3/gene/aliases/" + self.symbol)
+ alias_list = json.loads(response.content)
+ alias = "; ".join(alias_list)
+
+ if alias == 'Not available':
+ if self.alias:
+ alias = string.replace(self.alias, ";", " ")
+ alias = string.join(string.split(alias), ", ")
return alias
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 1dd80962..f1f5840f 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -142,40 +142,6 @@ class ShowTrait(object):
self.qnorm_vals = quantile_normalize_vals(self.sample_groups)
self.z_scores = get_z_scores(self.sample_groups)
- # Todo: Add back in the ones we actually need from below, as we discover we need them
- hddn = OrderedDict()
-
- if self.dataset.group.allsamples:
- hddn['allsamples'] = string.join(self.dataset.group.allsamples, ' ')
-
- hddn['trait_id'] = self.trait_id
- hddn['dataset'] = self.dataset.name
- hddn['temp_trait'] = False
- if self.temp_trait:
- hddn['temp_trait'] = True
- hddn['group'] = self.temp_group
- hddn['species'] = self.temp_species
- hddn['use_outliers'] = False
- hddn['method'] = "gemma"
- hddn['selected_chr'] = -1
- hddn['mapping_display_all'] = True
- hddn['suggestive'] = 0
- hddn['num_perm'] = 0
- hddn['manhattan_plot'] = ""
- hddn['control_marker'] = ""
- if not self.temp_trait:
- if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish":
- hddn['control_marker'] = self.nearest_marker
- #hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2
- hddn['do_control'] = False
- hddn['maf'] = 0.05
- hddn['compare_traits'] = []
- hddn['export_data'] = ""
- hddn['export_format'] = "excel"
-
- # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self
- self.hddn = hddn
-
self.temp_uuid = uuid.uuid4()
self.sample_group_types = OrderedDict()
@@ -216,18 +182,61 @@ class ShowTrait(object):
sample_column_width = max_samplename_width * 8
- if self.num_values >= 500:
+ if self.num_values >= 5000:
self.maf = 0.01
else:
self.maf = 0.05
trait_symbol = None
+ short_description = None
if not self.temp_trait:
if self.this_trait.symbol:
trait_symbol = self.this_trait.symbol
+ short_description = trait_symbol
+
+ elif self.this_trait.post_publication_abbreviation:
+ short_description = self.this_trait.post_publication_abbreviation
+
+ elif self.this_trait.pre_publication_abbreviation:
+ short_description = self.this_trait.pre_publication_abbreviation
+
+ # Todo: Add back in the ones we actually need from below, as we discover we need them
+ hddn = OrderedDict()
+
+ if self.dataset.group.allsamples:
+ hddn['allsamples'] = string.join(self.dataset.group.allsamples, ' ')
+ hddn['primary_samples'] = string.join(self.primary_sample_names, ',')
+ hddn['trait_id'] = self.trait_id
+ hddn['dataset'] = self.dataset.name
+ hddn['temp_trait'] = False
+ if self.temp_trait:
+ hddn['temp_trait'] = True
+ hddn['group'] = self.temp_group
+ hddn['species'] = self.temp_species
+ hddn['use_outliers'] = False
+ hddn['method'] = "gemma"
+ hddn['selected_chr'] = -1
+ hddn['mapping_display_all'] = True
+ hddn['suggestive'] = 0
+ hddn['num_perm'] = 0
+ hddn['manhattan_plot'] = ""
+ hddn['control_marker'] = ""
+ if not self.temp_trait:
+ if hasattr(self.this_trait, 'locus_chr') and self.this_trait.locus_chr != "" and self.dataset.type != "Geno" and self.dataset.type != "Publish":
+ hddn['control_marker'] = self.nearest_marker
+ #hddn['control_marker'] = self.nearest_marker1+","+self.nearest_marker2
+ hddn['do_control'] = False
+ hddn['maf'] = 0.05
+ hddn['compare_traits'] = []
+ hddn['export_data'] = ""
+ hddn['export_format'] = "excel"
+
+ # We'll need access to this_trait and hddn in the Jinja2 Template, so we put it inside self
+ self.hddn = hddn
js_data = dict(trait_id = self.trait_id,
trait_symbol = trait_symbol,
+ short_description = short_description,
unit_type = trait_units,
dataset_type = self.dataset.type,
data_scale = self.dataset.data_scale,
@@ -396,6 +405,8 @@ class ShowTrait(object):
sample_group_type='primary',
header="%s Only" % (self.dataset.group.name))
self.sample_groups = (primary_samples,)
+
+ self.primary_sample_names = primary_sample_names
self.dataset.group.allsamples = all_samples_ordered
def quantile_normalize_vals(sample_groups):
@@ -493,7 +504,7 @@ def get_genofiles(this_dataset):
return jsondata['genofile']
def get_table_widths(sample_groups, has_num_cases=False):
- stats_table_width = 200
+ stats_table_width = 250
if len(sample_groups) > 1:
stats_table_width = 450
diff --git a/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js b/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js
index a9c5676c..cc4195e4 100644
--- a/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js
+++ b/wqflask/wqflask/static/new/javascript/plotly_probability_plot.js
@@ -171,22 +171,23 @@
}
var layout = {
- title: js_data.trait_id,
+ title: "Trait " + js_data.trait_id + ": " + js_data.short_description + "",
margin: {
- l: 65,
+ l: 100,
r: 30,
t: 80,
- b: 80
+ b: 60
},
xaxis: {
- title: "Normal Theoretical Quantiles",
+ title: "Normal Theoretical Quantiles",
range: [first_x, last_x],
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
@@ -194,19 +195,21 @@
}
},
yaxis: {
- title: "Data Quantiles",
+ title: "Data Quantiles",
zeroline: false,
visible: true,
linecolor: 'black',
linewidth: 1,
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
size: 16
},
- tickformat: tick_digits
+ tickformat: tick_digits,
+ automargin: true
},
hovermode: "closest"
}
diff --git a/wqflask/wqflask/static/new/javascript/show_trait.js b/wqflask/wqflask/static/new/javascript/show_trait.js
index 8366ec0a..48b6da5e 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait.js
@@ -30,11 +30,11 @@ Stat_Table_Rows = [
}, {
vn: "min",
pretty: "Minimum",
- digits: 2
+ digits: 3
}, {
vn: "max",
pretty: "Maximum",
- digits: 2
+ digits: 3
}
]
@@ -67,7 +67,7 @@ Stat_Table_Rows.push(
digits: 3
}, {
vn: "interquartile",
- pretty: "Interquartile Range",
+ pretty: "Interquartile Range",
url: "http://www.genenetwork.org/glossary.html#Interquartile",
digits: 3
}, {
@@ -334,9 +334,9 @@ update_prob_plot = function() {
make_table = function() {
var header, key, row, row_line, table, the_id, the_rows, value, _i, _len, _ref, _ref1;
if (js_data.trait_symbol != null) {
- header = "| Trait: " + js_data.trait_id + " - " + js_data.trait_symbol + " |
|---|
| Statistic | ";
+ header = "| Trait " + js_data.trait_id + " - " + js_data.trait_symbol + " |
|---|
| Statistic | ";
} else {
- header = "| Trait: " + js_data.trait_id + " |
|---|
| Statistic | ";
+ header = "| Trait " + js_data.trait_id + " |
|---|
| Statistic | ";
}
_ref = js_data.sample_group_types;
for (key in _ref) {
@@ -990,12 +990,13 @@ var hist_trace = {
root.histogram_data = [hist_trace];
root.histogram_layout = {
bargap: 0.05,
- title: js_data.trait_id,
+ title: "Trait " + js_data.trait_id + ": " + js_data.short_description + "",
xaxis: {
autorange: true,
- title: "Value",
+ title: "Value",
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
ticklen: 4,
tickfont: {
@@ -1004,23 +1005,25 @@ root.histogram_layout = {
},
yaxis: {
autorange: true,
- title: "Count",
+ title: "Count",
titlefont: {
- size: 16
+ family: "arial",
+ size: 20
},
showline: true,
ticklen: 4,
tickfont: {
size: 16
- }
+ },
+ automargin: true
},
width: 500,
height: 600,
margin: {
- l: 50,
+ l: 70,
r: 30,
t: 100,
- b: 60
+ b: 50
}
};
@@ -1036,25 +1039,34 @@ $('.histogram_samples_group').change(function() {
});
root.box_layout = {
- title: js_data.trait_id,
xaxis: {
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
tickfont: {
size: 16
},
},
yaxis: {
- title: js_data.unit_type,
+ title: "" + js_data.unit_type +"",
autorange: true,
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
ticklen: 4,
tickfont: {
size: 16
},
- tickformat: tick_digits
+ tickformat: tick_digits,
+ zeroline: false,
+ automargin: true
},
margin: {
- l: 50,
+ l: 90,
r: 30,
t: 30,
b: 80
@@ -1122,7 +1134,7 @@ if (full_sample_lists.length > 1) {
{
type: 'box',
y: get_sample_vals(full_sample_lists[0]),
- name: sample_group_list[0],
+ name: "Trait " + js_data.trait_id + "",
boxpoints: 'Outliers',
jitter: 0.5,
whiskerwidth: 0.2,
@@ -1150,28 +1162,36 @@ $('.box_plot_tab').click(function() {
// Violin Plot
root.violin_layout = {
- title: js_data.trait_id,
xaxis: {
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
tickfont: {
size: 16
}
},
yaxis: {
- title: js_data.unit_type,
+ title: ""+js_data.unit_type+"",
autorange: true,
showline: true,
+ titlefont: {
+ family: "arial",
+ size: 20
+ },
ticklen: 4,
tickfont: {
size: 16
},
tickformat: tick_digits,
- zeroline: false
+ zeroline: false,
+ automargin: true
},
margin: {
- l: 50,
+ l: 90,
r: 30,
- t: 80,
+ t: 30,
b: 80
}
};
@@ -1239,14 +1259,11 @@ if (full_sample_lists.length > 1) {
box: {
visible: true
},
- line: {
- color: 'green',
- },
meanline: {
visible: true
},
- name: sample_group_list[0],
- x0: sample_group_list[0]
+ name: "Trait " + js_data.trait_id + "",
+ x0: "Trait " + js_data.trait_id + ""
}
]
}
diff --git a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
index 8001dfc9..8db9522c 100644
--- a/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
+++ b/wqflask/wqflask/static/new/javascript/show_trait_mapping_tools.js
@@ -156,7 +156,7 @@
'score_type', 'suggestive', 'significant', 'num_perm', 'permCheck', 'perm_output', 'num_bootstrap', 'bootCheck', 'bootstrap_results',
'LRSCheck', 'covariates', 'maf', 'use_loco', 'manhattan_plot', 'control_marker', 'control_marker_db', 'do_control', 'genofile',
'pair_scan', 'startMb', 'endMb', 'graphWidth', 'lrsMax', 'additiveCheck', 'showSNP', 'showGenes', 'viewLegend', 'haplotypeAnalystCheck',
- 'mapmethod_rqtl_geno', 'mapmodel_rqtl_geno', 'temp_trait', 'group', 'species', 'reaper_version']
+ 'mapmethod_rqtl_geno', 'mapmodel_rqtl_geno', 'temp_trait', 'group', 'species', 'reaper_version', 'primary_samples']
$("#rqtl_geno_compute").on("click", (function(_this) {
return function() {
diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html
index 80bbd7f5..2366bdec 100644
--- a/wqflask/wqflask/templates/base.html
+++ b/wqflask/wqflask/templates/base.html
@@ -94,7 +94,7 @@
|---|
|---|
|---|
|---|