diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariant.java b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariant.java index 50f4e2d6..35e163b4 100644 --- a/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariant.java +++ b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariant.java @@ -40,6 +40,8 @@ public class ClinicalVariant extends Variant { private ClinicalVariantConfidence confidence; private List tags; + private ClinicalVariantSummary summary; + private Status status; // TODO maybe this parameter should be in Variant @@ -95,6 +97,7 @@ public ClinicalVariant(VariantAvro avro, List evidences this.attributes = attributes; } + @Deprecated public ClinicalVariant(VariantAvro avro, List evidences, List comments, Map filters, String recommendation, List references, ClinicalDiscussion discussion, ClinicalVariantConfidence confidence, Status status, @@ -113,6 +116,26 @@ public ClinicalVariant(VariantAvro avro, List evidences this.attributes = attributes; } + public ClinicalVariant(VariantAvro avro, List evidences, List comments, + Map filters, String recommendation, List references, + ClinicalDiscussion discussion, ClinicalVariantConfidence confidence, ClinicalVariantSummary summary, + Status status, List tags, Map attributes) { + super(avro); + + this.evidences = evidences; + this.comments = comments; + this.filters = filters; + this.recommendation = recommendation; + this.references = references; + this.discussion = discussion; + this.summary = summary; + this.status = status; + this.tags = tags; + this.confidence = confidence; + this.attributes = attributes; + } + + @Override public String toString() { return super.toString(); @@ -181,6 +204,15 @@ public ClinicalVariant setConfidence(ClinicalVariantConfidence confidence) { return this; } + public ClinicalVariantSummary getSummary() { + return summary; + } + + public ClinicalVariant setSummary(ClinicalVariantSummary summary) { + this.summary = summary; + return this; + } + public Status getStatus() { return status; } diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariantSummary.java b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariantSummary.java new file mode 100644 index 00000000..5cd5169e --- /dev/null +++ b/biodata-models/src/main/java/org/opencb/biodata/models/clinical/interpretation/ClinicalVariantSummary.java @@ -0,0 +1,190 @@ +/* + * + * + */ + +package org.opencb.biodata.models.clinical.interpretation; + +import org.opencb.biodata.models.clinical.ClinicalProperty; + +import java.util.HashMap; +import java.util.Map; + +public class ClinicalVariantSummary { + + private int numCases; + private int numPrimaryInterpretations; + private int numSecondaryInterpretations; + private Map evidencePhenotypeCounts; + private Map evidenceTierCounts; + private Map evidenceAcmgCounts; + private Map evidenceClinicalSignificanceCounts; + private Map drugResponseCounts; + private Map evidenceTraitAssociationCounts; + private Map evidenceFunctionalEffectCounts; + private Map evidenceTumorigenesisCounts; + + public ClinicalVariantSummary() { + this.evidencePhenotypeCounts = new HashMap<>(); + this.evidenceTierCounts = new HashMap<>(); + this.evidenceAcmgCounts = new HashMap<>(); + this.evidenceClinicalSignificanceCounts = new HashMap<>(); + this.drugResponseCounts = new HashMap<>(); + this.evidenceTraitAssociationCounts = new HashMap<>(); + this.evidenceFunctionalEffectCounts = new HashMap<>(); + this.evidenceTumorigenesisCounts = new HashMap<>(); + } + + public ClinicalVariantSummary(int numCases, int numPrimaryInterpretations, int numSecondaryInterpretations, + Map evidencePhenotypeCounts, + Map evidenceTierCounts, + Map evidenceAcmgCounts, + Map evidenceClinicalSignificanceCounts, + Map drugResponseCounts, + Map evidenceTraitAssociationCounts, + Map evidenceFunctionalEffectCounts, + Map evidenceTumorigenesisCounts) { + this.numCases = numCases; + this.numPrimaryInterpretations = numPrimaryInterpretations; + this.numSecondaryInterpretations = numSecondaryInterpretations; + this.evidencePhenotypeCounts = evidencePhenotypeCounts; + this.evidenceTierCounts = evidenceTierCounts; + this.evidenceAcmgCounts = evidenceAcmgCounts; + this.evidenceClinicalSignificanceCounts = evidenceClinicalSignificanceCounts; + this.drugResponseCounts = drugResponseCounts; + this.evidenceTraitAssociationCounts = evidenceTraitAssociationCounts; + this.evidenceFunctionalEffectCounts = evidenceFunctionalEffectCounts; + this.evidenceTumorigenesisCounts = evidenceTumorigenesisCounts; + } + + @Override + public String toString() { + final StringBuilder sb = new StringBuilder("ClinicalVariantSummary{"); + sb.append("numCases=").append(numCases); + sb.append(", numPrimaryInterpretations=").append(numPrimaryInterpretations); + sb.append(", numSecondaryInterpretations=").append(numSecondaryInterpretations); + sb.append(", evidencePhenotypeCounts=").append(evidencePhenotypeCounts); + sb.append(", evidenceTierCounts=").append(evidenceTierCounts); + sb.append(", evidenceAcmgCounts=").append(evidenceAcmgCounts); + sb.append(", evidenceClinicalSignificanceCounts=").append(evidenceClinicalSignificanceCounts); + sb.append(", drugResponseCounts=").append(drugResponseCounts); + sb.append(", evidenceTraitAssociationCounts=").append(evidenceTraitAssociationCounts); + sb.append(", evidenceFunctionalEffectCounts=").append(evidenceFunctionalEffectCounts); + sb.append(", evidenceTumorigenesisCounts=").append(evidenceTumorigenesisCounts); + sb.append('}'); + return sb.toString(); + } + + public int getNumCases() { + return numCases; + } + + public ClinicalVariantSummary setNumCases(int numCases) { + this.numCases = numCases; + return this; + } + + public int getNumPrimaryInterpretations() { + return numPrimaryInterpretations; + } + + public ClinicalVariantSummary setNumPrimaryInterpretations(int numPrimaryInterpretations) { + this.numPrimaryInterpretations = numPrimaryInterpretations; + return this; + } + + public int getNumSecondaryInterpretations() { + return numSecondaryInterpretations; + } + + public ClinicalVariantSummary setNumSecondaryInterpretations(int numSecondaryInterpretations) { + this.numSecondaryInterpretations = numSecondaryInterpretations; + return this; + } + + public Map getEvidencePhenotypeCounts() { + return evidencePhenotypeCounts; + } + + public ClinicalVariantSummary setEvidencePhenotypeCounts(Map evidencePhenotypeCounts) { + this.evidencePhenotypeCounts = evidencePhenotypeCounts; + return this; + } + + public Map getEvidenceTierCounts() { + return evidenceTierCounts; + } + + public ClinicalVariantSummary setEvidenceTierCounts(Map evidenceTierCounts) { + this.evidenceTierCounts = evidenceTierCounts; + return this; + } + + public Map getEvidenceAcmgCounts() { + return evidenceAcmgCounts; + } + + public ClinicalVariantSummary setEvidenceAcmgCounts(Map evidenceAcmgCounts) { + this.evidenceAcmgCounts = evidenceAcmgCounts; + return this; + } + + public Map getEvidenceClinicalSignificanceCounts() { + return evidenceClinicalSignificanceCounts; + } + + public ClinicalVariantSummary setEvidenceClinicalSignificanceCounts(Map evidenceClinicalSignificanceCounts) { + this.evidenceClinicalSignificanceCounts = evidenceClinicalSignificanceCounts; + return this; + } + + public Map getDrugResponseCounts() { + return drugResponseCounts; + } + + public ClinicalVariantSummary setDrugResponseCounts(Map drugResponseCounts) { + this.drugResponseCounts = drugResponseCounts; + return this; + } + + public Map getEvidenceTraitAssociationCounts() { + return evidenceTraitAssociationCounts; + } + + public ClinicalVariantSummary setEvidenceTraitAssociationCounts(Map evidenceTraitAssociationCounts) { + this.evidenceTraitAssociationCounts = evidenceTraitAssociationCounts; + return this; + } + + public Map getEvidenceFunctionalEffectCounts() { + return evidenceFunctionalEffectCounts; + } + + public ClinicalVariantSummary setEvidenceFunctionalEffectCounts(Map evidenceFunctionalEffectCounts) { + this.evidenceFunctionalEffectCounts = evidenceFunctionalEffectCounts; + return this; + } + + public Map getEvidenceTumorigenesisCounts() { + return evidenceTumorigenesisCounts; + } + + public ClinicalVariantSummary setEvidenceTumorigenesisCounts(Map evidenceTumorigenesisCounts) { + this.evidenceTumorigenesisCounts = evidenceTumorigenesisCounts; + return this; + } +}