Skip to content

Commit

Permalink
models: update ClinicalVariant object, #189
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Sep 1, 2020
1 parent 0014f37 commit 5c1148b
Showing 1 changed file with 28 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@

public class ClinicalVariant extends Variant {

private double deNovoQualityScore;
private List<ClinicalVariantEvidence> evidences;
private List<String> interpretationMethodNames;
private List<ClinicalComment> comments;
private String discussion;

private Status status;

Expand All @@ -41,7 +42,7 @@ public class ClinicalVariant extends Variant {

public enum Status {
NOT_REVIEWED,
UNDER_REVIEW,
REVIEW_REQUESTED,
REVIEWED,
DISCARDED,
REPORTED
Expand All @@ -52,48 +53,49 @@ public ClinicalVariant() {
}

public ClinicalVariant(VariantAvro avro) {
this(avro, 0.0, new ArrayList<>(), new ArrayList<>(), Status.NOT_REVIEWED, new HashMap<>());
this(avro, new ArrayList<>(), new ArrayList<>(), new ArrayList<>(), "", Status.NOT_REVIEWED, new HashMap<>());
}

public ClinicalVariant(VariantAvro avro, double deNovoQualityScore, List<ClinicalVariantEvidence> evidences,
List<ClinicalComment> comments, Status status, Map<String, Object> attributes) {
public ClinicalVariant(VariantAvro avro, List<ClinicalVariantEvidence> evidences, List<String> interpretationMethodNames,
List<ClinicalComment> comments, String discussion, Status status, Map<String, Object> attributes) {
super(avro);

this.deNovoQualityScore = deNovoQualityScore;
this.evidences = evidences;
this.interpretationMethodNames = interpretationMethodNames;
this.comments = comments;
this.discussion = discussion;
this.status = status;
this.attributes = attributes;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("ClinicalVariant{");
sb.append("variant=").append(super.toString());
sb.append(", deNovoQualityScore=").append(deNovoQualityScore);
sb.append(", evidences=").append(evidences);
sb.append("evidences=").append(evidences);
sb.append(", interpretationMethodNames=").append(interpretationMethodNames);
sb.append(", comments=").append(comments);
sb.append(", discussion='").append(discussion).append('\'');
sb.append(", status=").append(status);
sb.append(", attributes=").append(attributes);
sb.append('}');
return sb.toString();
}

public double getDeNovoQualityScore() {
return deNovoQualityScore;
public List<ClinicalVariantEvidence> getEvidences() {
return evidences;
}

public ClinicalVariant setDeNovoQualityScore(double deNovoQualityScore) {
this.deNovoQualityScore = deNovoQualityScore;
public ClinicalVariant setEvidences(List<ClinicalVariantEvidence> evidences) {
this.evidences = evidences;
return this;
}

public List<ClinicalVariantEvidence> getEvidences() {
return evidences;
public List<String> getInterpretationMethodNames() {
return interpretationMethodNames;
}

public ClinicalVariant setEvidences(List<ClinicalVariantEvidence> evidences) {
this.evidences = evidences;
public ClinicalVariant setInterpretationMethodNames(List<String> interpretationMethodNames) {
this.interpretationMethodNames = interpretationMethodNames;
return this;
}

Expand All @@ -106,6 +108,15 @@ public ClinicalVariant setComments(List<ClinicalComment> comments) {
return this;
}

public String getDiscussion() {
return discussion;
}

public ClinicalVariant setDiscussion(String discussion) {
this.discussion = discussion;
return this;
}

public Status getStatus() {
return status;
}
Expand Down

0 comments on commit 5c1148b

Please sign in to comment.