Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK-5494 - File, fileData and sample filters are not kept when applying a saved filter #858

Merged
merged 6 commits into from
Feb 15, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,14 @@ class VariantInterpreterBrowserCancer extends LitElement {
}

getDefaultConfig() {
// Add case panels to query object
// TODO should we also check main interpretation panels?
const lockedFields = [{id: "sample"}];

const lockedFields = [
{id: "sample"},
{id: "sampleData"},
{id: "file"},
{id: "fileData"},
];

// Add panels to locked fields
if (this.clinicalAnalysis?.panels?.length > 0 && this.clinicalAnalysis.panelLock) {
lockedFields.push({id: "panel"});
lockedFields.push({id: "panelIntersection"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,15 @@ class VariantInterpreterBrowserCNV extends LitElement {
}

getDefaultConfig() {
// Add case panels to query object
const lockedFields = [
{id: "sample"},
{id: "sampleData"},
{id: "file"},
{id: "fileData"},
{id: "type"},
];

// Add panels to locked fields
if (this.clinicalAnalysis?.panels?.length > 0 && this.clinicalAnalysis.panelLock) {
lockedFields.push({id: "panel"});
lockedFields.push({id: "panelIntersection"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,14 @@ class VariantInterpreterBrowserRd extends LitElement {
}

getDefaultConfig() {
// Add case panels to query object
// TODO should we also check main interpretation panels?
const lockedFields = [{id: "sample"}];

const lockedFields = [
{id: "sample"},
{id: "sampleData"},
{id: "file"},
{id: "fileData"},
];

// Add panels to locked fields
if (this.clinicalAnalysis?.panels?.length > 0 && this.clinicalAnalysis.panelLock) {
lockedFields.push({id: "panel"});
lockedFields.push({id: "panelIntersection"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ class VariantInterpreterBrowserRearrangement extends LitElement {
}

getDefaultConfig() {
const lockedFields = [
{id: "sample"},
{id: "sampleData"},
{id: "file"},
{id: "fileData"},
];

// Prepare dynamic Variant Caller INFO filters
const callers = ["Caveman", "strelka", "Pindel", "ASCAT", "Canvas", "BRASS", "Manta", "TNhaplotyper2", "Pisces", "CRAFT"];
const callerFilters = callers.map(caller => {
Expand Down Expand Up @@ -338,7 +345,7 @@ class VariantInterpreterBrowserRearrangement extends LitElement {
{id: "fileData", separator: ","},
],
hiddenFields: [],
lockedFields: [{id: "sample"}]
lockedFields: lockedFields,
},
callers: [],
sections: [ // sections and subsections, structure and order is respected
Expand Down
Loading