From 8e84a62c39d12fcb8509ea246012088645ef6213 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Tue, 12 Nov 2024 11:10:42 +1100 Subject: [PATCH 01/10] update comparison report --- assets/comparison_template.html | 50 +++++++++++++++++-------------- bin/generate_comparison_report.py | 2 +- bin/generate_report.py | 2 +- 3 files changed, 30 insertions(+), 24 deletions(-) diff --git a/assets/comparison_template.html b/assets/comparison_template.html index 44158b03..fbf416b1 100644 --- a/assets/comparison_template.html +++ b/assets/comparison_template.html @@ -1,4 +1,4 @@ - + @@ -49,10 +49,6 @@ rgba(3, 30, 148, 1) 100% ); } - #lddt_container .modebar { - display: flex !important; - flex-direction: row !important; - } @@ -63,13 +59,13 @@ -->
Protein structure comparison
-
+
-
+
-
+
-->
-
+
Navigation
@@ -257,10 +253,8 @@
-
-
+
+
@@ -308,14 +302,12 @@
pLDDT
-
-
-
-
+
+
-
+
Sequence Coverage
@@ -693,7 +685,7 @@ bubbles: true, cancelable: true, view: window, - }), + }) ); document.body.removeChild(saveLink); }; @@ -774,6 +766,18 @@ function generateImages() { const container = document.getElementById("seq_coverage_container"); SEQ_COV_IMGS.forEach((item, index) => { + const plotContainer = document.createElement("div"); + + const label = document.createElement("div"); + label.className = "font-semibold mb-2"; + + if (MODELS[index].includes("colabfold")) { + if (!MODELS[index + 1]) return; + label.textContent = MODELS[index + 1].replace(".pdb", ""); + } else { + label.textContent = MODELS[index].replace(".pdb", ""); + } + const imgContainer = document.createElement("div"); imgContainer.className = "w-[660px] h-auto p-6 bg-white shadow-md rounded items-center"; @@ -782,7 +786,9 @@ img.alt = `Sequence Coverage Image ${index + 1}`; imgContainer.append(img); - container.append(imgContainer); + plotContainer.append(label); + plotContainer.append(imgContainer); + container.append(plotContainer); }); } diff --git a/bin/generate_comparison_report.py b/bin/generate_comparison_report.py index bea765f9..165f2bdc 100755 --- a/bin/generate_comparison_report.py +++ b/bin/generate_comparison_report.py @@ -50,7 +50,7 @@ def generate_output(plddt_data, name, out_dir, generate_tsv, pdb): linecolor="black", gridcolor="WhiteSmoke", ), - legend=dict(y=0, x=1), + legend=dict(yanchor="bottom", y=0.02, xanchor="right", x=1, bordercolor="Black", borderwidth=1), plot_bgcolor="white", width=600, height=600, diff --git a/bin/generate_report.py b/bin/generate_report.py index b6cfa390..93fad4a6 100755 --- a/bin/generate_report.py +++ b/bin/generate_report.py @@ -120,7 +120,7 @@ def generate_output_images(msa_path, plddt_data, name, out_dir, in_type, generat linecolor="black", gridcolor="WhiteSmoke", ), - legend=dict(yanchor="bottom", y=0, xanchor="right", x=1.3), + legend=dict(yanchor="bottom", y=0.02, xanchor="right", x=1, bordercolor="Black", borderwidth=1), plot_bgcolor="white", width=600, height=600, From c30741bb1c1a57526228154bcc9c41259d67da17 Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Tue, 12 Nov 2024 13:31:26 +1100 Subject: [PATCH 02/10] update proteinfold template --- assets/proteinfold_template.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/assets/proteinfold_template.html b/assets/proteinfold_template.html index 2bb4c6ff..f2c70162 100644 --- a/assets/proteinfold_template.html +++ b/assets/proteinfold_template.html @@ -1,4 +1,4 @@ - + @@ -71,8 +71,8 @@ -->
Protein structure prediction
@@ -177,7 +177,7 @@
@@ -406,9 +406,7 @@
-
+
Sequence Coverage
@@ -793,7 +791,7 @@ bubbles: true, cancelable: true, view: window, - }), + }) ); document.body.removeChild(saveLink); }; From c997f44ed5447da16622c82555b4b0db7053c0ad Mon Sep 17 00:00:00 2001 From: Minh Vu Date: Tue, 12 Nov 2024 14:01:33 +1100 Subject: [PATCH 03/10] update navbar --- assets/comparison_template.html | 14 ++++++++------ assets/proteinfold_template.html | 12 +++++++----- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/assets/comparison_template.html b/assets/comparison_template.html index fbf416b1..3f097241 100644 --- a/assets/comparison_template.html +++ b/assets/comparison_template.html @@ -53,19 +53,21 @@ -