From e30f92350127ed096141695ab7cd743cb5823e3f Mon Sep 17 00:00:00 2001 From: Dillan Cooke Date: Fri, 5 Jan 2024 08:05:49 -0500 Subject: [PATCH] [GLT-4064] support tests with no library qualification step (#173) --- changes/change_libQual_skipped.md | 1 + pom.xml | 4 ++-- .../dimsum/service/filtering/CompletedGate.java | 3 ++- .../gsi/dimsum/service/filtering/PendingState.java | 3 ++- ts/data/case.ts | 14 ++++++++++++++ 5 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 changes/change_libQual_skipped.md diff --git a/changes/change_libQual_skipped.md b/changes/change_libQual_skipped.md new file mode 100644 index 00000000..49792b84 --- /dev/null +++ b/changes/change_libQual_skipped.md @@ -0,0 +1 @@ +Some tests may not have a library qualification step diff --git a/pom.xml b/pom.xml index 4c4fed2e..d03c1c65 100644 --- a/pom.xml +++ b/pom.xml @@ -138,7 +138,7 @@ ca.on.oicr.gsi.cardea cardea-data - 1.6.0 + 1.7.0 @@ -184,4 +184,4 @@ - \ No newline at end of file + diff --git a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/CompletedGate.java b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/CompletedGate.java index 0edcaca4..ffe30bd3 100644 --- a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/CompletedGate.java +++ b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/CompletedGate.java @@ -73,7 +73,8 @@ public boolean qualifySample(Sample sample, MetricCategory requestCategory) { LIBRARY_QUALIFICATION("Library Qualification", true) { @Override public boolean qualifyTest(Test test) { - return Helpers.isCompleted(test.getLibraryQualifications()); + return test.isLibraryQualificationSkipped() + || Helpers.isCompleted(test.getLibraryQualifications()); } @Override diff --git a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java index c70b6464..9acb2761 100644 --- a/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java +++ b/src/main/java/ca/on/oicr/gsi/dimsum/service/filtering/PendingState.java @@ -137,7 +137,8 @@ public boolean qualifySample(Sample sample, MetricCategory requestCategory) { LIBRARY_QUALIFICATION("Library Qualification", true) { @Override public boolean qualifyTest(Test test) { - return Helpers.hasPendingWork(test.getLibraryQualifications(), test.getLibraryPreparations()); + return !test.isLibraryQualificationSkipped() + && Helpers.hasPendingWork(test.getLibraryQualifications(), test.getLibraryPreparations()); } @Override diff --git a/ts/data/case.ts b/ts/data/case.ts index b8eb8988..d54bbb3d 100644 --- a/ts/data/case.ts +++ b/ts/data/case.ts @@ -75,6 +75,7 @@ export interface Test { targetedSequencing: string; extractionSkipped: boolean; libraryPreparationSkipped: boolean; + libraryQualificationSkipped: boolean; extractions: Sample[]; libraryPreparations: Sample[]; libraryQualifications: Sample[]; @@ -443,6 +444,13 @@ export const caseDefinition: TableDefinition = { ) { return; } + if ( + !test.libraryQualifications.length && + test.libraryQualificationSkipped + ) { + addNaText(fragment); + return; + } addSampleIcons(kase.assayId, test.libraryQualifications, fragment); if (samplePhaseComplete(test.libraryPreparations)) { if (samplePhasePendingWorkOrQc(test.libraryQualifications)) { @@ -468,6 +476,12 @@ export const caseDefinition: TableDefinition = { }, getCellHighlight(kase, test) { test = assertNotNull(test); + if ( + !test.libraryQualifications.length && + test.libraryQualificationSkipped + ) { + return "na"; + } return getSamplePhaseHighlight( kase.requisition, test.libraryQualifications