Skip to content

Commit

Permalink
Merge pull request #858 from opencb/TASK-5494
Browse files Browse the repository at this point in the history
TASK-5494 - File, fileData and sample filters are not kept when applying a saved filter
  • Loading branch information
jmjuanes authored Feb 15, 2024
2 parents 38faad7 + 90e51d0 commit e88fb46
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
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

0 comments on commit e88fb46

Please sign in to comment.