diff options
-rw-r--r-- | wqflask/wqflask/snp_browser/snp_browser.py | 25 | ||||
-rw-r--r-- | wqflask/wqflask/templates/snp_browser.html | 6 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 3 |
3 files changed, 14 insertions, 20 deletions
diff --git a/wqflask/wqflask/snp_browser/snp_browser.py b/wqflask/wqflask/snp_browser/snp_browser.py index 116da149..58c90f11 100644 --- a/wqflask/wqflask/snp_browser/snp_browser.py +++ b/wqflask/wqflask/snp_browser/snp_browser.py @@ -368,15 +368,15 @@ class SnpBrowser(object): #ZS: list of booleans representing which columns are entirely empty, so they aren't displayed on the page; only including ones that are sometimes empty (since there's always a location, etc) self.empty_columns = { - "snp_source": "false", - "conservation_score": "false", - "gene_name": "false", - "transcript": "false", - "exon": "false", - "domain_2": "false", - "function": "false", - "function_details": "false" - } + "snp_source": "false", + "conservation_score": "false", + "gene_name": "false", + "transcript": "false", + "exon": "false", + "domain_2": "false", + "function": "false", + "function_details": "false" + } the_rows = [] for i, result in enumerate(self.filtered_results): @@ -651,8 +651,6 @@ class SnpPage(object): self.rows_count = self.snp_browser.rows_count self.table_rows = self.snp_browser.table_rows self.header_data_names = self.snp_browser.header_data_names - - logger.info(self.table_rows[0]) self.sort_rows() self.paginate_rows() @@ -778,8 +776,9 @@ def get_header_list(variant_type, strains, species = None, empty_columns = None) empty_field_count += 1 header_fields[0].remove('Details') - for col in empty_columns: - header_data_names.remove(col) + for col in empty_columns.keys(): + if empty_columns[col] == "false": + header_data_names.remove(col) elif variant_type == "InDel": header_fields = ['Index', 'ID', 'Type', 'InDel Chr', 'Mb Start', 'Mb End', 'Strand', 'Size', 'Sequence', 'Source'] diff --git a/wqflask/wqflask/templates/snp_browser.html b/wqflask/wqflask/templates/snp_browser.html index cbc12e06..96cd7247 100644 --- a/wqflask/wqflask/templates/snp_browser.html +++ b/wqflask/wqflask/templates/snp_browser.html @@ -320,7 +320,7 @@ 'data': null, 'render': function(data, type, row, meta) { if (data.gene_name != "") { - return '<i>' + data.gene_name + '</i><br><a href="' + data.gene_link + '">NCBI</a>' + return '<i>' + data.gene_name + '</i>, <a href="' + data.gene_link + '">NCBI</a>' } else { return data.gene_name } @@ -434,10 +434,6 @@ 'sAjaxSource': '/snp_browser_table'+getParams(window.location.href), 'infoCallback': function(settings, start, end, max, total, pre) { return "Showing " + start + " to " + (start + this.api().data().length - 1) + " of " + total + " entries"; - }, - 'language': { - 'loadingRecords': ' ', - 'processing': 'Loading...' } }); {% endif %} diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 8e7f6ec3..12ebf595 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -897,7 +897,6 @@ def corr_scatter_plot_page(): def snp_browser_page(): logger.info(request.url) template_vars = snp_browser.SnpBrowser(request.args) - logger.info(template_vars.__dict__.keys()) return render_template("snp_browser.html", **template_vars.__dict__) @@ -909,7 +908,7 @@ def db_info_page(): @app.route("/snp_browser_table", methods=('GET',)) def snp_browser_table(): - logger.info(request.url) + logger.info(request.url) current_page = snp_browser.SnpPage(request.args).get_page() return flask.jsonify(current_page) |