Skip to content

Commit

Permalink
[GLT-4064] support tests with no library qualification step (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke authored Jan 5, 2024
1 parent 7ffcd67 commit e30f923
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions changes/change_libQual_skipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some tests may not have a library qualification step
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<dependency>
<groupId>ca.on.oicr.gsi.cardea</groupId>
<artifactId>cardea-data</artifactId>
<version>1.6.0</version>
<version>1.7.0</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -184,4 +184,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions ts/data/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface Test {
targetedSequencing: string;
extractionSkipped: boolean;
libraryPreparationSkipped: boolean;
libraryQualificationSkipped: boolean;
extractions: Sample[];
libraryPreparations: Sample[];
libraryQualifications: Sample[];
Expand Down Expand Up @@ -443,6 +444,13 @@ export const caseDefinition: TableDefinition<Case, Test> = {
) {
return;
}
if (
!test.libraryQualifications.length &&
test.libraryQualificationSkipped
) {
addNaText(fragment);
return;
}
addSampleIcons(kase.assayId, test.libraryQualifications, fragment);
if (samplePhaseComplete(test.libraryPreparations)) {
if (samplePhasePendingWorkOrQc(test.libraryQualifications)) {
Expand All @@ -468,6 +476,12 @@ export const caseDefinition: TableDefinition<Case, Test> = {
},
getCellHighlight(kase, test) {
test = assertNotNull(test);
if (
!test.libraryQualifications.length &&
test.libraryQualificationSkipped
) {
return "na";
}
return getSamplePhaseHighlight(
kase.requisition,
test.libraryQualifications
Expand Down

0 comments on commit e30f923

Please sign in to comment.