Commit 3a896480 authored by Nijveen, Harm's avatar Nijveen, Harm
Browse files

various changes

parent b7b64e04
{% extends 'base.html' %}
{% block content %}
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"/>
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css" xmlns="http://www.w3.org/1999/html"/>
<script type="text/javascript" src="{% static 'js/d3.js' %}"></script>
<script type="text/javascript" src="{% static 'js/d3-tip.js' %}"></script>
<script type="text/javascript" src="{% static 'js/bootstrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/cistrans.js' %}"></script>
<nav class="navbar navbar-nav navbar-fixed-top">
<div class="container-fluid">
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li><a class="navbar-brand" href="/AraQTL" id="home_button">AraQTL</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Select an experiment">Experiment
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-left">
{% for experiment in experiments %}
<li><a href="/AraQTL/cistrans/?experiment_name={{ experiment.experiment_name }}">{{ experiment.experiment_name }}</a></li>
{% endfor %}
</ul>
</li>
<li><a href="/AraQTL/?mode=correlation" title="Search for correlating profiles">Correlation</a></li>
<li><a href="/AraQTL/?mode=coregulation" title="Search per locus">Locus</a></li>
<form class="navbar-form navbar-left" action="/AraQTL/cistrans/" id="top_form" method="get">
<input title="Search for AGI identifiers in the cis-trans plot" id="query" name="query" type="text" class="form-control"
placeholder="Search the plot...">
<select title="Select an experiment" class="form-control" id="experiment_selector" name="experiment_name">
{% for experiment in experiments %}
<option value="{{ experiment.experiment_name }}" {% if experiment.experiment_name == experiment_name %} selected {% endif %}>
{{ experiment.experiment_name }}
</option>
{% endfor %}
</select>
LOD:<input title="LOD score threshold (numeric, one decimal)" id="thld"
pattern="[0-9]+([.][0-9])?"
name="thld" type="text"
size="3" class="form-control"
value="{% if thld %}{{ thld|floatformat:-1}}{% else %}{{ lodthld|floatformat:-1 }}{% endif %}">
</form>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Help
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-left">
<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>
</ul>
</li>
</ul>
</div>
</div>
</nav>
{% if experiment_name %}
<div class="top"></div>
<div id="explaintext">
<a href="#explain" class="explainlink">?</a>
<div id="explain" class="helptext">
A cis-trans plot shows eQTLs with a certain LOD score on the X-axis for genes on the Y-axis.
<br><br>
Blue dots indicate peaks with a positive LOD score, red dots indicate peaks with a negative LOD score.
<br><br>
By clicking on an eQTL, the eQTL profile of the corresponding gene is shown in the panel on the right.
<br><br>
On the diagonal are the so called &quot;<i>cis</i> eQTLs&quot; that map to the gene&apos;s own location.
<br><br>
Below the cis-trans plot is a histogram of the number of eQTL peaks per marker.
Clicking on a bar brings up the eQTL profiles for all genes with an eQTL at that location.
<br><br>
You can use the search box at the top to search for a specific AGI ID in the plot.
</div>
</div>
<div id="loading"></div>
<div id = "container">
<div id ="cistrans"></div>
{% endif %}
<script>
experiment_name = "{{ experiment_name }}"
thld_ = '{{ thld }}'
draw_cisqtl_plot()
$('select#experiment_selector').change(function() {
loadingDIV = document.createElement('div');
loadingDIV.id = "loading";
document.body.appendChild(loadingDIV);
$('form#top_form').submit();
});
$('input#thld').keypress(function(e) {
if(e.which == 13) {
loadingDIV = document.createElement('div');
loadingDIV.id = "loading";
document.body.appendChild(loadingDIV);
$('form#top_form').submit();
}
});
selectedProbe = "";
attrR = 0
attrFill = "";
attrStroke = "";
attrStroke_width = 0;
attrOpacity = 0;
$('input#query').keyup(function(e) {
spot = $('input#query').val().toUpperCase().trim();
probe = "circle.probe_" + spot;
if (selectedProbe.length > 0) {
d3.selectAll(selectedProbe).attr("r", attrR).attr("fill", attrFill).attr("stroke", attrStroke).attr("stroke-width", attrStroke_width).attr("opacity", attrOpacity);
selectedProbe = "";
}
if(!d3.select(probe).empty()) {
$('input#query').css("color","#000");
selectedProbe = probe;
d3Probe = d3.selectAll(probe);
attrR = d3Probe.attr("r");
attrFill = d3Probe.attr("fill");
attrStroke = d3Probe.attr("stroke");
attrStroke_width = d3Probe.attr("stroke-width");
attrOpacity = d3Probe.attr("opacity");
d3Probe.attr("r", 5).attr("fill", "hotpink").attr("stroke", "darkslateblue").attr("stroke-width", 1).attr("opacity", 1);
d3.json("../media/data/{{ experiment_name }}/probe/" + spot + ".json", draw_plot);
} else {
$('input#query').css("color","#F00");
}
});
$(document).ready(function(e) {
$("a.explainlink").click(function(e) {
e.preventDefault();
var ab = $(this).attr("href");
if($(ab).is(':visible')) {
$(ab).hide();
} else {
$(ab).show();
}
});
});
</script>
{% endblock %}
import json
import os
import pandas as pd
import numpy as np
from django.shortcuts import render, render_to_response
from django.conf import settings
from main.models import ArraySpot, Experiment, Marker, Chromosome, GeneInfo
#from main.parser import outputJSON
from main.utils import load_genelist_for_experiment, load_lodscores_for_experiment
# Create your views here.
......@@ -22,29 +25,27 @@ def eQTLPlotView(request):
lodthld = Experiment.objects.get(experiment_name=exp_name).lodthld
thld = ""
thld = float(lodthld)
if request.GET.get('thld'):
qtl_file = 'lod.txt'
try:
thld = float(request.GET.get('thld'))
thld = int(thld * 10) / 10.0
except ValueError:
thld = ""
thld = lodthld
output = 'lod%s.json' % thld
full_path = os.path.join(settings.MEDIA_ROOT, 'data', '%s' % exp_name, output)
if not os.path.isfile(full_path) or os.stat(full_path).st_size == 0:
outputJson(exp_name, qtl_file, thld, output)
thld = int(thld * 10) / 10.0
output = 'lod%.1f.json' % thld
full_path = os.path.join(settings.MEDIA_ROOT, 'data', '%s' % exp_name, output)
if not os.path.isfile(full_path) or os.stat(full_path).st_size == 0:
outputJson(exp_name, thld, output)
experiment = Experiment.objects.get(experiment_name=exp_name)
return render_to_response('eQTL.html', {'experiment_name': exp_name,
return render_to_response('cistrans.html', {'experiment_name': exp_name,
'thld': thld,
'lodthld': lodthld,
'current_experiment': experiment,
'experiments': experiments})
else:
return render_to_response('eQTL.html', {'experiments': experiments})
return render_to_response('cistrans.html', {'experiments': experiments})
def getMarkers(experiment):
......@@ -65,7 +66,6 @@ def getMarkerObjects(experiment):
marker_list = Marker.objects.filter(experiment__experiment_name=experiment).order_by('chromosome', 'start')
return marker_list
def getSpecies(exp):
species_name = Experiment.objects.get(experiment_name=exp).species.species_name
return species_name
......@@ -96,16 +96,13 @@ def ranges(series_list):
yield start, end # Yield the last group
def outputJson(experiment_name, qtl_file, thld, output):
def outputJson(experiment_name, thld, output):
'''
description: parse upload information into JSON file format later which later will be used for multiexperimentplot plot.
@type experiment_name: name of experiment
@param experiment_name: string
@type qtl_file: qtl mapping output
@param qtl_file: file
@type thld: LOD theshold
@param thld: decimal
......@@ -114,14 +111,12 @@ def outputJson(experiment_name, qtl_file, thld, output):
'''
in_path = os.path.join(settings.MEDIA_ROOT, 'data/%s/%s' % (experiment_name, qtl_file))
out_path = os.path.join(settings.MEDIA_ROOT, 'data/%s/%s' % (experiment_name, output))
output_dic = {}
# define KEY chrnames and chr
species_name = getSpecies(experiment_name)
chr_nr = None
chromosomes = Chromosome.objects.filter(species__species_name=species_name)
output_dic['chrnames'] = sorted(list(chromosomes.values_list("name", flat=True)))
......@@ -131,6 +126,15 @@ def outputJson(experiment_name, qtl_file, thld, output):
output_dic['chr'] = chr_dic
chr_nr = output_dic['chrnames']
genotype_file = os.path.join(settings.MEDIA_ROOT, 'data/%s/%s' % (experiment_name, "map.txt"))
if os.path.exists(genotype_file):
genotypes = pd.read_csv(genotype_file,sep="\t")
gd = genotypes.T.to_dict(outtype='list')
output_dic['geno'] = gd
output_dic['individuals'] = list(genotypes.columns)
# define KEY spec
output_dic['spec'] = species_name;
......@@ -144,6 +148,14 @@ def outputJson(experiment_name, qtl_file, thld, output):
markers = list(getMarkerNames(experiment_name))
output_dic['markers'] = markers
experiment = Experiment.objects.get(experiment_name = experiment_name)
output_dic['experiment_name'] = experiment.experiment_name
output_dic['parental_strain'] = experiment.parental_strain
output_dic['sample'] = experiment.sample
output_dic['pub_url'] = experiment.pub_url
output_dic['reference'] = experiment.reference
output_dic['lodthld'] = "%.2f"%experiment.lodthld
# define KEY pmark
marker_list_dic = {}
marker_queryset_list = getMarkerObjects(experiment_name)
......@@ -152,140 +164,134 @@ def outputJson(experiment_name, qtl_file, thld, output):
marker_list_dic[m.name.encode('ascii', 'ignore')] = m_info
output_dic['pmark'] = marker_list_dic
spots_in_experiment = {}
spot_list = ArraySpot.objects.filter(experiment__experiment_name = experiment_name)
for spot in spot_list:
spots_in_experiment[spot.spot_id] = spot
# define KEY spot/gene
spots_list = ArraySpot.objects.filter(experiment__experiment_name=experiment_name)
#gis = GeneInfo.objects.filter(arrayspot__experiment__experiment_name=experiment_name)
spots_dic = {}
for spot in spots_list:
geneInfo = GeneInfo.objects.get(gene_id=spot.spot_id)
if geneInfo.start and geneInfo.chr:
spots_dic[spot.spot_id] = {'chr': geneInfo.chr, 'start': int(geneInfo.start), 'end': int(geneInfo.end),
'ref': geneInfo.gene_id, 'transcript': geneInfo.gene_id}
else:
spots_dic[spot.spot_id] = {'chr': '1', 'start': 0, 'end': 0, 'ref': geneInfo.gene_id,
'transcript': geneInfo.gene_id}
output_dic['spot'] = spots_dic
with open(in_path) as fi:
i = 0
j = 0
markers_lod = []
peaks_list = []
chr_names = output_dic['chrnames']
with open(out_path, 'w') as fo:
first_line = fi.readline().rstrip()
markers_lod = first_line.split('\t')[1:]
lines = fi.readlines()
# count number of markers per chromosome
chr_nr_of_markers = {}
nr_of_markers = 0
for chr_ref1 in chr_names:
chr_nr_of_markers[chr_ref1] = len(output_dic['pmarknames'][chr_ref1])
for line in lines:
j += 1
col = line.rstrip().split('\t')
#check if the transcript/gene id exists in the database
if col[0].upper() not in output_dic['spot']:
continue
# assign LOD value to 0 if null
lod_list = [float(lod) if lod != '' else 0.0 for lod in col[1:]]
k = 0 # splice index
lod_list_chr = {} # initialise lod_list_chr
# splice lod_list to sub_lod_list per chromosome
for chr_ref2 in chr_names:
lod_list_chr[chr_ref2] = lod_list[k:k + chr_nr_of_markers[chr_ref2]]
k += chr_nr_of_markers[chr_ref2]
for chr_ref3 in chr_names: # lod list per chromosome
# check if any significant LOD value in the list per chromosome
if any(x for x in lod_list_chr[chr_ref3] if abs(x) >= thld):
interval_list = []
ref_index_list = []
for m in range(len(lod_list_chr[chr_ref3])):
if abs(lod_list_chr[chr_ref3][m]) >= thld:
ref_index_list.append(m)
# group continuous significant LOD
interval_list = list(ranges(ref_index_list))
# if any intervals
for interval in interval_list:
i += 1
start, end = interval[0], interval[1]
# LOD peak and LOD index
# find the max LOD value per significant LOD interval per chromosome
qtl_lod = max(lod_list_chr[chr_ref3][start:end + 1])
qtl_index = lod_list_chr[chr_ref3].index(qtl_lod) # LOD peak
# initialize eQTL interval
inv_start = inv_start_lod_support = output_dic['chr'][chr_ref3]['start']
inv_end = inv_end_lod_support = output_dic['chr'][chr_ref3]['end']
# 1 LOD support interval
lod_support = qtl_lod - 1
##initialize eQTL interval
inv_start_ind_lod_support = inv_end_ind_lod_support = qtl_index
for ind in range(qtl_index, start - 1 if start != 0 else start):
if lod_list_chr[chr_ref3][ind] > lod_support:
inv_start_ind_lod_support = ind
for ind in range(qtl_index, end + 1): # end+1 will not raise list index exception
if lod_list_chr[chr_ref3][ind] > lod_support:
inv_end_ind_lod_support = ind
# define LOD interval
if start > 0 and end < len(lod_list_chr[chr_ref3]) - 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:
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:
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:
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:
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:
marker_name = output_dic['pmarknames'][chr_ref3][inv_start_ind_lod_support - 1]
inv_start_lod_support = marker_list_dic[marker_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
# save to lod_dic
lod_dic['interval'] = '%s:%s-%s' % (chr_ref3, inv_start, inv_end)
lod_dic['lod_support_interval'] = '%s:%s-%s' % (
chr_ref3, inv_start_lod_support, inv_end_lod_support)
lod_dic['spot'] = col[0].upper()
lod_dic['marker'] = output_dic['pmarknames'][chr_ref3][qtl_index]
lod_dic['lod'] = lod_list_chr[chr_ref3][qtl_index]
lod_dic['transcript'] = output_dic['spot'][col[0].upper()]['transcript']
lod_dic['ref'] = output_dic['spot'][col[0].upper()]['ref']
peaks_list.append(lod_dic)
i = 0
peaks_list = []
chr_names = output_dic['chrnames']
# count number of markers per chromosome
chr_nr_of_markers = {}
for chr_ref1 in chr_names:
chr_nr_of_markers[chr_ref1] = len(output_dic['pmarknames'][chr_ref1])
genes = load_genelist_for_experiment(experiment_name)
lod_scores = load_lodscores_for_experiment(experiment_name)
for iGene in range(0,len(genes)):
gene_id = genes[iGene].upper()
#check if the transcript/gene id exists in the database
if gene_id not in spots_in_experiment:
print gene_id
continue
# assign LOD value to 0 if null
lod_list = lod_scores[iGene,:]
k = 0 # splice index
lod_list_chr = {} # initialise lod_list_chr
# splice lod_list to sub_lod_list per chromosome
for chr_ref2 in chr_names:
lod_list_chr[chr_ref2] = lod_list[k:k + chr_nr_of_markers[chr_ref2]]
k += chr_nr_of_markers[chr_ref2]
for chr_ref3 in chr_names: # lod list per chromosome
# check if any significant LOD value in the list per chromosome
if any(x for x in lod_list_chr[chr_ref3] if abs(x) >= thld):
ref_index_list = []
for m in range(len(lod_list_chr[chr_ref3])):
if abs(lod_list_chr[chr_ref3][m]) >= thld:
ref_index_list.append(m)
# group continuous significant LOD
interval_list = list(ranges(ref_index_list))
# if any intervals
for interval in interval_list:
i += 1
start, end = interval[0], interval[1]
# LOD peak and LOD index
# find the max LOD value per significant LOD interval per chromosome
qtl_lod = max(lod_list_chr[chr_ref3][start:end + 1])
qtl_index = np.where(lod_list_chr[chr_ref3] == qtl_lod)[0][0] # LOD peak
# initialize eQTL interval
inv_start = inv_start_lod_support = output_dic['chr'][chr_ref3]['start']
inv_end = inv_end_lod_support = output_dic['chr'][chr_ref3]['end']
# 1 LOD support interval
lod_support = qtl_lod - 1
##initialize eQTL interval
inv_start_ind_lod_support = inv_end_ind_lod_support = qtl_index
for ind in range(qtl_index, start - 1 if start != 0 else start):
if lod_list_chr[chr_ref3][ind] > lod_support:
inv_start_ind_lod_support = ind
for ind in range(qtl_index, end + 1): # end+1 will not raise list index exception
if lod_list_chr[chr_ref3][ind] > lod_support:
inv_end_ind_lod_support = ind
# define LOD interval
if start > 0 and end < len(lod_list_chr[chr_ref3]) - 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:
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:
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:
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:
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:
marker_name = output_dic['pmarknames'][chr_ref3][inv_start_ind_lod_support - 1]
inv_start_lod_support = marker_list_dic[marker_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
# save to lod_dic
lod_dic['interval'] = '%s:%s-%s' % (chr_ref3, inv_start, inv_end)
lod_dic['lod_support_interval'] = '%s:%s-%s' % (
chr_ref3, inv_start_lod_support, inv_end_lod_support)
lod_dic['spot'] = gene_id
lod_dic['marker'] = output_dic['pmarknames'][chr_ref3][qtl_index]
lod_dic['lod'] = lod_list_chr[chr_ref3][qtl_index]
lod_dic['gene_name'] = spots_in_experiment[gene_id].geneinfo.gene_name
spots_dic[gene_id] = 1
peaks_list.append(lod_dic)
output_dic['peaks'] = peaks_list
for spot in spots_dic:
geneInfo = GeneInfo.objects.get(gene_id=spot)
if geneInfo.start and geneInfo.chr:
spots_dic[spot] = {'chr': geneInfo.chr, 'start': int(geneInfo.start), 'end': int(geneInfo.end),
'gene_name': geneInfo.gene_name}
else:
spots_dic[spot] = {'chr': 'I', 'start': 0, 'end': 0, 'gene_name': geneInfo.gene_name}
output_dic['spot'] = spots_dic
with open(out_path, 'w') as fo:
json.dump(output_dic, fo, indent=4)
......
{% extends 'base.html' %}
{% block content %}
{% load staticfiles %}
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"/>
<link rel="stylesheet" href="{% static 'css/dataTables.min.css' %}"/>
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css" xmlns="http://www.w3.org/1999/html"/>
<script type="text/javascript" src="{% static 'js/d3.js' %}"></script>
<script type="text/javascript" src="{% static 'js/d3-tip.js' %}"></script>
<script type="text/javascript" src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="http://d3js.org/queue.v1.min.js"></script>
<script type="text/javascript" src="{% static 'js/multiplot.js' %}"></script>
<script type="text/javascript" src="{% static 'js/datatables.min.js' %}"></script>
<nav class="navbar navbar-nav navbar-fixed-top">
<div class="container-fluid">
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav nav-pills">
<li><a class="navbar-brand" href="/AraQTL" id="home_button">AraQTL</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Select an experiment">Experiment
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-left">
{% for experiment in experiments %}
<li><a href="/AraQTL/cistrans/?experiment_name={{ experiment.experiment_name }}">{{ experiment.experiment_name }}</a></li>
{% endfor %}
</ul>
</li>
<li><a href="/AraQTL/?mode=correlation" title="Search for correlating profiles">Correlation</a></li>
<li class="active"><a href="/AraQTL/?mode=coregulation" title="Search per locus">Locus</a></li>
<form class="navbar-form navbar-left" action="/AraQTL/coregulation/" id="top_form" method="get">
<input title="Marker, gene or chromosome location" id="query"
name="query" type="text"
size="12"
class="form-control" {% if marker.name %}value="{{ marker.name }}"{% else %}placeholder="Search..."{% endif %}>
<input title="LOD score threshold"
id="thld"
name="thld"
pattern="[0-9]+([.][0-9])?"
type="text" size="3"
class="form-control"{% if lodthld %} value="{{ lodthld }}" {% endif %}>
<input title="Minimal distance to the locus (Mb)" id="min_dist"
name="min_dist"
type="text" size="2"
class="form-control" value="{% if min_dist %}{{ min_dist }}{% else %}0{% endif %}">Mb
<select title="Select an experiment" class="form-control" id="experiment_selector" name="experiment_name">
{% for experiment in experiments %}
<option value="{{ experiment.experiment_name }}" {% if experiment.experiment_name == experiment_name %} selected {% endif %}>
{{ experiment.experiment_name }}
</option>
{% endfor %}
</select>
</form>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Help
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-left">
<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>