From 938f86dfff7254fe53c9189c35460079931239e1 Mon Sep 17 00:00:00 2001 From: Samuel Nichols Date: Tue, 14 Feb 2023 10:51:45 -0700 Subject: [PATCH] Squashed 'CRISPRessoWEB/CRISPRessoReports/' changes from 1efad70..13f7ae2 13f7ae2 Fix command used and parameters elements. Increase print width and height to 100% dcf7391 Adding styling for print-only and screen only REVERT: 1efad70 Replace tabs with spaces and reindent template files REVERT: e7ef285 Fix hamburger menu and add -bs- to data-target and data-toggle REVERT: df896b0 Resize images and fix filepath REVERT: 2f70855 Add spacing around body and footer tags REVERT: 5cd6d27 Final style fixes, color circles for style files REVERT: f8d7d92 Merge commit 'e7de9b7745a71bbc9fedf2c8fc6396fcc898f2c5' as 'CRISPRessoWEB/CRISPRessoReports' REVERT: 321815d Removing CRISPRessoReport files REVERT: 17d9ead Radio buttons, center buttons and inputs (login, register, new password), new div name for style dropdown fixes REVERT: 84174e6 Squashed 'CRISPRessoWEB/CRISPRessoReports/' content from commit 461ca93 REVERT: 04558fb Remove extra files REVERT: 8e3a590 Spacing changes, submission_compared fix, and submission_wgs file upload fix REVERT: 980fdc4 Styling and bootstrap changes REVERT: 9d40474 Centering issue and submit button fix REVERT: aa5071c Subtree working REVERT: db30843 Jinja choice loader REVERT: 3b67ac0 Path correction REVERT: 3aaca48 Bootstrap 5 and partials changes REVERT: 8f5d8a1 Layout.html for C2WEB and CLI REVERT: 290d829 Fix error when rendering multi reports REVERT: 546397a summaries partials and html updates REVERT: 858a751 fig_reports and replacement REVERT: 073f1fe Added a few changes from the selenium-tests branch on C2Web REVERT: 1061ebb Update indentation in report.html and extract log params into partial REVERT: c3781e9 Update path to template directory to include `CRISPRessoReports` REVERT: 84e0969 Use the `render_template` function for each report REVERT: ee721b3 Add function to render template partials without using Flask REVERT: 08fcd4e Web updates refactoring done REVERT: 99c8e22 Adding files REVERT: ef333f0 Removing reports found in subtree REVERT: 1bae0df Commit before adding subtree REVERT: 1fbb427 Add server file to render js REVERT: d1d6fdf Move styling to main.css file REVERT: 1241569 Jinja partials for all submissions REVERT: 0534637 New submission.js template file REVERT: c5406d1 Changes to submission.js for bootstrap 5 and load file upload partial REVERT: ecd03f6 Working file upload in partial. REVERT: ce5d20f Working, missing custom label REVERT: 6ba73e7 Bootstrap 5 changes REVERT: e05d146 Layout and report update REVERT: 517e9f8 Replace sub, ins, del with Substitution, Insertion, Deletion REVERT: ea44128 Move where the style files are stored in Docker REVERT: 7f03e98 Implement creating styles from the admin panel REVERT: 9b27a2e Rename style_file references to style REVERT: a233d10 Add some default styles and rename the default to "Original" REVERT: 43a8d29 Remove style file card from admin index page REVERT: 1a8f332 Refactor saving style files when there is no name specified REVERT: 64a7b1c Implement color pickers in style admin view REVERT: 17c93c1 Succesfully implemented selecting default style REVERT: fd79cdd Restyle the colors in the admin view REVERT: 3cd94b8 Fix error when the default style can't be read from the database REVERT: 5e626bd Refactor `style_handler` to read the style from the database REVERT: 0f66d4a Refactor styles to be part of the database instead of files REVERT: 6c7d3c8 Move style folder inside of server folder REVERT: 9f71f21 Add margins around style file elements REVERT: 2a28549 Restyle the color pickers REVERT: 2c82c08 DEFAULTUSER can't see style_dropdown and variable for ALLOW_USER_STYLE_UPLOAD for users to upload style files REVERT: dc4f2c7 Style dropdown - allow save json only for admin REVERT: 15e7483 Style file check REVERT: 7bd0e91 Remove style from Compare REVERT: 0ab45f5 Colors function refactored and working for all types REVERT: 2e24f8b Adding styling REVERT: d6621f1 Debuging REVERT: ed00c82 Merge with master REVERT: 5150f9b Adding style_files to partial REVERT: 957a9ca Add style files to pooled and wgs REVERT: 66dc2d3 Changes to pooled and wgs, reset Dockerfile REVERT: fa6b1cf Updated Docker file and style_files.html REVERT: ee0fcfc Optional save file REVERT: 229e21d Checkbox for custom colors that shows and hides color selectors, box on home page for style folder REVERT: 0f26e2c Working style FileAdmin, access button, and further partial refactoring REVERT: b3b70bd Rough framework for style admin page REVERT: e4731d7 Style menu completed REVERT: 1bb37bc New style menu with tabs REVERT: 58f7e56 Tabs for different style options REVERT: 3de893d Compare (#34) REVERT: e66bef1 Update AWS EB instructions.docx REVERT: 658a218 Fix bug when trying to send recovery password with bad email creds REVERT: ee32e36 Adding color-picker partial to wgs and pooled REVERT: 34ea688 Fix for responsiveness on cup and title REVERT: f0c4d07 Adding color routes to other versions REVERT: 110fe14 Color picker input added to cmd_to_run REVERT: e732478 Names for color fields REVERT: 2934631 Jinja partial for color picker and pip install in dockerfile REVERT: 48bbf9c Cup animation (#33) REVERT: 2905248 Selenium tests (#31) REVERT: 5641fd3 Merge pull request #32 from edilytics/multi-amplicon-guides REVERT: 570e42a Don't remove commas from amplicons or guides REVERT: 0d70425 Add smallGenome.fa REVERT: fc33197 Writing text for pooled REVERT: dccfcb3 Files for testing REVERT: 4cea67c Changes for WGS selenium tests. All tests functional. REVERT: ff05713 Changes for WGS selenium test file loading REVERT: 495a98d Changes for pooled testing REVERT: 0ad86a5 Merge pull request #30 from edilytics/pooled-upload-fix REVERT: 127eb8f PopulatePooled error REVERT: 30ff7a7 Merge remote-tracking branch 'origin/pooled-upload-fix' into selenium_tests REVERT: 7847687 Add link to CRISPRessoWGS from profile page and change header REVERT: 666f73b Remove example block from CRISPRessoWGS submission page REVERT: 27fcc13 Fix bug where amplicon file isn't being uploaded properly in CRISPRessoPooled REVERT: 8d979a4 Fix bug where files_to_delete was being replaced and standardize append REVERT: 09e55fc Changes to make interleaved and pooled tests possible REVERT: f89eca8 Changes necessary for selenium tests REVERT: 3efe4f9 Clean up test files REVERT: a696363 Merge pull request #28 from edilytics/s3 REVERT: dcef708 Remove changes for CRISPRessoCompare REVERT: e0c79cf Add demo config file for eb REVERT: 03aba8e Update AWS EB instructions.docx REVERT: a671c4e Set version to 2.6.3 REVERT: 3bb3a8d Pull out s3 javascript for use in crispresso and crispressopooled REVERT: da5b15b Timezone for history is displayed in user local timezone REVERT: e11691f Update history to show time of previous run REVERT: be675fb Update pooled with s3 REVERT: 4c7d429 Add data links to pooled report REVERT: 353e88f Update admin portal landing page REVERT: 712e828 Show run type in history REVERT: 2802252 s3 and user updates REVERT: efc3ed8 S3 error catching REVERT: af68341 New S3 Validation REVERT: f7d64e0 AWS validation before submission REVERT: 8446093 Update s3 for batch and paired modes REVERT: 0e7d327 S3_Upload function imrpvoed -JF REVERT: b48e0dc Merge branch 's3' of https://github.com/edilytics/C2Web into s3 REVERT: c991d52 added s3 user database model REVERT: ab4aa54 add model for s3 bucket REVERT: 853cda9 S3_Functionality improved -JF REVERT: 2f060a6 Implemented front-end s3 browsing REVERT: e082a5f stub out viewing method REVERT: c5b6d13 Merge pull request #7 from edilytics/check-amplicon-length REVERT: c85a93f Merge pull request #15 from edilytics/wgs-interface REVERT: 712270a Add support for CRISPRessoWGS REVERT: deaacee Extract out function to get server files in submit_routes REVERT: 151eb15 Update crispresso2_info object fields REVERT: b2a974d Bump CRISPResso verion to 2.2.4 REVERT: 58ae313 Merge pull request #10 from edilytics/update-to-crispresso-2.2.2 REVERT: 7f2dc1c Stop trimming json error messages, fix #11 REVERT: d28c03b Update reporting logic to use the new CRISPResso2_info schema REVERT: 03ee46f Bump CRISPResso version in Dockerfile and download release from Github REVERT: 9151c5d Add CRISPRessoPooled report template REVERT: 25a6e37 Merge pull request #6 from edilytics/pooled-interface REVERT: b47d288 Check length of amplicons for hosted version, closes #4 REVERT: 54c28b6 Update submission file extension check REVERT: 8fcadee Add a link to CRISPRessoPooled interface in user dashboard REVERT: 7fd0283 Implement CRISPRessoPooled backend and report functionality REVERT: 4063eb3 Modify submission.js to accept .txt and .tsv files REVERT: b770323 Create template file for CRISPRessoPooled submission interface REVERT: d4f2ed0 Merge pull request #5 from edilytics/flask-modularization REVERT: 8527384 Convert some celery configurations settings to new format REVERT: 962a209 Install less and vim in Dockerfile REVERT: c693668 Read CRISPResso2_info from json files instead of pickle files REVERT: a469e08 Move LoginManager to user_routes.py REVERT: f62e67a Create db tables in init_db.py REVERT: 0d85c90 Move login_required to user_routes REVERT: 6f5e33e Reformatting of remaining __init__.py REVERT: e615c0b Extract report routes out of __init__.py REVERT: 20f2601 Extract user routes out from __init__.py REVERT: 5582612 Extract status routes out from __init__.py REVERT: 2406a10 Extract submit routes out from __init__.py REVERT: b562fcd Extract celery tasks from __init__.py REVERT: faa785d Extract views out from __init__.py REVERT: ff44576 Extract model classes out from __init__.py REVERT: 914498f Merge pull request #3 from edilytics/2to3 REVERT: 86ea7da Replace RabbitMQ with Redis REVERT: adca9fb Upgrade celery to version 5.0.5 REVERT: 244ec33 Convert from Python 2 to Python 3 REVERT: 28b4f37 Refactor Docker image to use Python 3 via micromamba REVERT: 2359800 Allow interleaved batches REVERT: 428720b Add features: Allow admin init, server discovery depth REVERT: 11df5d8 Client and server-side checks for invalid characters on sgRNA and amplicon REVERT: 5062365 Update README.md REVERT: 51e02f4 Update README.md REVERT: ac4a6d5 delete other images REVERT: 4f3ad88 Update README.md REVERT: fc0de1d Update README.md REVERT: 08defa1 Update README.md REVERT: 9604983 Trycatch pickle loads REVERT: c1facd7 get rid of debug print of email REVERT: d699d4d crispresso2.0.45 REVERT: e7ff079 Update param descriptions REVERT: 1f12d59 2.0.44 REVERT: b81febe crispresso to 2.0.42 REVERT: 1a967a8 update report REVERT: 178c56d 2.4 REVERT: e41076d Job expiration REVERT: 41d1a4c check progress on setinterval REVERT: 756e488 server-side files REVERT: ad19c3c Update to crispresso 2.0.40 prime editing REVERT: e3a194a update errors and ignore email config REVERT: 2efb0bb Update README.md REVERT: 58844a6 initial commit REVERT: 8ff1878 Initial commit git-subtree-dir: CRISPRessoWEB/CRISPRessoReports git-subtree-split: 13f7ae215990b155ecf9b7659800f3790407ebc2 --- templates/batchReport.html | 2 +- templates/layout.html | 456 +++---- templates/multiReport.html | 456 +++---- templates/pooledReport.html | 2 +- templates/report.html | 1359 ++++++++++---------- templates/shared/partials/fig_reports.html | 14 +- templates/shared/partials/log_params.html | 16 +- templates/wgsReport.html | 2 +- 8 files changed, 1179 insertions(+), 1128 deletions(-) diff --git a/templates/batchReport.html b/templates/batchReport.html index cb9d4aa0..d02c6269 100644 --- a/templates/batchReport.html +++ b/templates/batchReport.html @@ -148,7 +148,7 @@
{{report_data['titles'][plot_name]}}
{# data bit for web version: #} {# -

Data: {{data_label}}

+

Data: {{data_label}}

#} {# jumbotron_content #} {# jumbrotron #} diff --git a/templates/layout.html b/templates/layout.html index 16551f22..4a10539a 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -1,237 +1,247 @@ - - CRISPResso2 - - - - - - - - - - - - - - - - - - - - - - - {% if current_user is defined %} - - {% else %} - - {% endif %} - - - - - {% block head %}{% endblock %} - - - - - {% if current_user is defined %} -
- {{ self.help_block() }} -
- - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} - {% if category == "error" %} - - {% else %} - - {% endif %} - {% endfor %} - {% endif %} - {% endwith %} - {% endif %} - - {# if default user (normal crispresso mode) #} - {% if current_user == null or not current_user.is_anonymous and current_user.username == "DEFAULTUSER" %} - -
-
-
- {% if current_user is defined %} -
- {% else %} -
- {% endif %} -
-
-

CRISPResso2

-

Analysis of genome editing outcomes from deep sequencing data

-
-
-
-
- - - {% else %} - {# if doing user sessions #} - +
+ {% endif %} + +
+
+
+
+ {% block help_block %} {% endblock %} +
+
+
+
+ + {% block content %}{% endblock %} + + {% if current_user is defined and (not current_user.is_anonymous and current_user.username == "DEFAULTUSER") %} +
+
+ +
+
+ {% else %} +
+
+ +
+
+ {% endif %}
- - - - - {% block foot %}{% endblock %} - + + + + + {% block foot %}{% endblock %} + diff --git a/templates/multiReport.html b/templates/multiReport.html index 5def61f1..8e8d83ca 100644 --- a/templates/multiReport.html +++ b/templates/multiReport.html @@ -1,44 +1,44 @@ {% extends "layout.html" %} {% block head %} {% endblock %} @@ -47,213 +47,213 @@
-
-
+
+
- {% if run_names|length > 0 %} -
-
-
{{report_name}}
-
-
-
- {% for run_name in run_names %} - {{run_name}} - {% endfor %} -
-
-
- {% endif %} - - {% if window_nuc_pct_quilts|length > 0 %} -
-
-
Nucleotide percentages around guides
-
-
- {% for plot_name in window_nuc_pct_quilts %} -
{{report_data['titles'][plot_name]}}
- {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} - {% endfor %} -
-
- {% endif %} - - {% if nuc_pct_quilts|length > 0 %} -
-
-
Nucleotide percentages in the entire amplicon
-
-
- {% for plot_name in nuc_pct_quilts %} -
{{report_data['titles'][plot_name]}}
- {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} - {% endfor %} -
-
- {% endif %} + {% if run_names|length > 0 %} +
+
+
{{report_name}}
+
+
+
+ {% for run_name in run_names %} + {{run_name}} + {% endfor %} +
+
+
+ {% endif %} - {% if window_nuc_conv_plots|length > 0 %} -
-
-
Conversion of target bases around guides
-
-
- {% for plot_name in window_nuc_conv_plots %} -
{{report_data['titles'][plot_name]}}
- {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} - {% endfor %} -
-
- {% endif %} + {% if window_nuc_pct_quilts|length > 0 %} +
+
+
Nucleotide percentages around guides
+
+
+ {% for plot_name in window_nuc_pct_quilts %} +
{{report_data['titles'][plot_name]}}
+ {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} + {% endfor %} +
+
+ {% endif %} - {% if nuc_conv_plots|length > 0 %} -
-
-
Conversion of target bases in the entire amplicon
-
-
- {% for plot_name in nuc_conv_plots %} -
{{report_data['titles'][plot_name]}}
- {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} - {% endfor %} -
-
- {% endif %} + {% if nuc_pct_quilts|length > 0 %} +
+
+
Nucleotide percentages in the entire amplicon
+
+
+ {% for plot_name in nuc_pct_quilts %} +
{{report_data['titles'][plot_name]}}
+ {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} + {% endfor %} +
+
+ {% endif %} - {% if report_data['names']|length > 0 %} - {% for plot_name in report_data['names'] %} -
-
-
{{report_data['titles'][plot_name]}}
-
-
- {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} -
-
- {% endfor %} - {% endif %} + {% if window_nuc_conv_plots|length > 0 %} +
+
+
Conversion of target bases around guides
+
+
+ {% for plot_name in window_nuc_conv_plots %} +
{{report_data['titles'][plot_name]}}
+ {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} + {% endfor %} +
+
+ {% endif %} - {% if allele_modification_heatmap_plot_names|length > 0 %} - {% for heatmap_plot_name in allele_modification_heatmap_plot_names %} - {% set line_plot_name = allele_modification_line_plot_names[loop.index - 1] %} - {% set modification_type = heatmap_plot_name.split('_')[3] %} -
-
-
{{allele_modification_heatmap_plot_titles[heatmap_plot_name]}}
- -
-
-
-
- {{allele_modification_heatmap_plot_htmls[heatmap_plot_name]}} - - {% for (data_label, data_path) in allele_modification_heatmap_plot_datas[heatmap_plot_name] %} -

Data: {{data_label}}

- {% endfor %} + {% if nuc_conv_plots|length > 0 %} +
+
+
Conversion of target bases in the entire amplicon
+
+
+ {% for plot_name in nuc_conv_plots %} +
{{report_data['titles'][plot_name]}}
+ {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} + {% endfor %} +
-
- {{allele_modification_line_plot_htmls[line_plot_name]}} - - {% for (data_label, data_path) in allele_modification_line_plot_datas[line_plot_name] %} -

Data: {{data_label}}

- {% endfor %} + {% endif %} + + {% if report_data['names']|length > 0 %} + {% for plot_name in report_data['names'] %} +
+
+
{{report_data['titles'][plot_name]}}
+
+
+ {{ render_partial('shared/partials/fig_summaries.html', report_data=report_data, plot_name=plot_name) }} +
-
-
-
- - {% endfor %} - - - - {% endif %} + {% endfor %} + {% endif %} - {% if compact_plots_to_show|length > 0 %} -
-
-
Summary Plots
-
-
-
- {% for compact_plot in compact_plots_to_show %} - + {% if allele_modification_heatmap_plot_names|length > 0 %} + {% for heatmap_plot_name in allele_modification_heatmap_plot_names %} + {% set line_plot_name = allele_modification_line_plot_names[loop.index - 1] %} + {% set modification_type = heatmap_plot_name.split('_')[3] %} +
+
+
{{allele_modification_heatmap_plot_titles[heatmap_plot_name]}}
+ +
+
+
+
+ {{allele_modification_heatmap_plot_htmls[heatmap_plot_name]}} + + {% for (data_label, data_path) in allele_modification_heatmap_plot_datas[heatmap_plot_name] %} +

Data: {{data_label}}

+ {% endfor %} +
+
+ {{allele_modification_line_plot_htmls[line_plot_name]}} + + {% for (data_label, data_path) in allele_modification_line_plot_datas[line_plot_name] %} +

Data: {{data_label}}

+ {% endfor %} +
+
+
+
+ {% endfor %} -
-
-
- {% endif %} + + + + {% endif %} + + {% if compact_plots_to_show|length > 0 %} +
+
+
Summary Plots
+
+
+
+ {% for compact_plot in compact_plots_to_show %} + + {% endfor %} +
+
+
+ {% endif %} -
+
-
+
-
{# jumbotron_content #} +
{# jumbotron_content #}
{# jumbrotron #}
{# column #} diff --git a/templates/pooledReport.html b/templates/pooledReport.html index e6817601..f4550e82 100644 --- a/templates/pooledReport.html +++ b/templates/pooledReport.html @@ -86,7 +86,7 @@
{{report_data['titles'][plot_name]}}
{# data bit for web version: #} {# -

Data: {{data_label}}

+

Data: {{data_label}}

#} {# jumbotron_content #} {# jumbrotron #} diff --git a/templates/report.html b/templates/report.html index 3b998cec..cba74dc2 100644 --- a/templates/report.html +++ b/templates/report.html @@ -1,51 +1,74 @@ {% extends "layout.html" %} {% block head %} {% endblock %} @@ -53,540 +76,540 @@ {% block content %}
-
-
-
-
- {% if report_data['report_display_name'] != '' %} -
{{report_data['report_display_name']}}
- {% endif %} -
CRISPResso2 run information
- -
-
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1a', width='40%')}} -
- {{ render_partial('shared/partials/log_params.html', report_data=report_data) }} -
-
-
- -
-
-
Allele assignments
- -
-
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1b', width='40%')}} -
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1c', width='40%')}} -
- {% if report_data['figures']['locs']['plot_1d'] %} -
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1d', width='40%')}} -
- {% endif %} -
-
-
{# end card #} - - {# start global coding sequence report #} - {% if report_data['figures']['locs']['plot_5a'] %} -
-
-
Global frameshift analysis
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_5a', width='40%')}} -
-
- {% endif %} - - {% if report_data['figures']['locs']['plot_6a'] %} -
-
-
Global frameshift mutagenesis profiles
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_6a', width='40%')}} -
-
- {% endif %} - - {% if report_data['figures']['locs']['plot_8a'] %} -
-
-
Global splicing analysis
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_8a', width='40%')}} -
-
- {% endif %} - {# end of global coding sequence analysis #} - - {# start hdr summary #} - {% if report_data['figures']['locs'][report_data.amplicons[0]]['plot_4g'] %} -
-
- {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} -
HDR summary plot
- {% else %} -
HDR summary report (all reads aligned to {{report_data.amplicons[0]}})
- {% endif %} -
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_4g', width='40%', amplicon_name=report_data.amplicons[0])}} -
-
- {% endif %} - {# end HDR summary #} - - {# start prime editing report #} - {% if report_data['figures']['locs'][report_data.amplicons[0]]['plot_11a'] %} -
-
- {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} -
Prime editing report
- {% else %} -
Prime editing report (all reads aligned to {{report_data.amplicons[0]}})
- {% endif %} -
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_11a', width='40%', amplicon_name=report_data.amplicons[0])}} -
-
- {% endif %} - - {% if report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]] and report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]]['11b']%} -
-
- {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} -
Prime editing summary plots at analysis positions
- {% else %} -
Prime editing summary plots at analysis positions (aligned to {{report_data.amplicons[0]}})
- {% endif %} -
-
- {% for fig_name in report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]]['11b'] %} -
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name=fig_name, width='40%', amplicon_name=report_data.amplicons[0])}} -
- {% endfor %} -
-
- {% endif %} - {# end plot 11b for prime editing #} - - {% if report_data['figures']['locs']['plot_11c'] %} -
-
-
Scaffold insertions
-
-
- {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_11c', width='40%')}} -
-
- {% endif %} - {# end prime editing section #} - - {% if report_data.amplicons|length == 1 %} -
{# if only one amplicon, just a normal div #} - {% else %} - {# If there is more than one amplicon, print a navigation to show each amplicon #} -

Reads are aligned to each amplicon sequence separately. Quantification and visualization of these reads are shown for each amplicon below:

-
-
-
Amplicons
- -
- {% endif %} {# end if report contains more than one amplicon #} - - - {% if report_data.amplicons|length == 1 %} {# if only one amplicon, just a normal div #} -
- {% else %} - {# jumbotron_content #} -
{# jumbrotron #} -
{# column #} +
+
+
+
+ {% if report_data['report_display_name'] != '' %} +
{{report_data['report_display_name']}}
+ {% endif %} +
CRISPResso2 run information
+ +
+
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1a')}} +
+ {{ render_partial('shared/partials/log_params.html', report_data=report_data) }} +
+
+
+ +
+
+
Allele assignments
+ +
+
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1b')}} +
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1c')}} +
+ {% if report_data['figures']['locs']['plot_1d'] %} +
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_1d')}} +
+ {% endif %} +
+
+
{# end card #} + + {# start global coding sequence report #} + {% if report_data['figures']['locs']['plot_5a'] %} +
+
+
Global frameshift analysis
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_5a')}} +
+
+ {% endif %} + + {% if report_data['figures']['locs']['plot_6a'] %} +
+
+
Global frameshift mutagenesis profiles
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_6a')}} +
+
+ {% endif %} + + {% if report_data['figures']['locs']['plot_8a'] %} +
+
+
Global splicing analysis
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_8a')}} +
+
+ {% endif %} + {# end of global coding sequence analysis #} + + {# start hdr summary #} + {% if report_data['figures']['locs'][report_data.amplicons[0]]['plot_4g'] %} +
+
+ {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} +
HDR summary plot
+ {% else %} +
HDR summary report (all reads aligned to {{report_data.amplicons[0]}})
+ {% endif %} +
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_4g', amplicon_name=report_data.amplicons[0])}} +
+
+ {% endif %} + {# end HDR summary #} + + {# start prime editing report #} + {% if report_data['figures']['locs'][report_data.amplicons[0]]['plot_11a'] %} +
+
+ {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} +
Prime editing report
+ {% else %} +
Prime editing report (all reads aligned to {{report_data.amplicons[0]}})
+ {% endif %} +
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_11a', amplicon_name=report_data.amplicons[0])}} +
+
+ {% endif %} + + {% if report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]] and report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]]['11b']%} +
+
+ {% if report_data.amplicons|length == 1 %} {# if only one amplicon #} +
Prime editing summary plots at analysis positions
+ {% else %} +
Prime editing summary plots at analysis positions (aligned to {{report_data.amplicons[0]}})
+ {% endif %} +
+
+ {% for fig_name in report_data['figures']['sgRNA_based_names'][report_data.amplicons[0]]['11b'] %} +
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name=fig_name, amplicon_name=report_data.amplicons[0])}} +
+ {% endfor %} +
+
+ {% endif %} + {# end plot 11b for prime editing #} + + {% if report_data['figures']['locs']['plot_11c'] %} +
+
+
Scaffold insertions
+
+
+ {{ render_partial('shared/partials/fig_reports.html', report_data=report_data, fig_name='plot_11c')}} +
+
+ {% endif %} + {# end prime editing section #} + + {% if report_data.amplicons|length == 1 %} +
{# if only one amplicon, just a normal div #} + {% else %} + {# If there is more than one amplicon, print a navigation to show each amplicon #} +

Reads are aligned to each amplicon sequence separately. Quantification and visualization of these reads are shown for each amplicon below:

+
+
+
Amplicons
+ +
+ {% endif %} {# end if report contains more than one amplicon #} + + + {% if report_data.amplicons|length == 1 %} {# if only one amplicon, just a normal div #} +
+ {% else %} + {# jumbotron_content #} +
{# jumbrotron #} +
{# column #}
@@ -594,100 +617,100 @@
Base editing for {{amplicon_name}}
{% block foot %} +function updateZoom(e) { + /*prevent any other actions that may occur when moving over the image:*/ +// e.preventDefault(); + var img = e.target.imgObj + var view = e.target.viewObj + var lens = e.target.lensObj + + if (!lens.hasWidthSet) + { + view_height = $('#'+view.id).height() + view_width = $('#'+view.id).width() + img_height = $('#'+img.id).height() + img_width = $('#'+img.id).width() + lens_height = $('#'+lens.id).height() + lens_width = $('#'+lens.id).width() + + new_width = img_height * view_width/view_height //make up for loss of precision + $('#'+lens.id).outerWidth(new_width) + lens.hasWidthSet = true + + cx = view_width / new_width + + view.view_height = view_height + view.view_width = view_width + img.img_height = img_height + img.img_width = img_width + lens.lens_height = lens_height + lens.lens_width = new_width + + } + + var pos, x, y; + /*get the cursor's x and y positions:*/ + pos = getCursorPos(e,img); + /*calculate the position of the lens:*/ + x = pos.x - (lens.lens_width / 2); + /*prevent the lens from being positioned outside the image:*/ + if (x > img.img_width - lens.lens_width) {x = img.img_width - lens.lens_width;; + } + if (x < 0) {x = 0;} + lens.style.left = x + "px"; + view.style.backgroundPosition = "-" + (x * cx) + "px 0px"; +} + +function getCursorPos(e,img) { + var a, x = 0, y = 0; + e = e || window.event; + /*get the x and y positions of the image:*/ + a = img.getBoundingClientRect(); + /*calculate the cursor's x and y coordinates, relative to the image:*/ + x = e.pageX - a.left; + y = e.pageY - a.top; + /*consider any page scrolling:*/ + x = x - window.pageXOffset; + y = y - window.pageYOffset; + return {x : x, y : y}; +} + +var passiveSupported = false; +try { + var options = { + get passive() { // This function will be called when the browser + // attempts to access the passive property. + passiveSupported = true; + } + }; + + window.addEventListener("test", options, options); + window.removeEventListener("test", options, options); +} catch(err) { + passiveSupported = false; +} + + {% for amplicon_name in report_data.amplicons %} + {% if report_data['figures']['locs'][amplicon_name]['plot_2a'] %} + view = document.getElementById('zoomview_nucs_{{amplicon_name}}'); + img = document.getElementById('tozoom_nucs_{{amplicon_name}}'); + lens = document.getElementById('zoomlens_nucs_{{amplicon_name}}') + + img.viewObj = view + img.lensObj = lens + img.imgObj = img + + lens.viewObj = view + lens.lensObj = lens + lens.imgObj = img + + lens.addEventListener("mousemove", updateZoom, passiveSupported? { passive: true } : false); + img.addEventListener("mousemove", updateZoom, passiveSupported? { passive: true } : false); + /*and also for touch screens:*/ + lens.addEventListener("touchmove", updateZoom, passiveSupported? { passive: true } : false); + img.addEventListener("touchmove", updateZoom, passiveSupported? { passive: true } : false); + + {% endif %} + {% endfor %} + {% endblock %} diff --git a/templates/shared/partials/fig_reports.html b/templates/shared/partials/fig_reports.html index e9057e16..6f7e448e 100644 --- a/templates/shared/partials/fig_reports.html +++ b/templates/shared/partials/fig_reports.html @@ -1,10 +1,13 @@
-
{% if amplicon_name is defined %} {% if 'htmls' in report_data['figures'] and fig_name in report_data['figures']['htmls'][amplicon_name] %} {{report_data['figures']['htmls'][amplicon_name][fig_name]|safe}} {% else %} - + {% if fig_name in ['plot_1a', 'plot_1b', 'plot_1c', 'plot_3a', 'plot_4a', 'plot_4b', 'plot_4c'] %} + + {% else %} + + {% endif %} {% endif %} {% for (data_label,data_path) in report_data['figures']['datas'][amplicon_name][fig_name] %} @@ -14,12 +17,15 @@ {% if 'htmls' in report_data['figures'] and fig_name in report_data['figures']['htmls'] %} {{report_data['figures']['htmls'][fig_name]|safe}} {% else %} - + {% if fig_name in ['plot_1a', 'plot_1b', 'plot_1c', 'plot_3a', 'plot_4a', 'plot_4b', 'plot_4c'] %} + + {% else %} + + {% endif %} {% endif %} {% for (data_label,data_path) in report_data['figures']['datas'][fig_name] %}

Data: {{data_label}}

{% endfor %} {% endif %} -
\ No newline at end of file diff --git a/templates/shared/partials/log_params.html b/templates/shared/partials/log_params.html index ad035ae3..43a0cc5f 100644 --- a/templates/shared/partials/log_params.html +++ b/templates/shared/partials/log_params.html @@ -1,11 +1,23 @@ -
+

CRISPResso version: {{report_data['run_data']['running_info']['version']}}

Run completed: {{report_data['run_data']['running_info']['end_time_string']}}

Amplicon sequence:

{{report_data['run_data']['running_info']['args']['amplicon_seq']}}

{% if report_data['run_data']['running_info']['args']['guide_seq'] != '' %} -

Guide sequence:

{{report_data['run_data']['running_info']['args']['guide_seq']}}

+

Guide sequence:

{{report_data['run_data']['running_info']['args']['guide_seq']}}

{% endif %}

Command used:

{{report_data['run_data']['running_info']['command_used']}}

Parameters:

{{report_data['run_data']['running_info']['args_string']}}

Running log

+ + diff --git a/templates/wgsReport.html b/templates/wgsReport.html index 2f11c5f1..0a5a1277 100644 --- a/templates/wgsReport.html +++ b/templates/wgsReport.html @@ -84,7 +84,7 @@
{{report_data['titles'][plot_name]}}
{# data bit for web version: #} {# -

Data: {{data_label}}

+

Data: {{data_label}}

#} {# jumbotron_content #} {# jumbrotron #}