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

[GLT-4064] added assay test library qualification skipped field #40

Merged
merged 2 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import static java.util.Objects.requireNonNull;

import java.time.LocalDate;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;

@JsonDeserialize(builder = Deliverable.Builder.class)
public class Deliverable {

private final DeliverableType deliverableType;
Expand Down
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