From ac623a84a5978be429c3076ce851039c2632f8c9 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:01:33 +0200 Subject: [PATCH 01/13] wc: Force to round all scores values to the 2nd decimal point in hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index a8ac5468d..ca54718d7 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -182,7 +182,10 @@ class HRDetectView extends LitElement { }, { title: "value", - field: "value" + field: "value", + display: { + format: value => value.toFixed(2), + }, }, ], }, From 89564034c6e2db0ee8a0e93181d1f893e655c2d1 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:02:08 +0200 Subject: [PATCH 02/13] wc: Remove commented code in hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index ca54718d7..bfef31067 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -173,7 +173,6 @@ class HRDetectView extends LitElement { field: "scores", type: "table", display: { - // style: "width:auto", showHeader: false, columns: [ { From b3b830d6cee5ee54bf0f35d04cbc19b2f2e126cc Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:08:10 +0200 Subject: [PATCH 03/13] wc: Remove intercept row in scores table of hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index bfef31067..5923b6060 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -174,6 +174,7 @@ class HRDetectView extends LitElement { type: "table", display: { showHeader: false, + filter: data => (data || []).filter(row => row.key !== "intercept"), columns: [ { title: "key", From c36b90fab4a5a254b78055e1cea21440220f0fb1 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:19:16 +0200 Subject: [PATCH 04/13] wc: Promote Probability to a separate field in hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index 5923b6060..34f788d97 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -168,6 +168,15 @@ class HRDetectView extends LitElement { render: indelQuery => this.renderQuery(indelQuery), }, }, + { + name: "Probability", + field: "scores", + display: { + format: scores => { + return scores.find(row => row.key?.toLowerCase?.() === "probability")?.value?.toFixed?.(2) || "-"; + }, + }, + }, { name: "Scores", field: "scores", From c6b053bd9641c8aa1301fe6de4f6b72d2bbd90ee Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:21:13 +0200 Subject: [PATCH 05/13] wc: Remove Probability row from scores table #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index 34f788d97..ec45d67ab 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -183,7 +183,9 @@ class HRDetectView extends LitElement { type: "table", display: { showHeader: false, - filter: data => (data || []).filter(row => row.key !== "intercept"), + filter: data => { + return (data || []).filter(row => !["intercept", "probability"].includes(row?.key?.toLowerCase?.())); + }, columns: [ { title: "key", From 1ef296dd4d0883a9d142f16cbff4d8f7c5752b92 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:24:09 +0200 Subject: [PATCH 06/13] wc: Minor code style fix in hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index ec45d67ab..9d384e620 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -183,9 +183,9 @@ class HRDetectView extends LitElement { type: "table", display: { showHeader: false, - filter: data => { - return (data || []).filter(row => !["intercept", "probability"].includes(row?.key?.toLowerCase?.())); - }, + filter: data => (data || []).filter(row => { + return !["intercept", "probability"].includes(row?.key?.toLowerCase?.()); + })}, columns: [ { title: "key", From 7b2c8ec6bf94c5ef9603457bf0685b1d42c387c9 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:30:56 +0200 Subject: [PATCH 07/13] wc: Fix extra curly brace in filter method of scores table config #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index 9d384e620..6d13462ac 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -185,7 +185,7 @@ class HRDetectView extends LitElement { showHeader: false, filter: data => (data || []).filter(row => { return !["intercept", "probability"].includes(row?.key?.toLowerCase?.()); - })}, + }), columns: [ { title: "key", From ff3a9e5591658cf47366b25d0778a54341e10bd1 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:31:30 +0200 Subject: [PATCH 08/13] wc: Add transform method to sort scores table in hrdetect-view #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index 6d13462ac..edb80b380 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -186,6 +186,7 @@ class HRDetectView extends LitElement { filter: data => (data || []).filter(row => { return !["intercept", "probability"].includes(row?.key?.toLowerCase?.()); }), + transform: data => data.toSorted((a, b) => b.value - a.value), columns: [ { title: "key", From a199b9b4e993f342d1b725a5bed65282661e0009 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 12:34:08 +0200 Subject: [PATCH 09/13] wc: Rename Scores section title to Contributions #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-view.js b/src/webcomponents/clinical/analysis/hrdetect-view.js index edb80b380..e3178df7d 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-view.js +++ b/src/webcomponents/clinical/analysis/hrdetect-view.js @@ -178,7 +178,7 @@ class HRDetectView extends LitElement { }, }, { - name: "Scores", + name: "Contributions", field: "scores", type: "table", display: { From 920c580e995a1fff3857139bf9bb93adf3783c3e Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 13:02:35 +0200 Subject: [PATCH 10/13] wc: Remove the field Fit Signatures File from mutational signatures analysis form #TASK-6927 #TASK-6838 --- .../analysis/mutational-signature-analysis.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/webcomponents/clinical/analysis/mutational-signature-analysis.js b/src/webcomponents/clinical/analysis/mutational-signature-analysis.js index ba4ccac2a..ce0533af8 100644 --- a/src/webcomponents/clinical/analysis/mutational-signature-analysis.js +++ b/src/webcomponents/clinical/analysis/mutational-signature-analysis.js @@ -163,7 +163,6 @@ export default class MutationalSignatureAnalysis extends LitElement { fitNBoot: this.toolParams.fitNBoot, fitThresholdPerc: this.toolParams.fitThresholdPerc, fitThresholdPval: this.toolParams.fitThresholdPval, - fitSignaturesFile: this.toolParams.fitSignaturesFile, fitRareSignaturesFile: this.toolParams.fitRareSignaturesFile, }; @@ -411,24 +410,6 @@ export default class MutationalSignatureAnalysis extends LitElement { field: "fitNBoot", type: "input-text", }, - { - title: "Fit Signatures File", - field: "fitSignaturesFile", - type: "custom", - display: { - render: (fitSignaturesFile, dataFormFilterChange) => html` - - - `, - }, - }, { title: "Fit Rare Signatures File", field: "fitRareSignaturesFile", From 5fb76fa3e9f86df3b7b857aa9bc9a348ad312661 Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 13:03:00 +0200 Subject: [PATCH 11/13] wc: Remove the field Fit Rare Signatures File from mutational signatures analysis form #TASK-6927 #TASK-6838 --- .../analysis/mutational-signature-analysis.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/webcomponents/clinical/analysis/mutational-signature-analysis.js b/src/webcomponents/clinical/analysis/mutational-signature-analysis.js index ce0533af8..0ca4931d3 100644 --- a/src/webcomponents/clinical/analysis/mutational-signature-analysis.js +++ b/src/webcomponents/clinical/analysis/mutational-signature-analysis.js @@ -163,7 +163,6 @@ export default class MutationalSignatureAnalysis extends LitElement { fitNBoot: this.toolParams.fitNBoot, fitThresholdPerc: this.toolParams.fitThresholdPerc, fitThresholdPval: this.toolParams.fitThresholdPval, - fitRareSignaturesFile: this.toolParams.fitRareSignaturesFile, }; // Check if we have provided an existing signature list @@ -410,24 +409,6 @@ export default class MutationalSignatureAnalysis extends LitElement { field: "fitNBoot", type: "input-text", }, - { - title: "Fit Rare Signatures File", - field: "fitRareSignaturesFile", - type: "custom", - display: { - render: (fitRareSignaturesFile, dataFormFilterChange) => html` - - - `, - }, - }, ] } ]; From 45f962f00bbe6fe3c306e60edb1a1799949cdb7b Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 13:19:42 +0200 Subject: [PATCH 12/13] wc: Remove some fields in hrdetect analysis form #TASK-6927 #TASK-6838 --- .../clinical/analysis/hrdetect-analysis.js | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-analysis.js b/src/webcomponents/clinical/analysis/hrdetect-analysis.js index 39cdd5890..8eb3c6e03 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-analysis.js +++ b/src/webcomponents/clinical/analysis/hrdetect-analysis.js @@ -115,10 +115,6 @@ export default class HRDetectAnalysis extends LitElement { sampleId: this.toolParams.query?.sample, snvFittingId: this.toolParams.snvFittingId, svFittingId: this.toolParams.svFittingId, - snv3CustomName: this.toolParams.snv3CustomName || "", - snv8CustomName: this.toolParams.snv8CustomName || "", - sv3CustomName: this.toolParams.sv3CustomName || "", - sv8CustomName: this.toolParams.sv8CustomName || "", bootstrap: !!this.toolParams.bootstrap, }; @@ -292,46 +288,6 @@ export default class HRDetectAnalysis extends LitElement { { title: "Advanced Parameters", elements: [ - { - title: "SNV3 Custom Name", - field: "snv3CustomName", - type: "input-text", - display: { - help: { - text: "Custom signature name that will be considered as SNV3 input for HRDetect.", - }, - }, - }, - { - title: "SNV8 Custom Name", - field: "snv8CustomName", - type: "input-text", - display: { - help: { - text: "Custom signature name that will be considered as SNV8 input for HRDetect.", - }, - }, - }, - { - title: "SV3 Custom Name", - field: "sv3CustomName", - type: "input-text", - display: { - help: { - text: "Custom signature name that will be considered as SV3 input for HRDetect.", - }, - }, - }, - { - title: "SV8 Custom Name", - field: "sv8CustomName", - type: "input-text", - display: { - help: { - text: "Custom signature name that will be considered as SV8 input for HRDetect.", - }, - }, - }, { title: "Bootstrap", field: "bootstrap", From 24cba8a3e7b707a003b6bd13a801d82182b509ef Mon Sep 17 00:00:00 2001 From: Josemi Date: Fri, 20 Sep 2024 13:20:26 +0200 Subject: [PATCH 13/13] wc: Rename advanced parameters section in hrdetect analysis form #TASK-6927 #TASK-6838 --- src/webcomponents/clinical/analysis/hrdetect-analysis.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webcomponents/clinical/analysis/hrdetect-analysis.js b/src/webcomponents/clinical/analysis/hrdetect-analysis.js index 8eb3c6e03..6b4aa6a19 100644 --- a/src/webcomponents/clinical/analysis/hrdetect-analysis.js +++ b/src/webcomponents/clinical/analysis/hrdetect-analysis.js @@ -286,7 +286,7 @@ export default class HRDetectAnalysis extends LitElement { ], }, { - title: "Advanced Parameters", + title: "HRDetect Parameters", elements: [ { title: "Bootstrap",