Skip to content

Commit

Permalink
minor wording tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
chen42 committed Jan 11, 2021
1 parent d73f343 commit d89e5f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ def tableview():
gene_name = gene_name+added
num_gene = gene_name.count(',')+1

message3="<b> Actions: </b><li> <font color=\"#E74C3C\">Click on the abstract count to read sentences linking the keyword and the gene</font> <li> Click on a keyword to see the terms included in the search. <li>View the results in <a href='\\cytoscape/?rnd={}&genequery={}'\ ><b> a graph.</b></a>".format(rnd_url,genes_url)
message3="<ul><li> <font color=\"#E74C3C\">Click on the abstract count to read sentences linking the keyword and the gene</font> <li> Click on a keyword to see the terms included in the search. <li>View the results in <a href='\\cytoscape/?rnd={}&genequery={}'\ ><b> a graph.</b></a> </ul> Links will be preserved when the table is copy-n-pasted into a spreadsheet.".format(rnd_url,genes_url)
return render_template('tableview.html', genes_session_tmp = genes_session_tmp, nodata_temp=nodata_temp, num_gene=num_gene, jedges=jedges, jnodes=jnodes,gene_name=gene_name, message3=message3, rnd_url=rnd_url, genes_url=genes_url)

@app.route("/tableview0/")
Expand Down Expand Up @@ -605,7 +605,7 @@ def tableview0():
gene_name=gene_name.replace("'","")
gene_name = gene_name+added
num_gene = gene_name.count(',')+1
message4="<b> Notes: </b><li> These are the keywords that have <b>zero</b> abstract counts. <li>View all the results in <a href='\\cytoscape/?rnd={}&genequery={}'><b> a graph.</b></a>".format(rnd_url,genes_url)
message4="<b> Notes: </b><li> These are the keywords that have <b>zero</b> abstract counts. <li>View all the results in <a href='\\cytoscape/?rnd={}&genequery={}'><b> a graph.</b></a> ".format(rnd_url,genes_url)
return render_template('tableview0.html',nodata_temp=nodata_temp, num_gene=num_gene, jedges=jedges, jnodes=jnodes,gene_name=gene_name, message4=message4)

@app.route("/userarchive")
Expand Down Expand Up @@ -640,7 +640,7 @@ def sorted_alphanumeric(data):
filename=filename[0:4]+"-"+filename[5:7]+"-"+filename[8:13]+":"+filename[14:16]+":"+filename[17:19]
directory_list.append(filename)
len_dir = len(directory_list)
message3="<b> Actions: </b><li> Click on the Date/Time to view archived results. <li>The Date/Time are based on US Central time zone. "
message3="<ul><li> Click on the Date/Time to view archived results. <li>The Date/Time are based on US Central time zone.</ul> "
return render_template('userarchive.html', len_dir=len_dir, gene_list = gene_list, folder_list=folder_list, directory_list=directory_list, session_id=session_id, message3=message3)

# delete this search
Expand Down Expand Up @@ -674,7 +674,7 @@ def date():
for line in file_edges.readlines():
if ':' not in line:
nodata_temp = 1
else:
else:
nodata_temp = 0
with open(tf_path+"/"+str(session['hashed_email'])+"/"+select_date+"/edges.json", "r") as edgesjsonfile:
jedges = json.load(edgesjsonfile)
Expand Down Expand Up @@ -709,7 +709,7 @@ def date():
else:
flash("You logged out!")
return render_template('index.html')
message3="<b> Actions: </b><li> <font color=\"#E74C3C\">Click on the abstract count to read sentences linking the keyword and the gene</font> <li> Click on a keyword to see the terms included in the search. <li>View the results in <a href='\\cytoscape/?rnd={}&genequery={}'\ ><b> a graph.</b></a>".format(select_date,genes_session)
message3="<ul><li> <font color=\"#E74C3C\">Click on the abstract count to read sentences linking the keyword and the gene</font> <li> Click on a keyword to see the terms included in the search. <li>View the results in <a href='\\cytoscape/?rnd={}&genequery={}'\ ><b> a graph.</b></a> </ul> Links will be preserved when the table is copy-n-pasted into a spreadsheet.".format(select_date,genes_session)
return render_template('tableview.html',nodata_temp=nodata_temp, num_gene=num_gene,genes_session_tmp = genes_session_tmp, rnd_url=select_date ,jedges=jedges, jnodes=jnodes,gene_name=gene_name, genes_url=genes_session, message3=message3)

