Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nijveen, Harm
AraQTL
Commits
b2b31532
Commit
b2b31532
authored
Feb 03, 2017
by
Nijveen
Browse files
minor fixes
parent
eecf9597
Changes
6
Hide whitespace changes
Inline
Side-by-side
cistrans/views.py
View file @
b2b31532
...
...
@@ -240,32 +240,36 @@ def outputJson(experiment_name, qtl_file, thld, output):
# define LOD interval
if
start
>
0
and
end
<
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_start
=
getMarkerPos
(
experiment_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
start
-
1
])
inv_end
=
getMarkerPos
(
experiment_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
end
+
1
])
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
start
-
1
]
inv_start
=
marker_list_dic
[
marker_name
][
"start"
]
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
end
+
1
]
inv_end
=
marker_list_dic
[
marker_name
][
"start"
]
if
start
==
0
and
end
<
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_end
=
getMarkerPos
(
experiment_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
end
+
1
])
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
end
+
1
]
inv_end
=
marker_list_dic
[
marker_name
][
"start"
]
if
start
>
0
and
end
==
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_start
=
getMarkerPos
(
experiment_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
start
-
1
])
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
start
-
1
]
inv_start
=
marker_list_dic
[
marker_name
][
"start"
]
# define one LOD support interval
if
inv_start_ind_lod_support
==
0
and
inv_end_ind_lod_support
!=
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_end_lod_support
=
getMarkerPos
(
experiment
_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_end_
ind_
lod_support
+
1
])
marker
_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_end_ind_lod_support
+
1
]
inv_end_lod_support
=
marker_list_dic
[
marker_name
][
"start"
]
if
inv_start_ind_lod_support
!=
0
and
inv_end_ind_lod_support
==
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_start_lod_support
=
getMarkerPos
(
experiment_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_start_ind_lod_support
-
1
])
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_start_ind_lod_support
-
1
]
inv_start_lod_support
=
marker_list_dic
[
marker_name
][
"start"
]
if
inv_start_ind_lod_support
!=
0
and
inv_end_ind_lod_support
!=
len
(
lod_list_chr
[
chr_ref3
])
-
1
:
inv_start_lod_support
=
getMarkerPos
(
experiment_name
,
outpu
t_dic
[
'p
markname
s'
][
chr_ref3
][
inv_start_ind_lod_support
-
1
])
inv_end_lod_support
=
getMarkerPos
(
experiment
_name
,
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_end_
ind_
lod_support
+
1
])
marker_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_start_
ind_
lod_support
-
1
]
inv_start_lod_support
=
marker_lis
t_dic
[
mark
er_
name
][
"start"
]
marker
_name
=
output_dic
[
'pmarknames'
][
chr_ref3
][
inv_end_ind_lod_support
+
1
]
inv_end_lod_support
=
marker_list_dic
[
marker_name
][
"start"
]
# plot only peak LOD
lod_dic
=
{}
# empty dictionary for each iteration
...
...
correlation/templates/correlation.html
View file @
b2b31532
...
...
@@ -89,9 +89,12 @@ genes.push({ "gene": "{{ gene.gene_id }}",
<th>
Gene
ID (count={{ gene_list|length }})
</th>
<th>
Gene Name
</th>
<th>
Pearson's Correlation Coefficient
</th>
<th>
Position
</th>
<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>
<th>
<button
onclick=
"DownloadGeneList()"
title=
"Opens new browser window with the selected gene IDs"
>
Download selected gene IDs
</button>
<button
onclick=
"GeneListToQuery()"
title=
"Opens new query window for the selected genes"
>
Query selected genes
</button>
</th>
</tr>
{% for gene in gene_list %}
<tr>
...
...
@@ -104,6 +107,7 @@ genes.push({ "gene": "{{ gene.gene_id }}",
</td>
<td>
{{ gene.gene_name }}
</td>
<td>
{{ gene.correlation|floatformat:2 }}
</td>
<td>
{{ gene.chr }}:{{ gene.start }}
</td>
<td
colspan=
2
align=
left
>
{{ gene.description }}
</td></tr>
{% endfor %}
</table>
...
...
@@ -136,10 +140,28 @@ genes.push({ "gene": "{{ gene.gene_id }}",
readCheckboxes
();
});
function
DownloadGeneList
()
{
window
.
open
(
'
/AraQTL/download/?data={% for gene in gene_list %}{{ gene.gene_id }},{% endfor %}
'
);
var
checkedValues
=
$
(
'
input[name="gene_checkbox"]:checked
'
).
map
(
function
()
{
return
this
.
value
;
}).
get
();
var
checkedValuesLength
=
checkedValues
.
length
var
query_genes
=
""
for
(
var
j
=
0
;
j
<
checkedValuesLength
;
j
++
)
{
query_genes
+=
genes
[
checkedValues
[
j
]].
gene
+
"
,
"
}
window
.
open
(
'
/AraQTL/download/?data=
'
+
query_genes
);
}
function
GeneListToQuery
()
{
window
.
open
(
'
/AraQTL/multiplot/?query={% for gene in gene_list %}{{ gene.gene_id }}+{% endfor %}&experiment_name={{ experiment_name }}
'
);
var
checkedValues
=
$
(
'
input[name="gene_checkbox"]:checked
'
).
map
(
function
()
{
return
this
.
value
;
}).
get
();
var
checkedValuesLength
=
checkedValues
.
length
var
query_genes
=
""
for
(
var
j
=
0
;
j
<
checkedValuesLength
;
j
++
)
{
query_genes
+=
genes
[
checkedValues
[
j
]].
gene
+
"
+
"
}
window
.
open
(
'
/AraQTL/multiplot/?query=
'
+
query_genes
+
'
&experiment_name={{ experiment_name }}
'
);
}
</script>
{% endif %}
...
...
correlation/views.py
View file @
b2b31532
...
...
@@ -18,6 +18,8 @@ class GeneInfoCorrelation:
transcript_name
=
""
description
=
""
gene_name
=
""
chr
=
0
start
=
0
correlation
=
0
...
...
@@ -88,6 +90,8 @@ def correlation(request):
if
gi
:
g
.
description
=
gi
[
0
].
description
g
.
gene_name
=
gi
[
0
].
gene_name
g
.
chr
=
gi
[
0
].
chr
g
.
start
=
gi
[
0
].
start
genelist
.
append
(
g
)
return
render_to_response
(
'correlation.html'
,
{
'experiment_name'
:
exp_name
,
...
...
@@ -127,11 +131,10 @@ def loadLodFile(experiment):
def
calculateCorrelation
(
gene
,
lodscores
):
geneLodscores
=
lodscores
[
gene
]
geneLodscores
=
[
abs
(
float
(
x
))
for
x
in
lodscores
[
gene
]
]
correlations
=
dict
()
for
s
in
lodscores
:
correlations
[
s
]
=
numpy
.
corrcoef
(
geneLodscores
,
lodscores
[
s
])[
0
,
1
]
del
correlations
[
gene
]
correlations
[
s
]
=
numpy
.
corrcoef
(
geneLodscores
,
[
abs
(
float
(
x
))
for
x
in
lodscores
[
s
]])[
0
,
1
]
return
correlations
...
...
main/templates/about.html
View file @
b2b31532
<div
id=
"about_text"
>
<div
class=
"paragraph"
>
<h1>
A
bout
</h1>
AraQTL is a web-based workbench and database for expression quantitative trait loc
i
(eQTL) investigation.
<br>
It
’
s aim is to support the Arabidopsis and plant genetics community to u
tilitie
s eQTL data in their research.
<br>
<h1>
A
raQTL
</h1>
AraQTL is a web-based workbench and database for expression quantitative trait loc
us
(eQTL) investigation.
Its aim is to support the Arabidopsis and plant genetics community to us
e
eQTL data in their research.
<br>
<p></p>
Created by Harm Nijveen, Jiao Long
&
Basten Snoek
<br>
<p></p>
Collaborators: Wilco Ligterink, Joost Keurentjes, Henk Hilhorst, Jan Kammenga, Dick de Ridder, Oliver Loudet, Pjotr Prins
<br>
<p></p>
</div>
<div
class=
"paragraph"
>
Created by Harm Nijveen, Jiao Long
&
Basten Snoek.
<br><br>
Wageningen University
<a
href=
"http://www.bif.wur.nl/"
>
Bioinformatics Group
</a>
,
<a
href=
"http://www.nem.wur.nl/"
>
Laboratory of Nematology
</a>
&
<a
href=
"http://www.wur.nl/en/Expertise-Services/Chair-groups/Plant-Sciences/Laboratory-of-Plant-Physiology/Wageningen-Seed-Lab.htm"
>
Wageningen Seed Lab
</a><br><br>
With collaborators:
<br>
Wilco Ligterink, Joost Keurentjes, Henk Hilhorst, Jan Kammenga, Oliver Loudet, Pjotr Prins, Mark Sterken
&
Dick de Ridder
<br><br>
Using
<a
href=
"https://github.com/kbroman/d3examples/tree/master/cistrans"
>
cistrans
</a>
code by Karl Broman
</div>
<div
class=
"paragraph"
>
A paper describing AraQTL is published in the Plant Journal:
<br>
<A
href=
"http://onlinelibrary.wiley.com/doi/10.1111/tpj.13457/full"
>
AraQTL - Workbench and Archive for systems genetics in
<i>
Arabidopsis thaliana
</i>
</A>
</div>
</div>
main/templates/index.html
View file @
b2b31532
...
...
@@ -189,7 +189,11 @@
AraQTL is the
<i>
Arabidopsis
</i>
workbench and database for eQTL analysis.
<br><br>
It allows easy access to the data of all published
<i>
Arabidopsis thaliana
</i>
genetical genomics experiments.
<i>
Arabidopsis thaliana
</i>
genetical genomics experiments.
<br><br>
A paper describing AraQTL was published in the Plant Journal:
<br>
<A
href=
"http://onlinelibrary.wiley.com/doi/10.1111/tpj.13457/full"
>
AraQTL - Workbench and Archive for systems genetics in
<i>
Arabidopsis thaliana
</i>
</A>
</div>
<br>
<a
href=
"#helptext5"
class=
"helplink"
>
What is an eQTL?
</a>
...
...
@@ -205,7 +209,7 @@
</div>
</div>
<script>
var
textAreaDefaultText
=
"
Type your query, i.e. AT1G01150, or GO:0004674
, or ERECTA
"
;
var
textAreaDefaultText
=
"
Type your query, i.e. AT1G01150,
ERECTA, Flowering
or GO:0004674
"
;
$
(
'
#queryArea
'
).
focus
(
function
()
{
if
(
$
(
this
).
val
()
==
textAreaDefaultText
)
{
...
...
multiplot/templates/multiplot.html
View file @
b2b31532
...
...
@@ -173,8 +173,8 @@ dot["pos"] = {{ gene_info_list.0.start }};
<th>
Gene Name
</th>
<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>
<button
onclick=
"DownloadGeneList()"
title=
"Opens new browser window with the
selected
gene
ID
s"
>
Download
selected
gene
IDs
</button>
<button
onclick=
"GeneListToQuery()"
title=
"Opens new query window
for
the
selected
genes"
>
Query
selected genes
</button>
</th></tr>
</thead>
...
...
@@ -219,10 +219,28 @@ dot["pos"] = {{ gene_info_list.0.start }};
});
function
DownloadGeneList
()
{
window
.
open
(
'
/AraQTL/download/?data={% for gene in gene_info_list %}{{ gene.gene_id }},{% endfor %}
'
);
var
checkedValues
=
$
(
'
input[name="gene_checkbox"]:checked
'
).
map
(
function
()
{
return
this
.
value
;
}).
get
();
var
checkedValuesLength
=
checkedValues
.
length
var
query_genes
=
""
for
(
var
j
=
0
;
j
<
checkedValuesLength
;
j
++
)
{
query_genes
+=
genes
[
checkedValues
[
j
]].
gene
+
"
,
"
}
window
.
open
(
'
/AraQTL/download/?data=
'
+
query_genes
);
}
function
GeneListToQuery
()
{
window
.
open
(
'
/AraQTL/multiplot/?query={% for gene in gene_info_list %}{{ gene.gene_id }}+{% endfor %}&experiment_name={{ experiment_name }}
'
);
var
checkedValues
=
$
(
'
input[name="gene_checkbox"]:checked
'
).
map
(
function
()
{
return
this
.
value
;
}).
get
();
var
checkedValuesLength
=
checkedValues
.
length
var
query_genes
=
""
for
(
var
j
=
0
;
j
<
checkedValuesLength
;
j
++
)
{
query_genes
+=
genes
[
checkedValues
[
j
]].
gene
+
"
+
"
}
window
.
open
(
'
/AraQTL/multiplot/?query=
'
+
query_genes
+
'
&experiment_name={{ experiment_name }}
'
);
}
</script>
{% endif %}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment