From 61e2b1bd49fa27c27a9a75e3582019ea624397cf Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 4 Dec 2020 20:48:39 +0300 Subject: fix edit links to correct markdown page --- wqflask/wqflask/templates/facilities.html | 2 +- wqflask/wqflask/templates/glossary.html | 2 +- wqflask/wqflask/templates/links.html | 2 +- wqflask/wqflask/templates/policies.html | 2 +- wqflask/wqflask/templates/references.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html index a022b657..0db31b84 100644 --- a/wqflask/wqflask/templates/facilities.html +++ b/wqflask/wqflask/templates/facilities.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index 752c4b12..aaee7c5a 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index 072e8429..6e91adae 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index 4e0985d3..e36c9e08 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index f723a1e8..04e60361 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -6,7 +6,7 @@ {% block content %}
- + Edit Text -- cgit v1.2.3 From 9b7c09e14576a39c3f986e5b6e633b0380a72095 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 4 Dec 2020 21:41:14 +0300 Subject: fix typo in wqflask/markdown_routes.py --- wqflask/wqflask/markdown_routes.py | 2 +- wqflask/wqflask/templates/glossary.html | 2 +- wqflask/wqflask/templates/links.html | 2 +- wqflask/wqflask/templates/policies.html | 2 +- wqflask/wqflask/templates/references.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 601845d7..3109a352 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -64,7 +64,7 @@ def links(): @policies_blueprint.route("/") def policies(): return render_template( - "links.html", + "policies.html", rendered_markdown=render_markdown("general/policies/policies.md")), 200 diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index aaee7c5a..58b325e5 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index 6e91adae..ae52785c 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index e36c9e08..efe8a731 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index 04e60361..a8d8dced 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -6,7 +6,7 @@ {% block content %}
- + Edit Text -- cgit v1.2.3 From 0b20fe6881818fd7cbdd24bbb3df18563816216c Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Fri, 4 Dec 2020 21:59:41 +0300 Subject: replace tree with blob --- wqflask/wqflask/templates/facilities.html | 2 +- wqflask/wqflask/templates/glossary.html | 2 +- wqflask/wqflask/templates/links.html | 2 +- wqflask/wqflask/templates/policies.html | 2 +- wqflask/wqflask/templates/references.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/facilities.html b/wqflask/wqflask/templates/facilities.html index 0db31b84..56b127f9 100644 --- a/wqflask/wqflask/templates/facilities.html +++ b/wqflask/wqflask/templates/facilities.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/glossary.html b/wqflask/wqflask/templates/glossary.html index 58b325e5..aaee7c5a 100644 --- a/wqflask/wqflask/templates/glossary.html +++ b/wqflask/wqflask/templates/glossary.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/links.html b/wqflask/wqflask/templates/links.html index ae52785c..6e91adae 100644 --- a/wqflask/wqflask/templates/links.html +++ b/wqflask/wqflask/templates/links.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/policies.html b/wqflask/wqflask/templates/policies.html index efe8a731..e36c9e08 100644 --- a/wqflask/wqflask/templates/policies.html +++ b/wqflask/wqflask/templates/policies.html @@ -10,7 +10,7 @@
- + Edit Text diff --git a/wqflask/wqflask/templates/references.html b/wqflask/wqflask/templates/references.html index a8d8dced..04e60361 100644 --- a/wqflask/wqflask/templates/references.html +++ b/wqflask/wqflask/templates/references.html @@ -6,7 +6,7 @@ {% block content %}
- + Edit Text -- cgit v1.2.3 From 0dfdbcbb83ffe9b349c870d02a5812bcb296a74b Mon Sep 17 00:00:00 2001 From: zsloan Date: Fri, 4 Dec 2020 14:57:02 -0600 Subject: Added option to toggle columns on show_trait page, including case attribute columns --- wqflask/wqflask/templates/show_trait.html | 27 +++++++++++++++++++ .../wqflask/templates/show_trait_edit_data.html | 30 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/show_trait.html b/wqflask/wqflask/templates/show_trait.html index 7b74a3f6..3923ad2f 100644 --- a/wqflask/wqflask/templates/show_trait.html +++ b/wqflask/wqflask/templates/show_trait.html @@ -221,6 +221,33 @@ primary_table.search($(this).val()).draw(); } ); + $('.toggle-vis').on('click', function (e) { + e.preventDefault(); + + function toggle_column(column) { + //ZS: Toggle column visibility + column.visible( ! column.visible() ); + if (column.visible()){ + $(this).removeClass("active"); + } else { + $(this).addClass("active"); + } + } + + // Get the column API object + var target_cols = $(this).attr('data-column').split(",") + for (let i = 0; i < target_cols.length; i++){ + console.log("THE COL:", target_cols[i]) + var column = primary_table.column( target_cols[i] ); + toggle_column(column); + + {% if sample_groups|length != 1 %} + var column2 = other_table.column( target_cols[i] ); + toggle_column(column2); + {% endif %} + } + } ); + {% if sample_groups|length != 1 %} $('#other_searchbox').on( 'keyup', function () { other_table.search($(this).val()).draw(); diff --git a/wqflask/wqflask/templates/show_trait_edit_data.html b/wqflask/wqflask/templates/show_trait_edit_data.html index 2e730248..4ad11a5e 100644 --- a/wqflask/wqflask/templates/show_trait_edit_data.html +++ b/wqflask/wqflask/templates/show_trait_edit_data.html @@ -1,6 +1,36 @@
{% for sample_type in sample_groups %}
+ {% if loop.index == 1 %} + Show/Hide Columns: +
+ + + + {% if sample_groups[0].se_exists %} + + {% if has_num_cases %} + + {% set attr_start_pos = 7 %} + {% else %} + {% set attr_start_pos = 6 %} + {% endif %} + {% else %} + {% if has_num_cases %} + + {% set attr_start_pos = 5 %} + {% else %} + {% set attr_start_pos = 4 %} + {% endif %} + {% endif %} + {% if sample_groups[0].attributes %} + {% for attribute in sample_groups[0].attributes %} + + {% endfor %} + {% endif %} +
+
+ {% endif %}
-- cgit v1.2.3 From a865a2d490722e866c847a996439ed31253fea8a Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Sun, 6 Dec 2020 15:03:27 +0300 Subject: Add svg graph of inputs * wqflask/wqflask/markdown_routes.py: New import: "send_from_directory" (svg_graph): New function that adds route for svg_graph. * wqflask/wqflask/static/new/css/markdown.css: New style rules for svg graph. * wqflask/wqflask/templates/environment.html: Add new section for displaying svg graph. --- wqflask/wqflask/markdown_routes.py | 8 ++++++++ wqflask/wqflask/static/new/css/markdown.css | 7 ++++++- wqflask/wqflask/templates/environment.html | 7 +++++++ 3 files changed, 21 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 3b60bc96..ebf75807 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -9,6 +9,7 @@ import sys from bs4 import BeautifulSoup +from flask import send_from_directory from flask import Blueprint from flask import render_template @@ -99,6 +100,13 @@ def environments(): 200) +@environments_blueprint.route('/svg-dependency-graph') +def svg_graph(): + directory, file_name, _ = get_file_from_python_search_path( + "wqflask/dependency-graph.svg").partition("dependency-graph.svg") + return send_from_directory(directory, file_name) + + @links_blueprint.route("/") def links(): return render_template( diff --git a/wqflask/wqflask/static/new/css/markdown.css b/wqflask/wqflask/static/new/css/markdown.css index 38d664e2..859fe7fc 100644 --- a/wqflask/wqflask/static/new/css/markdown.css +++ b/wqflask/wqflask/static/new/css/markdown.css @@ -62,7 +62,8 @@ } .graph-legend, -#guix-graph { +#guix-graph, +#guix-svg-graph{ width: 90%; margin: 10px auto; } @@ -71,6 +72,10 @@ border: solid 2px black; } +#guix-svg-graph img { + width: 100%; +} + #markdown table { width: 100%; } diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html index 5fe01dad..85133ac3 100644 --- a/wqflask/wqflask/templates/environment.html +++ b/wqflask/wqflask/templates/environment.html @@ -21,6 +21,13 @@
+ + + +
+

The dependency graph is shown below

+ Dependency graph of the tools needed to build python3-genenetwork2 +
{% endif %} {% endblock %} -- cgit v1.2.3 From efb6a41e7d712407f276e21f9ede3198d7e734dc Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Sat, 5 Dec 2020 13:35:43 +0300 Subject: modify tests for run_gemma --- .../unit/wqflask/marker_regression/test_gemma_mapping.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'wqflask') diff --git a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py index 5b621264..3d00dd7c 100644 --- a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py +++ b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py @@ -43,18 +43,18 @@ class TestGemmaMapping(unittest.TestCase): @mock.patch("wqflask.marker_regression.gemma_mapping.GEMMA_WRAPPER_COMMAND", "ghc") @mock.patch("wqflask.marker_regression.gemma_mapping.TEMPDIR", "/home/user/data/") @mock.patch("wqflask.marker_regression.gemma_mapping.parse_loco_output") - @mock.patch("wqflask.marker_regression.gemma_mapping.logger") @mock.patch("wqflask.marker_regression.gemma_mapping.flat_files") @mock.patch("wqflask.marker_regression.gemma_mapping.gen_covariates_file") @mock.patch("wqflask.marker_regression.run_mapping.random.choice") @mock.patch("wqflask.marker_regression.gemma_mapping.os") @mock.patch("wqflask.marker_regression.gemma_mapping.gen_pheno_txt_file") - def test_run_gemma_firstrun_set_true(self, mock_gen_pheno_txt, mock_os, mock_choice, mock_gen_covar, mock_flat_files, mock_logger, mock_parse_loco): + def test_run_gemma_firstrun_set_true(self, mock_gen_pheno_txt, mock_os, mock_choice, mock_gen_covar, mock_flat_files,mock_parse_loco): """add tests for run_gemma where first run is set to true""" - chromosomes = [] + this_chromosomes={} for i in range(1, 5): - chromosomes.append(AttributeSetter({"name": f"CH{i}"})) - chromo = AttributeSetter({"chromosomes": chromosomes}) + this_chromosomes[f'CH{i}']=(AttributeSetter({"name": f"CH{i}"})) + chromo = AttributeSetter({"chromosomes": this_chromosomes}) + dataset_group = MockGroup( {"name": "GP1", "genofile": "file_geno"}) dataset = AttributeSetter({"group": dataset_group, "name": "dataset1_name", @@ -76,7 +76,6 @@ class TestGemmaMapping(unittest.TestCase): mock_parse_loco.assert_called_once_with(dataset, "GP1_GWA_RRRRRR") mock_os.path.isfile.assert_called_once_with( ('/home/user/imgfile_output.assoc.txt')) - self.assertEqual(mock_logger.debug.call_count, 2) self.assertEqual(mock_flat_files.call_count, 4) self.assertEqual(results, ([], "GP1_GWA_RRRRRR")) -- cgit v1.2.3 From 7e0f91dec563f08671c772e34b85e0edc14195cb Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Sat, 5 Dec 2020 13:43:23 +0300 Subject: add pep8 formatting --- wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py index 3d00dd7c..b8c13ab4 100644 --- a/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py +++ b/wqflask/tests/unit/wqflask/marker_regression/test_gemma_mapping.py @@ -53,12 +53,12 @@ class TestGemmaMapping(unittest.TestCase): this_chromosomes={} for i in range(1, 5): this_chromosomes[f'CH{i}']=(AttributeSetter({"name": f"CH{i}"})) - chromo = AttributeSetter({"chromosomes": this_chromosomes}) + chromosomes = AttributeSetter({"chromosomes": this_chromosomes}) dataset_group = MockGroup( {"name": "GP1", "genofile": "file_geno"}) dataset = AttributeSetter({"group": dataset_group, "name": "dataset1_name", - "species": AttributeSetter({"chromosomes": chromo})}) + "species": AttributeSetter({"chromosomes": chromosomes})}) trait = AttributeSetter({"name": "trait1"}) samples = [] mock_gen_pheno_txt.return_value = None -- cgit v1.2.3 From 7a35308b11a004f1c0899bdb2a2b982597869808 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Sun, 6 Dec 2020 19:33:33 +0300 Subject: Add descriptive paragraph for svg graph * wqflask/wqflask/templates/environment.html: New paragraph. --- wqflask/wqflask/templates/environment.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/environment.html b/wqflask/wqflask/templates/environment.html index 85133ac3..89e805ce 100644 --- a/wqflask/wqflask/templates/environment.html +++ b/wqflask/wqflask/templates/environment.html @@ -26,6 +26,9 @@

The dependency graph is shown below

+ +

To explore this image SVG you may want to open it in new browser page and zoom in. Or use an SVG viewing application.

+ Dependency graph of the tools needed to build python3-genenetwork2
{% endif %} -- cgit v1.2.3 From 18d01454548f7fb30f6fc24d9d8fb38840e76901 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 7 Dec 2020 12:18:26 +0300 Subject: replace datatatable/jquery.js in templates --- wqflask/wqflask/templates/admin/create_group.html | 4 +++- wqflask/wqflask/templates/admin/search_for_groups.html | 4 +++- wqflask/wqflask/templates/ctl_results.html | 4 +++- wqflask/wqflask/templates/network_graph.html | 4 +++- wqflask/wqflask/templates/pair_scan_results.html | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/admin/create_group.html b/wqflask/wqflask/templates/admin/create_group.html index 5a6929fb..4ab70007 100644 --- a/wqflask/wqflask/templates/admin/create_group.html +++ b/wqflask/wqflask/templates/admin/create_group.html @@ -80,7 +80,9 @@ {% endblock %} {% block js %} - + + + diff --git a/wqflask/wqflask/templates/admin/search_for_groups.html b/wqflask/wqflask/templates/admin/search_for_groups.html index f304a172..1df4d0a2 100644 --- a/wqflask/wqflask/templates/admin/search_for_groups.html +++ b/wqflask/wqflask/templates/admin/search_for_groups.html @@ -63,7 +63,9 @@ {% endblock %} {% block js %} - + + + diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html index e374eb4e..7ce67d0e 100644 --- a/wqflask/wqflask/templates/ctl_results.html +++ b/wqflask/wqflask/templates/ctl_results.html @@ -64,7 +64,9 @@ gn2_url = "{{ gn2_url | safe }}" - + + + diff --git a/wqflask/wqflask/templates/network_graph.html b/wqflask/wqflask/templates/network_graph.html index be3d0402..33f0365b 100644 --- a/wqflask/wqflask/templates/network_graph.html +++ b/wqflask/wqflask/templates/network_graph.html @@ -140,7 +140,9 @@ gn2_url = "{{ gn2_url | safe }}" - + + + diff --git a/wqflask/wqflask/templates/pair_scan_results.html b/wqflask/wqflask/templates/pair_scan_results.html index f1646af7..14a62e0d 100644 --- a/wqflask/wqflask/templates/pair_scan_results.html +++ b/wqflask/wqflask/templates/pair_scan_results.html @@ -64,7 +64,9 @@ - + + + -- cgit v1.2.3 From 1c202735fc279f42e70d2cdef6ee8b9214ca0f44 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 7 Dec 2020 12:41:44 +0300 Subject: replace colorbox jquery.colorbox in templates --- wqflask/wqflask/templates/base.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/base.html b/wqflask/wqflask/templates/base.html index faa59deb..5c8343d1 100644 --- a/wqflask/wqflask/templates/base.html +++ b/wqflask/wqflask/templates/base.html @@ -254,7 +254,9 @@ - + + + -- cgit v1.2.3 From e96b568adbb0e3ac2c3e0b1ab72d0bfd354db6a7 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 7 Dec 2020 13:00:42 +0300 Subject: replace cytoscape js in templates --- wqflask/wqflask/templates/ctl_results.html | 2 +- wqflask/wqflask/templates/network_graph.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html index e374eb4e..20935612 100644 --- a/wqflask/wqflask/templates/ctl_results.html +++ b/wqflask/wqflask/templates/ctl_results.html @@ -67,7 +67,7 @@ - + diff --git a/wqflask/wqflask/templates/network_graph.html b/wqflask/wqflask/templates/network_graph.html index be3d0402..017298b9 100644 --- a/wqflask/wqflask/templates/network_graph.html +++ b/wqflask/wqflask/templates/network_graph.html @@ -144,7 +144,7 @@ - + -- cgit v1.2.3 From 8666d17de2a0b9e20be82f115df9af8d5693dbae Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 7 Dec 2020 13:02:30 +0300 Subject: replace cytoscape-panzoom js in templates --- wqflask/wqflask/templates/ctl_results.html | 2 +- wqflask/wqflask/templates/network_graph.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html index 20935612..28d462ee 100644 --- a/wqflask/wqflask/templates/ctl_results.html +++ b/wqflask/wqflask/templates/ctl_results.html @@ -68,7 +68,7 @@ - + diff --git a/wqflask/wqflask/templates/network_graph.html b/wqflask/wqflask/templates/network_graph.html index 017298b9..1c0eabee 100644 --- a/wqflask/wqflask/templates/network_graph.html +++ b/wqflask/wqflask/templates/network_graph.html @@ -145,7 +145,7 @@ - + -- cgit v1.2.3 From 5ae193d969c0e21bdd02de577d00f8c8b8ba8148 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Mon, 7 Dec 2020 13:04:30 +0300 Subject: replace cytoscape panzoom css in templates --- wqflask/wqflask/templates/ctl_results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/ctl_results.html b/wqflask/wqflask/templates/ctl_results.html index 28d462ee..17390d96 100644 --- a/wqflask/wqflask/templates/ctl_results.html +++ b/wqflask/wqflask/templates/ctl_results.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block css %} - +