From 6cbb615ce12d96cca598941d69ba9d7a2cf13a24 Mon Sep 17 00:00:00 2001 From: gpveronica Date: Tue, 27 Jun 2023 12:08:02 +0200 Subject: [PATCH 1/3] wc - Commented out the Results section Signed-off-by: gpveronica --- src/webcomponents/job/job-view.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webcomponents/job/job-view.js b/src/webcomponents/job/job-view.js index fced4b6818..5df4fbd06d 100644 --- a/src/webcomponents/job/job-view.js +++ b/src/webcomponents/job/job-view.js @@ -345,6 +345,7 @@ export default class JobView extends LitElement { }, ], }, + /* { title: "Results", display: { @@ -360,6 +361,7 @@ export default class JobView extends LitElement { }, ], }, + */ { title: "Job Dependencies", display: { From bce30eb62cfbf333d5bd11921ece739f75608430 Mon Sep 17 00:00:00 2001 From: gpveronica Date: Tue, 27 Jun 2023 12:19:44 +0200 Subject: [PATCH 2/3] wc - Deleted AnalysisRegistry call in render Signed-off-by: gpveronica --- src/webcomponents/job/job-view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/webcomponents/job/job-view.js b/src/webcomponents/job/job-view.js index 5df4fbd06d..bc997128fd 100644 --- a/src/webcomponents/job/job-view.js +++ b/src/webcomponents/job/job-view.js @@ -16,7 +16,6 @@ import {LitElement, html} from "lit"; import UtilsNew from "../../core/utils-new.js"; -import AnalysisRegistry from "../variant/analysis/analysis-registry.js"; import LitUtils from "../commons/utils/lit-utils.js"; import "../commons/forms/data-form.js"; import "./job-detail-log.js"; @@ -356,7 +355,7 @@ export default class JobView extends LitElement { type: "custom", display: { defaultLayout: "vertical", - render: () => AnalysisRegistry.get(this.job.tool.id)?.result(this.job, this.opencgaSession) + render: () => {} }, }, ], From e61d85adc3297776238c8a0982b713d340a754de Mon Sep 17 00:00:00 2001 From: gpveronica Date: Tue, 27 Jun 2023 12:24:32 +0200 Subject: [PATCH 3/3] wc - Moved AnalysisRegistry components to deprecated --- src/sites/iva/iva-app.js | 1 - .../{ => deprecated}/analysis-registry.js | 18 +++++++++--------- .../opencga-knockout-analysis-result.js | 16 +++++++--------- .../knockout-gene-grid.js | 8 ++++---- .../knockout-individual-variants.js | 9 +++------ .../knockout-individual-view.js | 8 ++++---- .../knockout-variant-allele-pairs.js | 9 +++------ .../knockout-variant-individual.js | 10 ++++------ .../knockout-variant-view.js | 12 ++++++------ .../test/knockout.20201029141213.SChLEA.js | 2 +- .../knockout.20201103172343.kFIvpr.gene.js | 0 ...ockout.20201103172343.kFIvpr.individuals.js | 2 +- .../test/opencga-knockout-analysis-result.html | 0 13 files changed, 42 insertions(+), 53 deletions(-) rename src/webcomponents/variant/analysis/{ => deprecated}/analysis-registry.js (65%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-gene-grid.js (97%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-individual-variants.js (94%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-individual-view.js (97%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-variant-allele-pairs.js (94%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-variant-individual.js (92%) rename src/webcomponents/variant/analysis/{ => deprecated}/opencga-knockout-analysis/knockout-variant-view.js (97%) rename src/webcomponents/variant/analysis/{ => deprecated}/test/knockout.20201029141213.SChLEA.js (99%) rename src/webcomponents/variant/analysis/{ => deprecated}/test/knockout.20201103172343.kFIvpr.gene.js (100%) rename src/webcomponents/variant/analysis/{ => deprecated}/test/knockout.20201103172343.kFIvpr.individuals.js (99%) rename src/webcomponents/variant/analysis/{ => deprecated}/test/opencga-knockout-analysis-result.html (100%) diff --git a/src/sites/iva/iva-app.js b/src/sites/iva/iva-app.js index 87d1a03c05..7dc91d8541 100644 --- a/src/sites/iva/iva-app.js +++ b/src/sites/iva/iva-app.js @@ -31,7 +31,6 @@ import UtilsNew from "../../core/utils-new.js"; import NotificationUtils from "../../webcomponents/commons/utils/notification-utils.js"; import NotificationManager from "../../core/notification-manager.js"; -import AnalysisRegistry from "../../webcomponents/variant/analysis/analysis-registry.js"; import "../../webcomponents/clinical/clinical-analysis-browser.js"; import "../../webcomponents/clinical/clinical-analysis-portal.js"; import "../../webcomponents/variant/variant-browser.js"; diff --git a/src/webcomponents/variant/analysis/analysis-registry.js b/src/webcomponents/variant/analysis/deprecated/analysis-registry.js similarity index 65% rename from src/webcomponents/variant/analysis/analysis-registry.js rename to src/webcomponents/variant/analysis/deprecated/analysis-registry.js index 19a972edc4..fac41aac95 100644 --- a/src/webcomponents/variant/analysis/analysis-registry.js +++ b/src/webcomponents/variant/analysis/deprecated/analysis-registry.js @@ -1,5 +1,5 @@ -import OpencgaKnockoutAnalysis from "./deprecated/opencga-knockout-analysis.js"; -import OpencgaRecessiveGeneAnalysis from "./deprecated/opencga-recessive-gene-analysis.js"; +import OpencgaKnockoutAnalysis from "./opencga-knockout-analysis.js"; +import OpencgaRecessiveGeneAnalysis from "./opencga-recessive-gene-analysis.js"; export default class AnalysisRegistry { @@ -17,18 +17,18 @@ export default class AnalysisRegistry { } static get(id) { - const ar = this.registry[id]; + const AR = this.registry[id]; // override the class default result config - if (ar) { - if (ar.result) { - ar.class.result = ar.result; + if (AR) { + if (AR.result) { + AR.class.result = AR.result; } - if (ar.config) { - ar.class.config = {...ar.class.config, ...ar.config}; + if (AR.config) { + AR.class.config = {...AR.class.config, ...AR.config}; } // return Reflect.constructor(ar.class, ar.config) - return new ar.class(ar.config); + return new AR.class(AR.config); } else { console.warn("Analysis Class not found:" + id); } diff --git a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis-result.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis-result.js index 6bed50b666..87f8d3ea51 100644 --- a/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis-result.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis-result.js @@ -19,11 +19,11 @@ import {classMap} from "lit/directives/class-map.js"; import GridCommons from "../../../commons/grid-commons.js"; import UtilsNew from "../../../../core/utils-new.js"; import "../../../commons/analysis/opencga-analysis-tool.js"; -import AnalysisRegistry from "../analysis-registry.js"; +import AnalysisRegistry from "./analysis-registry.js"; import "../../../commons/forms/select-field-filter.js"; -import "../opencga-knockout-analysis/knockout-gene-grid.js"; -import "../opencga-knockout-analysis/knockout-individual-view.js"; -import "../opencga-knockout-analysis/knockout-variant-view.js"; +import "./opencga-knockout-analysis/knockout-gene-grid.js"; +import "./opencga-knockout-analysis/knockout-individual-view.js"; +import "./opencga-knockout-analysis/knockout-variant-view.js"; export default class OpencgaKnockoutAnalysisResult extends LitElement { @@ -71,8 +71,6 @@ export default class OpencgaKnockoutAnalysisResult extends LitElement { } updated(changedProperties) { - if (changedProperties.has("opencgaSession")) { - } if (changedProperties.has("config")) { this._config = {...this.getDefaultConfig(), ...this.config}; this.requestUpdate(); @@ -82,7 +80,7 @@ export default class OpencgaKnockoutAnalysisResult extends LitElement { _changeTab(e) { e.preventDefault(); const tabId = e.currentTarget.dataset.id; - //the selectors are strictly defined to avoid conflics in tabs in children components + // the selectors are strictly defined to avoid conflics in tabs in children components $("#opencga-knockout-analysis-result > div > .content-pills", this).removeClass("active"); $("#opencga-knockout-analysis-result > .content-tab-wrapper > .content-tab", this).hide(); $("#" + this._prefix + tabId, this).show(); @@ -95,11 +93,11 @@ export default class OpencgaKnockoutAnalysisResult extends LitElement { } getDefaultConfig() { - return AnalysisRegistry.get("knockout").config; + // return AnalysisRegistry.get("knockout").config; } render() { - //wait for opencgaSession to be available because inner components use it + // wait for opencgaSession to be available because inner components use it return this.opencgaSession ? html`
diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-gene-grid.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js similarity index 97% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-gene-grid.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js index 9c0e070b75..0f98809b82 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-gene-grid.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-gene-grid.js @@ -16,9 +16,9 @@ import {LitElement, html} from "lit"; import {classMap} from "lit/directives/class-map.js"; -import UtilsNew from "../../../../core/utils-new.js"; +import UtilsNew from "../../../../../core/utils-new.js"; import AnalysisRegistry from "../analysis-registry.js"; -import GridCommons from "../../../commons/grid-commons.js"; +import GridCommons from "../../../../commons/grid-commons.js"; import knockoutDataGene from "../test/knockout.20201103172343.kFIvpr.gene.js"; export default class KnockoutGeneGrid extends LitElement { @@ -99,7 +99,7 @@ export default class KnockoutGeneGrid extends LitElement { this.table = $("#" + this.gridId); this.table.bootstrapTable("destroy"); this.table.bootstrapTable({ - //data: this.tableData, + // data: this.tableData, columns: this._initTableColumns(), sidePagination: "local", iconsPrefix: GridCommons.GRID_ICONS_PREFIX, @@ -115,7 +115,7 @@ export default class KnockoutGeneGrid extends LitElement { ajax: params => { this.opencgaSession.opencgaClient.variants().queryKnockoutGene({job: this.jobId, study: this.opencgaSession.study.fqn}) .then(restResponse => { - console.log("restResponse", restResponse) + console.log("restResponse", restResponse); this.tableData = restResponse.getResults(); params.success(this.tableData); }).catch(e => { diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-variants.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js similarity index 94% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-variants.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js index f590a7be72..ae918aa782 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-variants.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-variants.js @@ -15,9 +15,9 @@ */ import {LitElement, html} from "lit"; -import UtilsNew from "../../../../core/utils-new.js"; -import GridCommons from "../../../commons/grid-commons.js"; -import "./../../../commons/view/detail-tabs.js"; +import UtilsNew from "../../../../../core/utils-new.js"; +import GridCommons from "../../../../commons/grid-commons.js"; +import "../../../../commons/view/detail-tabs.js"; import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js"; @@ -55,9 +55,6 @@ export default class KnockoutIndividualVariants extends LitElement { } updated(changedProperties) { - if (changedProperties.has("opencgaSession")) { - } - if (changedProperties.has("individual")) { this.prepareData(); this.renderTable(); diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-view.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js similarity index 97% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-view.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js index 77611c8f07..b94d11cdb9 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-individual-view.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-individual-view.js @@ -15,13 +15,13 @@ */ import {LitElement, html} from "lit"; -import UtilsNew from "../../../../core/utils-new.js"; -import CatalogGridFormatter from "../../../commons/catalog-grid-formatter.js"; +import UtilsNew from "../../../../../core/utils-new.js"; +import CatalogGridFormatter from "../../../../commons/catalog-grid-formatter.js"; import AnalysisRegistry from "../analysis-registry.js"; -import GridCommons from "../../../commons/grid-commons.js"; +import GridCommons from "../../../../commons/grid-commons.js"; import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js"; import "./knockout-individual-variants.js"; -import "../../../family/family-view.js"; +import "../../../../family/family-view.js"; export default class KnockoutIndividualView extends LitElement { diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-allele-pairs.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js similarity index 94% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-allele-pairs.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js index a127fe2d82..570333e836 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-allele-pairs.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-allele-pairs.js @@ -15,9 +15,9 @@ */ import {LitElement, html} from "lit"; -import UtilsNew from "../../../../core/utils-new.js"; -import GridCommons from "../../../commons/grid-commons.js"; -import "./../../../commons/view/detail-tabs.js"; +import UtilsNew from "../../../../../core/utils-new.js"; +import GridCommons from "../../../../commons/grid-commons.js"; +import "../../../../commons/view/detail-tabs.js"; import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js"; @@ -54,9 +54,6 @@ export default class KnockoutVariantAllelePairs extends LitElement { } updated(changedProperties) { - if (changedProperties.has("opencgaSession")) { - } - if (changedProperties.has("variantId")) { this.prepareData(); this.renderTable(); diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-individual.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js similarity index 92% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-individual.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js index 474ca0ea53..f90687bc2f 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-individual.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-individual.js @@ -15,9 +15,9 @@ */ import {LitElement, html} from "lit"; -import UtilsNew from "../../../../core/utils-new.js"; -import GridCommons from "../../../commons/grid-commons.js"; -import "./../../../commons/view/detail-tabs.js"; +import UtilsNew from "../../../../../core/utils-new.js"; +import GridCommons from "../../../../commons/grid-commons.js"; +import "../../../../commons/view/detail-tabs.js"; import knockoutDataIndividuals from "../test/knockout.20201103172343.kFIvpr.individuals.js"; @@ -54,8 +54,6 @@ export default class KnockoutVariantIndividual extends LitElement { } updated(changedProperties) { - if (changedProperties.has("opencgaSession")) { - } if (changedProperties.has("variant")) { this.prepareData(); @@ -86,7 +84,7 @@ export default class KnockoutVariantIndividual extends LitElement { uniqueId: "id", pagination: true, paginationVAlign: "both", - //formatShowingRows: this.gridCommons.formatShowingRows, + // formatShowingRows: this.gridCommons.formatShowingRows, gridContext: this, formatLoadingMessage: () => "
", onClickRow: (row, selectedElement, field) => { diff --git a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-view.js b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js similarity index 97% rename from src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-view.js rename to src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js index ee435da115..d7fc83aa60 100644 --- a/src/webcomponents/variant/analysis/opencga-knockout-analysis/knockout-variant-view.js +++ b/src/webcomponents/variant/analysis/deprecated/opencga-knockout-analysis/knockout-variant-view.js @@ -15,17 +15,17 @@ */ import {LitElement, html} from "lit"; -import UtilsNew from "../../../../core/utils-new.js"; -import CatalogGridFormatter from "../../../commons/catalog-grid-formatter.js"; +import UtilsNew from "../../../../../core/utils-new.js"; +import CatalogGridFormatter from "../../../../commons/catalog-grid-formatter.js"; import AnalysisRegistry from "../analysis-registry.js"; -import GridCommons from "../../../commons/grid-commons.js"; +import GridCommons from "../../../../commons/grid-commons.js"; import knockoutData from "../test/knockout.20201029141213.SChLEA.js"; import "./knockout-individual-variants.js"; import "./knockout-variant-allele-pairs.js"; import "./knockout-variant-individual.js"; -import "../../../family/family-view.js"; -import "../../annotation/cellbase-population-frequency-grid.js"; -import "../../annotation/variant-annotation-clinical-view.js"; +import "../../../../family/family-view.js"; +import "../../../annotation/cellbase-population-frequency-grid.js"; +import "../../../annotation/variant-annotation-clinical-view.js"; export default class KnockoutVariantView extends LitElement { diff --git a/src/webcomponents/variant/analysis/test/knockout.20201029141213.SChLEA.js b/src/webcomponents/variant/analysis/deprecated/test/knockout.20201029141213.SChLEA.js similarity index 99% rename from src/webcomponents/variant/analysis/test/knockout.20201029141213.SChLEA.js rename to src/webcomponents/variant/analysis/deprecated/test/knockout.20201029141213.SChLEA.js index ab3e30e3ce..b8f24cfb2c 100644 --- a/src/webcomponents/variant/analysis/test/knockout.20201029141213.SChLEA.js +++ b/src/webcomponents/variant/analysis/deprecated/test/knockout.20201029141213.SChLEA.js @@ -375,4 +375,4 @@ export default [ } ] } -] +]; diff --git a/src/webcomponents/variant/analysis/test/knockout.20201103172343.kFIvpr.gene.js b/src/webcomponents/variant/analysis/deprecated/test/knockout.20201103172343.kFIvpr.gene.js similarity index 100% rename from src/webcomponents/variant/analysis/test/knockout.20201103172343.kFIvpr.gene.js rename to src/webcomponents/variant/analysis/deprecated/test/knockout.20201103172343.kFIvpr.gene.js diff --git a/src/webcomponents/variant/analysis/test/knockout.20201103172343.kFIvpr.individuals.js b/src/webcomponents/variant/analysis/deprecated/test/knockout.20201103172343.kFIvpr.individuals.js similarity index 99% rename from src/webcomponents/variant/analysis/test/knockout.20201103172343.kFIvpr.individuals.js rename to src/webcomponents/variant/analysis/deprecated/test/knockout.20201103172343.kFIvpr.individuals.js index 9fe9fe7a0b..6760254f79 100644 --- a/src/webcomponents/variant/analysis/test/knockout.20201103172343.kFIvpr.individuals.js +++ b/src/webcomponents/variant/analysis/deprecated/test/knockout.20201103172343.kFIvpr.individuals.js @@ -240,4 +240,4 @@ export default [ } ] } -] +]; diff --git a/src/webcomponents/variant/analysis/test/opencga-knockout-analysis-result.html b/src/webcomponents/variant/analysis/deprecated/test/opencga-knockout-analysis-result.html similarity index 100% rename from src/webcomponents/variant/analysis/test/opencga-knockout-analysis-result.html rename to src/webcomponents/variant/analysis/deprecated/test/opencga-knockout-analysis-result.html