Skip to content

Commit

Permalink
Merge branch 'release-2.4.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Aug 2, 2022
2 parents 4f2a97e + df73148 commit 86856ba
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 18 deletions.
2 changes: 1 addition & 1 deletion biodata-external/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>biodata</artifactId>
<groupId>org.opencb.biodata</groupId>
<version>2.4.0</version>
<version>2.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion biodata-formats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion biodata-models/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package org.opencb.biodata.models.clinical;

public class ClinicalDiscussion {

private String author;
private String date;
private String text;

public ClinicalDiscussion() {
}

public ClinicalDiscussion(String author, String date, String text) {
this.author = author;
this.date = date;
this.text = text;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("ClinicalDiscussion{");
sb.append("author='").append(author).append('\'');
sb.append(", date='").append(date).append('\'');
sb.append(", text='").append(text).append('\'');
sb.append('}');
return sb.toString();
}

public String getAuthor() {
return author;
}

public ClinicalDiscussion setAuthor(String author) {
this.author = author;
return this;
}

public String getDate() {
return date;
}

public ClinicalDiscussion setDate(String date) {
this.date = date;
return this;
}

public String getText() {
return text;
}

public ClinicalDiscussion setText(String text) {
this.text = text;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.opencb.biodata.models.clinical.interpretation;

import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty;

import java.util.ArrayList;
Expand All @@ -32,15 +33,15 @@ public class ClinicalEvidenceReview {
private String tier;
private List<String> acmg;
private ClinicalProperty.ClinicalSignificance clinicalSignificance;
private String discussion;
private ClinicalDiscussion discussion;

public ClinicalEvidenceReview() {
this.select = false;
this.acmg = new ArrayList<>();
}

public ClinicalEvidenceReview(boolean select, String tier, List<String> acmg, ClinicalSignificance clinicalSignificance,
String discussion) {
ClinicalDiscussion discussion) {
this.select = select;
this.tier = tier;
this.acmg = acmg;
Expand Down Expand Up @@ -96,11 +97,11 @@ public ClinicalEvidenceReview setClinicalSignificance(ClinicalSignificance clini
return this;
}

public String getDiscussion() {
public ClinicalDiscussion getDiscussion() {
return discussion;
}

public ClinicalEvidenceReview setDiscussion(String discussion) {
public ClinicalEvidenceReview setDiscussion(ClinicalDiscussion discussion) {
this.discussion = discussion;
return this;
}
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.clinical.ClinicalComment;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.variant.Variant;
import org.opencb.biodata.models.variant.avro.VariantAvro;

Expand All @@ -33,7 +34,7 @@ public class ClinicalVariant extends Variant {
private List<ClinicalVariantEvidence> evidences;
private List<ClinicalComment> comments;
private Map<String, Object> filters;
private String discussion;
private ClinicalDiscussion discussion;

private Status status;

Expand All @@ -54,11 +55,13 @@ public ClinicalVariant() {
}

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

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

this.evidences = evidences;
Expand Down Expand Up @@ -109,11 +112,11 @@ public ClinicalVariant setFilters(Map<String, Object> filters) {
return this;
}

public String getDiscussion() {
public ClinicalDiscussion getDiscussion() {
return discussion;
}

public ClinicalVariant setDiscussion(String discussion) {
public ClinicalVariant setDiscussion(ClinicalDiscussion discussion) {
this.discussion = discussion;
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion biodata-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
import org.opencb.biodata.models.clinical.Disorder;
Expand Down Expand Up @@ -132,7 +133,7 @@ public List<ClinicalVariant> createSecondaryFindings(List<Variant> variants) {
// If we have clinical variant evidences, then we have to create the clinical variant
if (CollectionUtils.isNotEmpty(clinicalVariantEvidences)) {
ClinicalVariant clinicalVariant = new ClinicalVariant(variant.getImpl(), Collections.emptyList(), Collections.emptyList(),
Collections.emptyMap(), "", ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
Collections.emptyMap(), new ClinicalDiscussion(), ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
clinicalVariant.setEvidences(clinicalVariantEvidences);

// Add variant to the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance;
Expand Down Expand Up @@ -126,7 +127,7 @@ public List<ClinicalVariant> create(List<Variant> variants) {
// Create a clinical variant only if we have evidences
if (CollectionUtils.isNotEmpty(clinicalVariantEvidences)) {
ClinicalVariant clinicalVariant = new ClinicalVariant(variant.getImpl(), Collections.emptyList(), Collections.emptyList(),
Collections.emptyMap(), "", ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
Collections.emptyMap(), new ClinicalDiscussion(), ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
clinicalVariant.setEvidences(clinicalVariantEvidences);

// Add variant to the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance;
import org.opencb.biodata.models.clinical.ClinicalProperty.RoleInCancer;
Expand Down Expand Up @@ -124,7 +125,7 @@ public List<ClinicalVariant> create(List<Variant> variants) throws Interpretatio
// If we have clinical variant evidences, then we have to create the clinical variant
if (CollectionUtils.isNotEmpty(clinicalVariantEvidences)) {
ClinicalVariant clinicalVariant = new ClinicalVariant(variant.getImpl(), Collections.emptyList(), Collections.emptyList(),
Collections.emptyMap(), "", ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
Collections.emptyMap(), new ClinicalDiscussion(), ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
clinicalVariant.setEvidences(clinicalVariantEvidences);

// Add variant to the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.opencb.biodata.models.clinical.ClinicalDiscussion;
import org.opencb.biodata.models.clinical.ClinicalProperty.ModeOfInheritance;
import org.opencb.biodata.models.clinical.ClinicalProperty.Penetrance;
import org.opencb.biodata.models.clinical.interpretation.ClinicalVariant;
Expand Down Expand Up @@ -270,7 +271,7 @@ public List<ClinicalVariant> create(List<Variant> variants, Map<String, List<Mod
if (CollectionUtils.isNotEmpty(clinicalVariantEvidences)) {
logger.debug(variant.toStringSimple() + ": reported, num. evidences: " + clinicalVariantEvidences.size());
ClinicalVariant clinicalVariant = new ClinicalVariant(variant.getImpl(), Collections.emptyList(), Collections.emptyList(),
Collections.emptyMap(), "", ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
Collections.emptyMap(), new ClinicalDiscussion(), ClinicalVariant.Status.NOT_REVIEWED, Collections.emptyMap());
clinicalVariant.setEvidences(clinicalVariantEvidences);

// Add variant to the list
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<groupId>org.opencb.biodata</groupId>
<artifactId>biodata</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
<packaging>pom</packaging>

<name>Biodata</name>
Expand Down

0 comments on commit 86856ba

Please sign in to comment.