Skip to content

Commit

Permalink
models: update ClinicalVariantEvidence object, #189
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Sep 1, 2020
1 parent 5c1148b commit 426ec38
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class ClinicalVariantEvidence {
private String interpretationMethodName;

private List<Phenotype> phenotypes;
private List<SequenceOntologyTerm> consequenceTypes;
private GenomicFeature genomicFeature;
private ModeOfInheritance modeOfInheritance;
private String panelId;
Expand All @@ -47,20 +46,18 @@ public class ClinicalVariantEvidence {

public ClinicalVariantEvidence() {
phenotypes = Collections.emptyList();
consequenceTypes = Collections.emptyList();
compoundHeterozygousVariantIds = Collections.emptyList();
fullyExplainPhenotypes = false;
actionable = false;
}

public ClinicalVariantEvidence(String interpretationMethodName, List<Phenotype> phenotypes, List<SequenceOntologyTerm> consequenceTypes,
GenomicFeature genomicFeature, ModeOfInheritance modeOfInheritance, String panelId,
VariantClassification classification, Penetrance penetrance, double score,
boolean fullyExplainPhenotypes, List<String> compoundHeterozygousVariantIds, RoleInCancer roleInCancer,
boolean actionable, String justification) {
public ClinicalVariantEvidence(String interpretationMethodName, List<Phenotype> phenotypes, GenomicFeature genomicFeature,
ModeOfInheritance modeOfInheritance, String panelId, VariantClassification classification,
Penetrance penetrance, double score, boolean fullyExplainPhenotypes,
List<String> compoundHeterozygousVariantIds, RoleInCancer roleInCancer, boolean actionable,
String justification) {
this.interpretationMethodName = interpretationMethodName;
this.phenotypes = phenotypes;
this.consequenceTypes = consequenceTypes;
this.genomicFeature = genomicFeature;
this.modeOfInheritance = modeOfInheritance;
this.panelId = panelId;
Expand All @@ -79,7 +76,6 @@ public String toString() {
final StringBuilder sb = new StringBuilder("ClinicalVariantEvidence{");
sb.append("interpretationMethodName='").append(interpretationMethodName).append('\'');
sb.append(", phenotypes=").append(phenotypes);
sb.append(", consequenceTypes=").append(consequenceTypes);
sb.append(", genomicFeature=").append(genomicFeature);
sb.append(", modeOfInheritance=").append(modeOfInheritance);
sb.append(", panelId='").append(panelId).append('\'');
Expand Down Expand Up @@ -113,15 +109,6 @@ public ClinicalVariantEvidence setPhenotypes(List<Phenotype> phenotypes) {
return this;
}

public List<SequenceOntologyTerm> getConsequenceTypes() {
return consequenceTypes;
}

public ClinicalVariantEvidence setConsequenceTypes(List<SequenceOntologyTerm> consequenceTypes) {
this.consequenceTypes = consequenceTypes;
return this;
}

public GenomicFeature getGenomicFeature() {
return genomicFeature;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.opencb.biodata.models.clinical.interpretation;

import org.opencb.biodata.models.core.Xref;
import org.opencb.biodata.models.variant.avro.SequenceOntologyTerm;

import java.util.List;

Expand All @@ -28,19 +29,35 @@ public class GenomicFeature {
private String type; // GENE, VARIANT, REGION,...
private String transcriptId;
private String geneName;
private List<SequenceOntologyTerm> consequenceTypes;
private List<Xref> xrefs;

public GenomicFeature() {
}

public GenomicFeature(String id, String type, String transcriptId, String geneName, List<Xref> xrefs) {
public GenomicFeature(String id, String type, String transcriptId, String geneName, List<SequenceOntologyTerm> consequenceTypes,
List<Xref> xrefs) {
this.id = id;
this.type = type;
this.transcriptId = transcriptId;
this.geneName = geneName;
this.consequenceTypes = consequenceTypes;
this.xrefs = xrefs;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("GenomicFeature{");
sb.append("id='").append(id).append('\'');
sb.append(", type='").append(type).append('\'');
sb.append(", transcriptId='").append(transcriptId).append('\'');
sb.append(", geneName='").append(geneName).append('\'');
sb.append(", consequenceTypes=").append(consequenceTypes);
sb.append(", xrefs=").append(xrefs);
sb.append('}');
return sb.toString();
}

public String getId() {
return id;
}
Expand Down Expand Up @@ -77,6 +94,15 @@ public GenomicFeature setGeneName(String geneName) {
return this;
}

public List<SequenceOntologyTerm> getConsequenceTypes() {
return consequenceTypes;
}

public GenomicFeature setConsequenceTypes(List<SequenceOntologyTerm> consequenceTypes) {
this.consequenceTypes = consequenceTypes;
return this;
}

public List<Xref> getXrefs() {
return xrefs;
}
Expand Down

0 comments on commit 426ec38

Please sign in to comment.