Commit 7903ae3b authored by Nijveen, Harm's avatar Nijveen, Harm
Browse files

List of genes can be send to multiplot

parent 88c5e3f4
......@@ -102,11 +102,11 @@
};
left = [60,650, 60, 650];
right = [560,1100, 560, 1100];
right = [560,1100, 560, 1099];
top = [41,41,570, 300];
bottom = [540,241,670, 670];
h = [499,200,100,370];
w = [500,450,500,500];
bottom = [540,241,670, 470];
h = [499,200,100,170];
w = [500,450,500,449];
//NUMBER FORMATING//////////////////
nodig = d3.format(".0f");
......@@ -130,8 +130,22 @@
svg = d3.select("div#cistrans").append("svg").attr("width", totalw).attr("height", totalh);
for (j in left){
svg.append("rect").attr("x", left[j]).attr("y", top[j]).attr("height", h[j]).attr("width", w[j]).attr("class", "innerBox");
if (j == 3) {
svg.append("rect").
attr("x", left[j]).
attr("y", top[j]).
attr("rx",20).
attr("ry",20).
attr("height", h[j]).
attr("width", w[j]).
attr("class", "innerBox").
style("stroke","#73AD21").
style("stroke-width",2);
} else {
svg.append("rect").attr("x", left[j]).attr("y", top[j]).attr("height", h[j]).attr("width", w[j]).attr("class", "innerBox");
}
}
//#######################end 1###################################################
//###########################2.define chessboard layout##########################
......@@ -514,13 +528,7 @@
experimentinfo = svg.append("g").attr("id", "experimentinfo").style("pointer-events", "none");
iLine = 0
experimentinfo.append("text").text("Experiment information").attr("x", left[3]+10)
.attr("y", top[3] + 10 + 30*iLine)
.style("text-anchor", "start")
.attr("fill", titlecolor);
iLine++;
iLine = 1
experimentinfo.append("text").text("Experiment: {{ current_experiment.experiment_name }}").attr("x", left[3]+10)
.attr("y", top[3] + 10 + 30*iLine)
.style("text-anchor", "start")
......
......@@ -87,7 +87,8 @@ genes.push({ "gene": "{{ gene.gene_id }}",
<th>Gene Name</th>
<th>Pearson's Correlation Coefficient</th>
<th>Description</th>
<th><button onclick="DownloadGeneList()" title="Opens new browser window with the list of genes">Download gene list</button></th>
<th><button onclick="DownloadGeneList()" title="Opens new browser window with the list of genes">Download gene list</button>
<button onclick="GeneListToQuery()" title="Opens new query window with the list of genes">Query gene list</button></th>
</tr>
{% for gene in gene_list %}
<tr>
......@@ -129,6 +130,9 @@ genes.push({ "gene": "{{ gene.gene_id }}",
function DownloadGeneList() {
window.open('/AraQTL/download/?data={% for gene in gene_list %}{{ gene.gene_id }},{% endfor %}');
}
function GeneListToQuery() {
window.open('/AraQTL/multiplot/?query={% for gene in gene_list %}{{ gene.gene_id }}+{% endfor %}&experiment_name={{ experiment_name }}');
}
</script>
{% endif %}
......
......@@ -27,7 +27,7 @@
</ul>
</li>
<li>
<a href="/AraQTL/correlation/{% if experiment_name == "all" %}?query={{ gene.gene_id }}{% endif %}">
<a href="/AraQTL/correlation/{% if experiment_name != "all" %}?query={{ gene_info_list.0.gene_id }}&experiment_name={{ experiment_name }}{% endif %}">
Correlation
</a>
</li>
......@@ -161,6 +161,8 @@ genes.push({ "gene": "{{ gene.gene_id }}",
<th>Description</th>
<th>
<button onclick="DownloadGeneList()" title="Opens new browser window with the list of genes">Download gene list</button>
<button onclick="GeneListToQuery()" title="Opens new query window with the list of genes">Query gene list</button>
</th></tr>
</thead>
<tbody>
......@@ -204,7 +206,10 @@ genes.push({ "gene": "{{ gene.gene_id }}",
});
function DownloadGeneList() {
window.open('/AraQTL/download/?data={% for gene in gene_list %}{{ gene.gene_id }},{% endfor %}');
window.open('/AraQTL/download/?data={% for gene in gene_info_list %}{{ gene.gene_id }},{% endfor %}');
}
function GeneListToQuery() {
window.open('/AraQTL/multiplot/?query={% for gene in gene_info_list %}{{ gene.gene_id }}+{% endfor %}&experiment_name={{ experiment_name }}');
}
</script>
{% endif %}
......
......@@ -23,7 +23,7 @@ draw = (data) ->
leftLegend = right + 10
topLegend = top
hLegend = h
wLegend = 250
wLegend = 230
totalw = 1100
totalh = 400
......@@ -309,7 +309,7 @@ draw = (data) ->
else
label = probe_data.gene
linkUrl = data.url+label
legendtiptext = "<i>Click for detailed gene information</i>"
legendtiptext = "<i>Click for detailed gene information at arabidopsis.org</i>"
xlink = probeaxes.append("a").attr("xlink:href", linkUrl).attr("xlink:show","new")
do(probe_data,i)->
......
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