@app.route('/cytoscape/')
Expand All @@ -719,7 +719,7 @@ def cytoscape():
tf_path=tempfile.gettempdir()
genes_session_tmp=tf_path + "/" + genes_url

message2="<b> Actions: </b><li><font color=\"#E74C3C\">Click on a line to read the sentences </font> <li>Click on a keyword to see the terms included in the search<li>Hover a pointer over a node to hide other links <li>Move the nodes around to adjust visibility, reload the page to restore the default layout<li>View the results in <a href='\\tableview/?rnd={}&genequery={}'\ ><b>a table. </b></a>".format(rnd_url,genes_url)
message2="<ul><li><font color=\"#E74C3C\">Click on a line to read the sentences </font> <li>Click on a keyword to see the terms included in the search<li>Hover a pointer over a node to hide other links <li>Move the nodes around to adjust visibility <li> Reload the page to restore the default layout<li>View the results in <a href='\\tableview/?rnd={}&genequery={}'\ ><b>a table. </b></a></ul>".format(rnd_url,genes_url)
if ('email' in session):
filename = rnd_url.split("_0_")[0]
rnd_url_tmp = datadir+"/user/"+str(session['hashed_email'])+"/"+rnd_url+"/"+filename
Expand Down
2 changes: 0 additions & 2 deletions templates/cytoscape.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ <h4> {{ message |safe}} </h4>
</div>

<div class="column right">
<ul><li>
{{ message2 |safe}}
</ul>
<br>
<br>

Expand Down
5 changes: 3 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3> <u>R</u>elationship with <u>A</u>ddiction <u>T</u>hrough <u>S</u>earches of
</h3>
<table>
<tr><td >
<p>RatsPub is a tool to efficiently and comprehensively answer the question <b>"What do we know about these genes and addiction?". </b> RatsPub answers this question by searching PubMed to find <i>sentences</i> containing the query terms (i.e., gene symbols) and <a href="https://github.com/chen42/RatsPub/blob/master/ratspub_keywords.py">over 300 drug addiction-related keywords</a> that are organized into seven categories. Data 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 an interactive graph and 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.
<p>RatsPub is a tool to efficiently and comprehensively answer the question <b>"What do we know about these genes and addiction?". </b> RatsPub answers this question by searching PubMed to find <i>sentences</i> containing the query terms (i.e., gene symbols) and <a href="https://github.com/chen42/RatsPub/blob/master/ratspub_keywords.py">over 300 drug addiction-related keywords</a> that are organized into seven categories. Data 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 an interactive graph and 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.
<p>

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. User accounts (free) can be created if you prefer to save the results.
Expand All @@ -24,7 +24,7 @@ <h3> <u>R</u>elationship with <u>A</u>ddiction <u>T</u>hrough <u>S</u>earches of
<form action="/progress">
<div class="form-group row">
<div class="col-sm-10">
<strong>Please choose keyword categories to be included in the search:</strong>
Please choose keyword categories to be included in the search:<strong>
<label>
<div style="font-size:120%">
<input type="checkbox" name="type" value="addiction" checked> Addiction
Expand All @@ -37,6 +37,7 @@ <h3> <u>R</u>elationship with <u>A</u>ddiction <u>T</u>hrough <u>S</u>earches of
<input type="checkbox" name="type" value="stress" checked> Stress
</div>
</label>
</strong>
</div>
<textarea name="query" class="form-control form-control-lg" type="search" rows="8" id="searchform"></textarea>
<button type="submit" class="btn btn-primary">Search</button>
Expand Down

0 comments on commit d89e5f4

Please sign in to comment.