Skip to content

Commit

Permalink
[GLT-4101] added new metric fields for cfMeDIPs (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
djcooke authored Mar 8, 2024
1 parent f48e630 commit b0c4e7a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
36 changes: 36 additions & 0 deletions cardea-data/src/main/java/ca/on/oicr/gsi/cardea/data/Sample.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public class Sample {
private final String tissueOrigin;
private final String tissueType;
private final BigDecimal volume;
private final BigDecimal relativeCpgInRegions;
private final BigDecimal methylationBeta;
private final Integer peReads;

private Sample(Builder builder) {
this.id = requireNonNull(builder.id);
Expand Down Expand Up @@ -101,6 +104,9 @@ private Sample(Builder builder) {
this.lambdaClusters = builder.lambdaClusters;
this.puc19Methylation = builder.puc19Methylation;
this.puc19Clusters = builder.puc19Clusters;
this.relativeCpgInRegions = builder.relativeCpgInRegions;
this.methylationBeta = builder.methylationBeta;
this.peReads = builder.peReads;
this.qcPassed = builder.qcPassed;
this.qcReason = builder.qcReason;
this.qcNote = builder.qcNote;
Expand Down Expand Up @@ -316,6 +322,18 @@ public BigDecimal getrRnaContamination() {
return rRnaContamination;
}

public BigDecimal getRelativeCpgInRegions() {
return relativeCpgInRegions;
}

public BigDecimal getMethylationBeta() {
return methylationBeta;
}

public Integer getPeReads() {
return peReads;
}

@Override
public int hashCode() {
return Objects.hash(id, run, sequencingLane);
Expand Down Expand Up @@ -370,6 +388,9 @@ public static class Builder {
private String tissueOrigin;
private String tissueType;
private BigDecimal volume;
private BigDecimal relativeCpgInRegions;
private BigDecimal methylationBeta;
private Integer peReads;

public Sample build() {
return new Sample(this);
Expand Down Expand Up @@ -606,5 +627,20 @@ public Builder volume(BigDecimal volume) {
return this;
}

public Builder relativeCpgInRegions(BigDecimal relativeCpgInRegions) {
this.relativeCpgInRegions = relativeCpgInRegions;
return this;
}

public Builder methylationBeta(BigDecimal methylationBeta) {
this.methylationBeta = methylationBeta;
return this;
}

public Builder peReads(Integer peReads) {
this.peReads = peReads;
return this;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ protected Map<String, Sample> loadSamples(FileReader fileReader, Map<String, Don
.lambdaClusters(parseInteger(json, "lambda_clusters", false))
.puc19Methylation(parseDecimal(json, "puc19_methylation", false))
.puc19Clusters(parseInteger(json, "puc19_clusters", false))
.relativeCpgInRegions(parseDecimal(json, "relative_cpg_in_regions", false))
.methylationBeta(parseDecimal(json, "methylation_beta", false))
.peReads(parseInteger(json, "pe_reads", false))
.qcPassed(parseQcPassed(json, "qc_state", true))
.qcReason(parseString(json, "qc_reason"))
.qcNote(parseString(json, "qc_note"))
Expand Down
1 change: 1 addition & 0 deletions changes/add_cfmedips_metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New metrics for cfMeDIPs assays

0 comments on commit b0c4e7a

Please sign in to comment.