Skip to content

Commit

Permalink
wc - Fixed user settings path in some browsers
Browse files Browse the repository at this point in the history
Signed-off-by: gpveronica <[email protected]>
  • Loading branch information
gpveronica committed Oct 30, 2023
1 parent e0e900d commit 86a03a9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/webcomponents/clinical/clinical-analysis-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class ClinicalAnalysisBrowser extends LitElement {
// Apply user configuration
UtilsNew.setObjectValue(this._config, "filter.result.grid", {
...this._config.filter?.result?.grid,
...this.opencgaSession.user?.configs?.IVA?.[this._config.componentId]?.grid,
...this.opencgaSession.user?.configs?.IVA?.settings?.[this._config.componentId]?.grid,
});


Expand Down Expand Up @@ -281,6 +281,7 @@ export default class ClinicalAnalysisBrowser extends LitElement {
}
};
}

}

customElements.define("clinical-analysis-browser", ClinicalAnalysisBrowser);
16 changes: 8 additions & 8 deletions src/webcomponents/variant/custom/steiner-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ class SteinerReport extends LitElement {
.filter(v => SUBSTITUTIONS_AND_INDELS_TYPES.indexOf(v.type) > -1);

const gridConfig = {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.snv]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.snv]?.grid || {}),
...defaultGridConfig,
somatic: false,
variantTypes: ["SNV", "INDEL", "INSERTION", "DELETION"],
Expand Down Expand Up @@ -832,7 +832,7 @@ class SteinerReport extends LitElement {
.filter(v => REARRANGEMENTS_TYPES.indexOf(v.type) > -1);

const gridConfig = {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.rearrangements]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.rearrangements]?.grid || {}),
...defaultGridConfig,
somatic: false,
variantTypes: ["BREAKEND"],
Expand Down Expand Up @@ -880,7 +880,7 @@ class SteinerReport extends LitElement {
.filter(v => v.confidence?.value === "HIGH");

return this.renderSomaticVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.snv]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.snv]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["SNV", "INDEL"],
Expand All @@ -903,7 +903,7 @@ class SteinerReport extends LitElement {
.filter(v => v.confidence?.value === "HIGH");

return this.renderSomaticRearrangementVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.rearrangements]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.rearrangements]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["BREAKEND"],
Expand All @@ -926,7 +926,7 @@ class SteinerReport extends LitElement {
.filter(v => v.confidence?.value === "HIGH");

return this.renderSomaticVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.cnv]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.cnv]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["COPY_NUMBER", "CNV"],
Expand Down Expand Up @@ -958,7 +958,7 @@ class SteinerReport extends LitElement {
.filter(v => !v.confidence?.value || v.confidence?.value !== "HIGH");

return this.renderSomaticVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.snv]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.snv]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["SNV", "INDEL"],
Expand All @@ -979,7 +979,7 @@ class SteinerReport extends LitElement {
.filter(v => !v.confidence?.value || v.confidence?.value !== "HIGH");

return this.renderSomaticRearrangementVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.rearrangements]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.rearrangements]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["BREAKEND"],
Expand All @@ -1000,7 +1000,7 @@ class SteinerReport extends LitElement {
.filter(v => !v.confidence?.value || v.confidence?.value !== "HIGH");

return this.renderSomaticVariantsGrid(filteredVariants, {
...(this.opencgaSession?.user?.configs?.IVA?.[this.gridTypes.cnv]?.grid || {}),
...(this.opencgaSession?.user?.configs?.IVA?.settings?.[this.gridTypes.cnv]?.grid || {}),
...defaultGridConfig,
somatic: true,
variantTypes: ["COPY_NUMBER", "CNV"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ export default class VariantInterpreterReviewPrimary extends LitElement {
}

// Check for user configuration
if (this.toolId && this.opencgaSession.user?.configs?.IVA?.[this.toolId]?.grid) {
if (this.toolId && this.opencgaSession.user?.configs?.IVA?.settings?.[this.toolId]?.grid) {
this._config.result.grid = {
...this._config.result.grid,
...this.opencgaSession.user.configs.IVA[this.toolId].grid,
...this.opencgaSession.user.configs.IVA.settings[this.toolId].grid,
showGenomeBrowserLink: false,
};
}
Expand Down

0 comments on commit 86a03a9

Please sign in to comment.