Skip to content

Commit

Permalink
wc - Fixed variant interpreter export config
Browse files Browse the repository at this point in the history
Signed-off-by: gpveronica <[email protected]>
  • Loading branch information
gpveronica committed Nov 17, 2023
1 parent 2460ed5 commit 157b13c
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 79 deletions.
8 changes: 2 additions & 6 deletions src/webcomponents/variant/custom/steiner-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,12 @@ class SteinerReport extends LitElement {
pagination: true,
pageSize: 10,
pageList: [10, 25, 50],
showExport: false,
detailView: true,
showReview: true,
showEditReview: false,
showActions: false,

showExport: false,
showSettings: false,
showColumns: false,
showDownload: false,
Expand All @@ -431,11 +432,6 @@ class SteinerReport extends LitElement {
evidences: {
showSelectCheckbox: false,
},
toolbar: {
showColumns: false,
showDownload: false,
showExport: false,
},
};

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,17 +530,17 @@ class VariantInterpreterBrowserCancer extends LitElement {
],
result: {
grid: {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: false,
detailView: true,
showReview: false,
showActions: true,
// pagination: true,
// pageSize: 10,
// pageList: [5, 10, 25],
// showExport: false,
// detailView: true,
// showReview: false,
// showActions: true,
showSelectCheckbox: true,
multiSelection: false,
nucleotideGenotype: true,
alleleStringLengthMax: 10,
// multiSelection: false,
// nucleotideGenotype: true,
// alleleStringLengthMax: 10,

genotype: {
type: "VAF"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,17 @@ class VariantInterpreterBrowserCNV extends LitElement {
],
result: {
grid: {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: false,
detailView: true,
showReview: false,
showActions: true,
// pagination: true,
// pageSize: 10,
// pageList: [5, 10, 25],
// showExport: false,
// detailView: true,
// showReview: false,
// showActions: true,
showSelectCheckbox: true,
multiSelection: false,
nucleotideGenotype: true,
alleleStringLengthMax: 10,
// multiSelection: false,
// nucleotideGenotype: true,
// alleleStringLengthMax: 10,

hideType: true,
hidePopulationFrequencies: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,17 +545,17 @@ class VariantInterpreterBrowserRd extends LitElement {
],
result: {
grid: {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: false,
detailView: true,
showReview: true,
showActions: true,
// pagination: true,
// pageSize: 10,
// pageList: [5, 10, 25],
// showExport: false,
// detailView: true,
// showReview: true,
// showActions: true,
showSelectCheckbox: true,
multiSelection: false,
nucleotideGenotype: true,
alleleStringLengthMax: 10,
// multiSelection: false,
// nucleotideGenotype: true,
// alleleStringLengthMax: 10,

header: {
horizontalAlign: "center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,16 +418,16 @@ class VariantInterpreterBrowserRearrangement extends LitElement {
],
result: {
grid: {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: true,
detailView: true,
showReview: false,
showActions: true,
// pagination: true,
// pageSize: 10,
// pageList: [5, 10, 25],
// showExport: true,
// detailView: true,
// showReview: false,
// showActions: true,
showSelectCheckbox: true,
multiSelection: false,
nucleotideGenotype: true,
// multiSelection: false,
// nucleotideGenotype: true,
alleleStringLengthMax: 25,
header: {
horizontalAlign: "center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,20 +148,14 @@ class VariantInterpreterBrowserTemplate extends LitElement {
}

if (this.settings?.table) {
this._config.filter.result.grid = {...this._config.filter.result.grid, ...this.settings.table};
}

if (this.settings?.table?.toolbar) {
this._config.filter.result.grid.toolbar = {...this._config.filter.result.grid.toolbar, ...this.settings.table.toolbar};
const {toolbar, ...otherTableProps} = this.settings.table;
this._config.filter.result.grid = {
...this._config.filter.result.grid,
...otherTableProps,
...toolbar,
};
}

// Check for user configuration
// if (this.toolId && this.opencgaSession.user?.configs?.IVA?.[this.toolId]?.grid) {
// this._config.filter.result.grid = {
// ...this._config.filter.result.grid,
// ...this.opencgaSession.user.configs.IVA[this.toolId].grid,
// };
// }
// Apply User grid configuration. Only 'pageSize', 'columns', 'geneSet', 'consequenceType' and 'populationFrequenciesConfig' are set
UtilsNew.setObjectValue(this._config, "filter.result.grid", {
...this._config.filter?.result?.grid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,15 @@ export default class VariantInterpreterGrid extends LitElement {
}

configObserver() {
this._config = {...this.getDefaultConfig(), ...this.config};
this._config = {
...this.getDefaultConfig(),
...this.config
};
this.gridCommons = new GridCommons(this.gridId, this, this._config);

this.toolbarSetting = {
showExport: true,
exportTabs: ["download", "export", "link", "code"], // this is customisable in external settings in `table.toolbar`
// ...this._config,
// it comes from external settings
showColumns: false,
showSettings: true,
...this._config,
showCreate: false,
// columns: defaultColumns[0].filter(col => col.rowspan === 2 && col.colspan === 1 && col.visible !== false),
// gridColumns: defaultColumns, // original column structure
};
Expand Down Expand Up @@ -232,7 +230,6 @@ export default class VariantInterpreterGrid extends LitElement {
pageList: this._config.pageList,
paginationVAlign: "both",
formatShowingRows: (pageFrom, pageTo, totalRows) => this.gridCommons.formatShowingRows(pageFrom, pageTo, totalRows, null, this.isApproximateCount),
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: (value, row) => this.detailFormatter(value, row),
formatLoadingMessage: () => "<div><loading-spinner></loading-spinner></div>",
Expand Down Expand Up @@ -407,7 +404,6 @@ export default class VariantInterpreterGrid extends LitElement {
pageList: this._config.pageList,
paginationVAlign: "both",
formatShowingRows: this.gridCommons.formatShowingRows,
showExport: this._config.showExport,
detailView: this._config.detailView,
detailFormatter: (value, row) => this.detailFormatter(value, row),
formatLoadingMessage: () => "<div><loading-spinner></loading-spinner></div>",
Expand Down Expand Up @@ -1535,29 +1531,35 @@ export default class VariantInterpreterGrid extends LitElement {
pagination: true,
pageSize: 10,
pageList: [5, 10, 25],
showExport: false,
detailView: true,
showReview: true,
showSettings: true,
showSelectCheckbox: false,
showActions: true,
showEditReview: true,
showType: true,
showGenomeBrowserLink: true,
multiSelection: false,
nucleotideGenotype: true,
alleleStringLengthMax: 10,
header: {
horizontalAlign: "center",
verticalAlign: "bottom"
},

showReview: true,
showEditReview: true,
showType: true,
showGenomeBrowserLink: true,

showToolbar: true,
showActions: true,

showCreate: false,
showExport: true,
showSettings: true,
exportTabs: ["download", "export", "link", "code"], // this is customisable in external settings in `table.toolbar`


hideType: false,
hidePopulationFrequencies: false,
hideClinicalInfo: false,
showHgvs: false,

header: {
horizontalAlign: "center",
verticalAlign: "bottom"
},

quality: {
qual: 30,
dp: 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export default class VariantInterpreterRearrangementGrid extends LitElement {

this.toolbarSetting = {
...this._config,
...this._config.toolbar, // it comes from external settings
};

this.toolbarConfig = {
Expand Down

0 comments on commit 157b13c

Please sign in to comment.