Commit abb6950d authored by Nijveen, Harm's avatar Nijveen, Harm
Browse files

updated the tooltips to show more information

parent 253ff6cc
......@@ -336,7 +336,7 @@
//marker tooltip//////////////////////
martip = d3.tip().attr("class", "d3-tip")
.offset([-10, 0])
.html(function(d) {return d;})
.html(function(d) {return "Marker: " + d[0] + "<br>LOD score: " + onedig(d[1]);})
//end/////////////////////////////////
cur = 0;
......@@ -471,7 +471,7 @@
if (!markerClick[td]) {
d3.select(this).attr("opacity", 1);
}
return martip.show(td);
return martip.show([td, probe_data.lod[data.pmark[td].index]]);
}).on("mouseout", function(td) {
d3.select(this).attr("opacity", markerClick[td]);
return martip.hide();
......
......@@ -111,7 +111,7 @@ def selectMarker(request):
dist = abs(long(g.start) - marker.start)/1000000
if g.chr == marker.chromosome.name and dist < min_dist:
continue
genelist.append(g)
genelist.append(g)
return render_to_response('peakmarker.html', {'experiment_name': exp_name,
'experiments': experiments,
......
......@@ -48,6 +48,7 @@
<li><a href="/AraQTL/?mode=about">About</a></li>
<li><a href="/AraQTL/?mode=manual">Manual</a></li>
<li><a href="/AraQTL/?mode=FAQ">FAQ</a></li>
<li><a href="/AraQTL/?mode=methods">Methods</a></li>
</ul>
</li>
</ul>
......
......@@ -7,5 +7,11 @@
<li><i>Does AraQTL work in all browsers?</i><br>
In principle it should work on all browsers that support Javascript. We do recommend using Firefox, since AraQTL was extensively tested with that browser.
</li>
<li><i>What are the error and interval size of the eQTLs?</i><br>
The maps are linked by the physical position of the markers.
The exact marker positions can be downloaded from the website.
If the confidence intervals (for instance of 2-LOD) of two eQTLs overlap it is likely the same eQTL,
especially in the case of cis-eQTLs.
</li>
</ul>
</div>
......@@ -34,6 +34,7 @@
<li><a href="/AraQTL/?mode=about">About</a></li>
<li><a href="/AraQTL/?mode=manual">Manual</a></li>
<li><a href="/AraQTL/?mode=FAQ">FAQ</a></li>
<li><a href="/AraQTL/?mode=methods">Methods</a></li>
</ul>
</li>
<li><a id="examples_menu" href="#">Examples</a></li>
......@@ -68,6 +69,8 @@
{% include "manual.html" %}
{% elif mode == "FAQ" %}
{% include "FAQ.html" %}
{% elif mode == "methods" %}
{% include "methods.html" %}
{% else %}
<form method="get" id="queryform"
{% if mode == 'correlation' %}
......@@ -136,6 +139,12 @@
title="right click to save as..."
>
LOD&nbsp;scores
</a><br>
<a href="/AraQTL/media/data/{{ experiment.experiment_name }}/marker.txt"
target="_blank"
title="right click to save as..."
>
Markers
</a>
</td>
</tr>
......
<div id="methods_text">
<div class="paragraph">
<h1>Methods</h1>
eQTL profiles mapped in the original papers are used for visualization and investigation, except for those found in Lowry et al. 2013 which were re-mapped from the original genotypes and gene expression data by a single marker model using a linear model in R.
</div>
<div class="paragraph">
<h3>Correlation</h3>
All pairwise correlations between eQTL patterns were calculated using the Pearson correlation coefficients between the eQTL patterns of genes within an experiment using the R function ‘cor’, on the LOD scores.
</div>
<div class="paragraph">
<h3>Mapping</h3>
The markers are mapped according to the original publications. The physical positions of the markers were used to compare and integrate the genetic maps of the different populations and can be obtained from the AraQTL homepage.
</div>
<div class="paragraph">
<h3>LOD score threshold</h3>
The LOD score thresholds are taken from the corresponding papers. Original determined genome-wide threshold levels may be applied to call significant eQTLs. The thresholds for comparing eQTLs will vary depending on the number of genes, eQTLs and populations involved.
</div>
<div class="paragraph">
<h3>Software</h3>
AraQTL was implemented in the Python Django web framework using a MySQL database backend. The web pages include Javascript, using JQuery, and the d3 and bootstrip libraries. The cis/trans plot and QTL profile plots built upon work by Karl Broman <a href="http://www.genetics.org/content/199/2/359.long">(Broman, 2015)</a>.
</div>
</div>
......@@ -60,6 +60,7 @@
<li><a href="/AraQTL/?mode=about">About</a></li>
<li><a href="/AraQTL/?mode=manual">Manual</a></li>
<li><a href="/AraQTL/?mode=FAQ">FAQ</a></li>
<li><a href="/AraQTL/?mode=methods">Methods</a></li>
</ul>
</li>
</ul>
......@@ -101,6 +102,12 @@ genes.push({ "gene": "{{ gene.gene_id }}",
"show": show,
"experiment" : "{{ experiment_name }}"});
{% endfor %}
{% if gene_info_list|length == 1 %}
var dot = {};
dot["label"] = "{{ gene_info_list.0.gene_id }}";
dot["chr"] = {{ gene_info_list.0.chr }};
dot["pos"] = {{ gene_info_list.0.start }};
{% endif %}
{% endif %}
</script>
......@@ -123,7 +130,9 @@ genes.push({ "gene": "{{ gene.gene_id }}",
ID
</td>
<td>
{{ gene.gene_id }}
<a href="https://www.arabidopsis.org/servlets/TairObject?type=locus&name={{ gene.gene_id }}">
{{ gene.gene_id }}
</a>
</td>
</tr>
<tr>
......
......@@ -34,7 +34,10 @@ def multiplot(request):
return main.views.no_results(query, "multiplot")
if exp_name == "all":
return multiexperimentplot(request)
if query.startswith("GO"):
exp_name = experiments[0].experiment_name
else:
return multiexperimentplot(request)
title = ""
......
......@@ -308,7 +308,7 @@ table tr:hover td {
.d3-tip {
font-weight: bold;
padding: 2px;
background: darkslateblue;
background: rgba(76, 175, 80, 0.8);
color: #fff;
z-index:10000;
}
......@@ -440,6 +440,10 @@ div#manual_text {
text-align:left;
}
div#methods_text {
text-align:left;
}
div#FAQ_text {
text-align:left;
}
......@@ -476,4 +480,4 @@ div#loading{
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
\ No newline at end of file
}
......@@ -149,17 +149,18 @@ draw = (data) ->
# function for drawing lod curve for probe
draw_probe = (error, probe_data_set) ->
if error
console.log("loading json caused an error")
console.log(error)
throw error
martip = d3.tip()
.attr("class", "d3-tip")
.offset([-10, 0])
.html((d) -> "marker: " + d[0] + " (" + d[2] + ")<br>position: " + d[1] + "<br><i>click for genes peaking here</i>")
.html((d) -> "marker: " + d[0] + " (" + d[3] + ")<br>position: " + d[1] +
"<br>LOD score: " + d[2] + "<br><i>click for genes peaking here</i>")
legendtip = d3.tip()
.attr("class", "d3-tip")
.offset([-10, 0])
.offset([-10, 150])
.html((d) -> d)
# find marker with maximum LOD score
......@@ -272,7 +273,7 @@ draw = (data) ->
else
label = probe_data.gene
martip.show([td.key,td.value.chr+":"+td.value.start,label])
martip.show([td.key,td.value.chr+":"+td.value.start,Math.round(td.value.lod*100)/100,label])
.on "mouseout", ((td) ->
d3.select(this).attr("opacity", 0)
martip.hide())
......@@ -305,11 +306,11 @@ draw = (data) ->
else if multiexperiment
label = probe_data.experiment
linkUrl = "/AraQTL/cistrans/?experiment_name="+label
legendtiptext = "<i>Click for experiment details</i>"
legendtiptext = "<i>click for experiment details</i>"
else
label = probe_data.gene
linkUrl = data.url+label
legendtiptext = "<i>Click for detailed gene information at arabidopsis.org</i>"
legendtiptext = "<i>click for gene information<br>at arabidopsis.org</i>"
xlink = probeaxes.append("a").attr("xlink:href", linkUrl).attr("xlink:show","new")
do(probe_data,i)->
......
......@@ -45,6 +45,7 @@
<li><a href="{% static 'about.html' %}">About</a></li>
<li><a href="{% static 'Manual.html' %}">Manual</a></li>
<li><a href="{% static 'FAQ.html' %}">FAQ</a></li>
<li><a href="/AraQTL/?mode=methods">Methods</a></li>
</ul>
</li>
</ul>
......@@ -87,13 +88,19 @@ and <a href="#GOterms">{{ GOterms|length }} GO term{% if GOterms|length != 1 %}s
<a name="GOterms"></a>
<table cellspacing='0'>
<tr>
<th>ID</th>
<th>Accession</th>
<th>Genes</th>
<th>Name</th>
<th>Description</th>
<th>Definition</th>
</tr>
{% for GOterm in GOterms %}
<tr>
<td><A href="/AraQTL/multiplot/?query={{ GOterm.accession|upper }}&experiment_name={{ experiment_name }}">{{ GOterm.accession }}</a></td>
<td>
<a href="/AraQTL/multiplot/?query={{ GOterm.accession|upper }}&experiment_name={{ experiment_name }}">
{{ GOterm.accession }}
</a>
</td>
<td>{{ GOterm.gene_count }}</td>
<td>{{ GOterm.name }}</td>
<td title="{{ GOterm.definition }}">{{ GOterm.definition }}</td>
</tr>
......
......@@ -2,8 +2,14 @@ import urllib2
from django.shortcuts import render_to_response, HttpResponse
from main.models import GeneInfo, GO, Experiment
from main.models import GeneInfo, GO, GeneGO, Experiment
class GOTerm:
accesssion = ""
name = ""
definition = ""
domain = ""
gene_count = 0
def index(request):
if request.method == 'GET':
......@@ -23,15 +29,22 @@ def suggest(query, experiment_name, mode):
if not query:
return render_to_response('suggestions.html', {'experiments': experiments})
GOterms = list()
GO_terms = list()
genes = list()
go_results = GO.objects.raw(
"select * from main_go WHERE MATCH (name, definition) AGAINST ('%s' IN NATURAL LANGUAGE MODE)" % query)
if experiment_name != "all":
for GOterm in go_results:
GOterms.append(GOterm)
# if experiment_name != "all":
for go in go_results:
go_term = GOTerm()
go_term.accession = go.accession
go_term.name = go.name
go_term.definition = go.definition
go_term.domain = go.domain
go_term.gene_count = GeneGO.objects.filter(term_accession=go_term.accession)\
.values("geneinfo_id").distinct().count()
GO_terms.append(go_term)
gene_results = GeneInfo.objects.raw(
"select * from main_geneinfo WHERE MATCH (gene_name, description) AGAINST ('%s' IN NATURAL LANGUAGE MODE)" % query)
......@@ -46,11 +59,11 @@ def suggest(query, experiment_name, mode):
genes = list(set(genes))
if len(genes) == 0 and len(GOterms) == 0:
if len(genes) == 0 and len(GO_terms) == 0:
return None
return render_to_response('suggestions.html', {'Genes': genes,
'GOterms': GOterms,
'GOterms': GO_terms,
'mode': mode,
'experiments': experiments,
'experiment_name': experiment_name})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment