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

Separated the genes and go terms in the suggestions page

parent 36e055d8
......@@ -25,7 +25,8 @@ MEDIA_URL = "http://www.bioinformatics.nl/AraQTL/media/"
SECRET_KEY = 't06w(yx^e^ig#fc!)oo49cbqivm*77u_rnk%%8wqp3-t6#ui&0'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
#DEBUG = True
DEBUG = False
#ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['*']
......@@ -33,7 +34,7 @@ ALLOWED_HOSTS = ['*']
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
#'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
......@@ -121,3 +122,5 @@ USE_TZ = True
STATIC_URL = '/AraQTL/static/'
#ADMIN_ENABLED = False
SPECIES = 'Arabidopsis thaliana'
......@@ -14,12 +14,12 @@ Including another URLconf
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
#from django.contrib import admin
urlpatterns = [
url(r'^$', include('main.urls')),
url(r'^main/', include('main.urls')),
url(r'^admin/', include(admin.site.urls)),
#url(r'^admin/', include(admin.site.urls)),
url(r'^cistrans/', include('cistrans.urls')),
url(r'^coregulation/', include('coregulation.urls')),
url(r'^correlation/', include('correlation.urls')),
......
......@@ -53,9 +53,9 @@
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Help
<span class="caret"></span></a>
<ul class="dropdown-menu dropdown-menu-left">
<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=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>
......
......@@ -28,6 +28,7 @@ def multiplot(request):
exp_name = "all"
query = request.GET.get('query')
query = urllib2.unquote(query).strip()
query = re.sub(r'\s+', r' ', query)
if exp_name == "all":
return multiexperimentplot(request)
......@@ -86,6 +87,7 @@ def multiexperimentplot(request):
query = request.GET.get('query')
query = urllib2.unquote(query).strip().upper()
genes = ArraySpot.objects.filter(geneinfo__gene_id=query)
if genes.count() == 0:
ret = suggestions.views.index(request)
......
......@@ -52,10 +52,16 @@
</nav>
<div id="container" align="center">
<table cellspacing='0'>
<tr><td>Found:
<a href="#Genes">{{ Genes|length }} gene{% if Genes|length != 1 %}s{% endif %}</a>
and <a href="#GOterms">{{ GOterms|length }} GO term{% if GOterms|length != 1 %}s{% endif %}</a>
</td></tr></table>
<a name="Genes"></a>
{% if Genes|length > 0 %}
<table cellspacing='0'>
<tr>
<th>ID</th>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
......@@ -70,20 +76,29 @@
<A href="/AraQTL/multiplot/?query={{ gene.gene_id|upper }}&experiment_name=all">{{ gene.gene_id }}</a>
{% endif %}
</td>
<td>gene</td>
<td>{{ gene.gene_name }}</td>
<td title="{{ gene.description }}">{{ gene.description }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if GOterms|length > 0 %}
<a name="GOterms"></a>
<table cellspacing='0'>
<tr>
<th>ID</th>
<th>Name</th>
<th>Description</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>GO</td>
<td>{{ GOterm.name }}</td>
<td title="{{ GOterm.definition }}">{{ GOterm.definition }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
</div>
<script>
......@@ -93,4 +108,4 @@
</script>
{% endblock %}
\ No newline at end of file
{% endblock %}
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