Skip to content

Commit

Permalink
[GLT-4064] added assay test library qualification skipped field
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke committed Jan 2, 2024
1 parent 6eb38fb commit 7ac61ad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cardea-data/src/main/java/ca/on/oicr/gsi/cardea/data/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Test {
private final LocalDate latestActivityDate;
private final boolean libraryPreparationSkipped;
private final List<Sample> libraryPreparations;
private final boolean libraryQualificationSkipped;
private final List<Sample> libraryQualifications;
private final String name;
private final String targetedSequencing;
Expand All @@ -46,6 +47,7 @@ private Test(Builder builder) {
this.targetedSequencing = builder.targetedSequencing;
this.extractionSkipped = builder.extractionSkipped;
this.libraryPreparationSkipped = builder.libraryPreparationSkipped;
this.libraryQualificationSkipped = builder.libraryQualificationSkipped;
this.extractions =
builder.extractions == null ? emptyList() : unmodifiableList(builder.extractions);
this.libraryPreparations = builder.libraryPreparations == null ? emptyList()
Expand Down Expand Up @@ -121,6 +123,10 @@ public boolean isLibraryPreparationSkipped() {
return libraryPreparationSkipped;
}

public boolean isLibraryQualificationSkipped() {
return libraryQualificationSkipped;
}

public int getExtractionDaysSpent() {
return extractionDaysSpent;
}
Expand All @@ -147,6 +153,7 @@ public static class Builder {
private String libraryDesignCode;
private boolean libraryPreparationSkipped;
private List<Sample> libraryPreparations;
private boolean libraryQualificationSkipped;
private List<Sample> libraryQualifications;
private String name;
private String targetedSequencing;
Expand Down Expand Up @@ -197,6 +204,11 @@ public Builder libraryPreparations(List<Sample> libraryPreparations) {
return this;
}

public Builder libraryQualificationSkipped(boolean libraryQualificationSkipped) {
this.libraryQualificationSkipped = libraryQualificationSkipped;
return this;
}

public Builder libraryQualifications(List<Sample> libraryQualifications) {
this.libraryQualifications = libraryQualifications;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ private List<Test> parseTests(JsonNode json, String fieldName, Map<String, Sampl
.targetedSequencing(parseString(testNode, "targeted_sequencing"))
.extractionSkipped(parseBoolean(testNode, "extraction_skipped"))
.libraryPreparationSkipped(parseBoolean(testNode, "library_preparation_skipped"))
.libraryQualificationSkipped(parseBoolean(testNode, "library_qualification_skipped"))
.extractions(parseIdsAndGet(testNode, "extraction_ids", JsonNode::asText, samplesById))
.libraryPreparations(
parseIdsAndGet(testNode, "library_preparation_ids", JsonNode::asText, samplesById))
Expand Down
3 changes: 3 additions & 0 deletions cardea-server/src/test/resources/testdata/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"targeted_sequencing": null,
"extraction_skipped": false,
"library_preparation_skipped": false,
"library_qualification_skipped": false,
"extraction_ids": ["SAM413593"],
"library_preparation_ids": ["LIB75802"],
"library_qualification_ids": ["5459_1_LDI73620", "5467_1_LDI73620"],
Expand All @@ -42,6 +43,7 @@
"targeted_sequencing": null,
"extraction_skipped": false,
"library_preparation_skipped": false,
"library_qualification_skipped": false,
"extraction_ids": ["SAM413648"],
"library_preparation_ids": ["LIB76197"],
"library_qualification_ids": ["5460_1_LDI73998"],
Expand All @@ -60,6 +62,7 @@
"targeted_sequencing": null,
"extraction_skipped": false,
"library_preparation_skipped": false,
"library_qualification_skipped": false,
"extraction_ids": ["SAM413735"],
"library_preparation_ids": ["LIB75803"],
"library_qualification_ids": ["5459_1_LDI73621", "5467_1_LDI73621"],
Expand Down
1 change: 1 addition & 0 deletions changes/add_libQualSkipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Assay test field to specify if library qualification is skipped

0 comments on commit 7ac61ad

Please sign in to comment.