Skip to content

Commit

Permalink
Merge pull request #40 from superphy/bugfixes
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
kevinkle authored Mar 13, 2017
2 parents f01f862 + 3c45f67 commit 07fef30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/savvy.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ def json_return(args_dict, gene_dict):
if analysis == 'Serotype':
instance_dict = {}
instance_dict['filename'] = basename(args_dict['i'])[27:]
instance_dict['hitname'] = str(gene_dict[analysis].values()).replace(',', ' ').strip("'").strip("[").strip("]")
instance_dict['hitname'] = str(gene_dict[analysis].values()).replace(',', ' ').replace("'","").strip("[").strip("]")
if not "No prediction" in instance_dict['hitname']:
instance_dict['hitname'] = instance_dict['hitname'].replace(" ",":",1).replace(" ","")
instance_dict['contigid'] = 'n/a'
instance_dict['analysis'] = analysis
instance_dict['hitorientation'] = 'n/a'
Expand Down
7 changes: 2 additions & 5 deletions app/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,9 @@ app.controller('SpfyController', [

//check for "No results found"
for(hit in data){
$log.log('hit is:');
$log.log(data[hit]);
if (data[hit].hitname === "No Results Found."){
if (data[hit].hitname === "No Results Found." ||
data[hit].hitname.includes("No prediction could be made for")){
$scope.foundNull = true;
} else {
$log.log(hit.hitname);
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="col-2 collapse d-md-flex bg-faded pt-2 h-100" id="sidebar">
<dl>
<dt><img src="static/img/spfy.png" alt="spfy" id="spfy-logo"></dt>
<dt>v0.06-beta</dt>
<dt>v0.06b-beta</dt>
<dt>About:</dt>
<dd>Quick, Predictive Genomics</dd>
<dd>AMR is powered by <a href="https://card.mcmaster.ca/analyze/rgi">CARD</a></dd>
Expand Down

0 comments on commit 07fef30

Please sign in to comment.