aboutsummaryrefslogtreecommitdiff
path: root/templates/index.html
blob: d098324234c7fe773caad91ea09b84dd39a82e85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
{% extends "layout.html" %}
{% block content %}
{{ message | safe }}

<h3> Mining PubMed for Gene Relationships using Custom Ontologies </h3>

<div class="row">
	<div class="col-md-9">
		<p>GeneCup is a tool to answer the question <b>"What do we know about these genes and the topic I study?".  
		</b> GeneCup answers this question by searching PubMed to find <i>sentences</i> containing gene symbols and a custom list of keywords. 
		<!-- These keywords are organized into a user defined ontology, which groups related keywords together for better organization of the results. -->
		Human GWAS findings from <a href="https://www.ebi.ac.uk/gwas/">NHGRI-EBI GWAS catalog </a>are also included in the search.
		These gene-keyword relationships are presented as a graph or a table. 
		<!--Gene alias often include non-specific words and are thus not included in the initial search. 
			However, a list of alias can be found by clicking on the gene symbol in the results section. 
			These alias then can be searched with a single click. --> 
		Here we present a curated ontology for drug addiction with over <a href="/ontology"> 300 keywords organized into seven categories.</a> 
		<b>Deep learning </b> is used to distinguish, for example, the sentences describing systemic stress from those describing cellular stress. 
		A user account (free) is needed to create custom ontologies and save the search results. We do not track you.
		</p>

		<p>Example: </b><a href=/progress?type=GWAS&type=addiction&type=drug&type=brain&type=stress&type=psychiatric&type=cell&type=function&query=Rgma+Penk>Rgma Penk</a>.</p>
		
		{%if ("name" not in session) %}
			By default, the <a href="/ontology">addiction</a> ontology is used. Custom ontologies can be created in user accounts. 

			<form action="/progress">
				<div id="check_selection"></div>
				<textarea name="query" class="form-control form-control-lg" type="search" rows="4" e="100%" id="searchform"></textarea>

				Up to 200 gene symbols</span> can be entered in the box above. Because we do not search for relationships between genes, a list with more items can be split into multiple searches without affecting the results. Gene symbols can be separated by a space, a comma or a semicolon. <br>	

				<button type="submit" class="btn btn-primary">Search</button>
			</form>


		{% else %}	
			Welcome back, <b> {{session['name']}}</b>. Your <a href="/userarchive"> previous searches </a> 
			and <a href="/ontoarchive"> custom ontologies </a> are available from the links.
			<br>
			Please select an ontology to use for the new search
			<form action="/index_ontology">
				<table><td>
					<div id="onto_selection"></div>
				</td><td>
					<button type="submit" class="btn btn-secondary btn-sm">Select</button>
				</td></table>
			</form>
			<br>
			The <font size="5em" color="tomato"> <strong>{{ontol}}</strong> </font> ontology is selected. Please choose categories to be included in the search. 
			Expect a longer wait time when you include <b>GWAS</b> category.

			<form action="/progress">
				<div id="check_selection"></div>
				Up to 200 gene symbols can be entered in the box below. Gene symbols can be separated by a space, a comma or a semicolon.   <br>	
				<textarea name="query" class="form-control form-control-lg" type="search" rows="4" e="100%" id="searchform"></textarea>
				<button type="submit" class="btn btn-primary">Search</button>
			</form>
		{% endif %}
	</div>

	<div class="col-md-3">
		<div class='img'><img src="/static/cytos.png" class="img-fluid"></div>
	</div>
</div>

<script>
	function toggle(source) {
		type = document.getElementsByName('type');
	for(var i=0, n=type.length;i<n;i++) {
		type[i].checked = source.checked;
	}
	}
	var newdiv = document.createElement('div');
	var checkbox = '';
	{%for ky in dict_onto.keys()%}
		checkbox += '<strong><input type="checkbox" name="type" value="{{ky}}" checked> {{ky}}&nbsp &nbsp </strong>';
	{% endfor %}
	checkbox += '<strong><input type="checkbox" onClick="toggle(this)"/> (Un)select all'
	newdiv.innerHTML = "<inout name='type' id='onto'> "+checkbox + " </input> ";
	document.getElementById('check_selection').appendChild(newdiv);
</script>

{%if "name" in session %}
	<script>
		var newdiv = document.createElement('div');
		var i=0
		var options = '<option>addiction</option>';
		{%for i in range(0,onto_len_dir)%}
			options += " <option>{{onto_list[i]}}</option>";
		{% endfor %}
		newdiv.innerHTML = "<select name='onto' id='onto'> "+options + " </select> ";
		document.getElementById('onto_selection').appendChild(newdiv);
	</script>
{% endif %}

{% endblock %}