Skip to content

Commit

Permalink
Add species to genome search results table.
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalaldo committed Dec 13, 2024
2 parents a6535e9 + bd6a02c commit 6ef5a71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 2 additions & 0 deletions search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ def download_search_genomes_csv(request):
genome_keys = [
"pangenome_analysis",
"genome_id",
"species",
"strain",
"phylo_group",
"gc_content",
Expand Down Expand Up @@ -269,6 +270,7 @@ def genomes_json(request):
genome_keys = [
"pangenome_analysis",
"genome_id",
"species",
"strain",
"phylo_group",
"gc_content",
Expand Down
17 changes: 11 additions & 6 deletions templates/search/search_results_genomes.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<thead>
<tr>
<th>Genome</th>
<th>Species</th>
<th>Stain (NCBI)</th>
<th>Phylo Group</th>
<th>%GC</th>
Expand All @@ -27,6 +28,7 @@
<tfoot>
<tr>
<th>Genome</th>
<th>Species</th>
<th>Stain (NCBI)</th>
<th>Phylo Group</th>
<th>%GC</th>
Expand Down Expand Up @@ -65,19 +67,22 @@
},
{
data: '2',
className: 'ncbi_strain',
},
{
data: '3',
className: 'ncbi_strain',
},
{
data: '4',
},
{
data: '5',
render: function (data, type, row) {
return (data*100).toFixed(2)
},
},
{
data: '5',
data: '6',
render: function (data, type, row) {
if (data == "?") {
return "-"
Expand All @@ -88,7 +93,7 @@
className: 'country',
},
{
data: '6',
data: '7',
className: 'broad_context',
render: function (data, type, row) {
if (data == "?" || data == "Missing" || data == "missing") {
Expand All @@ -99,7 +104,7 @@
},
},
{
data: '7',
data: '8',
className: 'local_context',
render: function (data, type, row) {
if (data == "?" || data == "Missing" || data == "missing") {
Expand All @@ -110,7 +115,7 @@
},
},
{
data: '8',
data: '9',
className: 'extra_context',
render: function (data, type, row) {
if (data == "?" || data == "Missing" || data == "missing") {
Expand All @@ -121,7 +126,7 @@
},
},
{
data: '9',
data: '10',
className: 'isolation_source',
render: function (data, type, row) {
if (data == "?" || data == "Missing" || data == "missing") {
Expand Down

0 comments on commit 6ef5a71

Please sign in to comment.