Skip to content

Commit

Permalink
Merge branch 'develop' into TASK-5278
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarraga committed Feb 16, 2024
2 parents 7425629 + 0ec0cbb commit 93856d3
Show file tree
Hide file tree
Showing 15 changed files with 209 additions and 53 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.13.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 deletions 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.13.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -88,11 +88,11 @@
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<scope>test</scope>
</dependency>
</dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package org.opencb.biodata.formats.variant.annotation.io;

import org.codehaus.jackson.map.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Test;
import org.opencb.biodata.models.variant.Variant;
import org.opencb.biodata.models.variant.avro.VariantAvro;
Expand Down
6 changes: 3 additions & 3 deletions 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.13.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -74,10 +74,10 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
</dependency>-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.opencb.biodata.models.alignment;

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.ObjectWriter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import org.opencb.biodata.models.core.Region;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package org.opencb.biodata.models.clinical;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.opencb.biodata.models.constants.FieldConstants;
import org.opencb.commons.annotations.DataField;

import java.util.Map;

public class ClinicalAnalyst {

@DataField(id = "id", indexed = true,
Expand All @@ -17,23 +20,31 @@ public class ClinicalAnalyst {
description = FieldConstants.CLINICAL_ANALYST_EMAIL_DESCRIPTION)
private String email;

@DataField(id = "assignedBy", indexed = true,
description = FieldConstants.CLINICAL_ANALYST_ASSIGNED_BY_DESCRIPTION)
@DataField(id = "role", indexed = true,
description = FieldConstants.CLINICAL_ANALYST_ROLE_DESCRIPTION)
private String role;

@DataField(id = "attributes", indexed = true,
description = FieldConstants.CLINICAL_ANALYST_ATTRIBUTES_DESCRIPTION)
private Map<String, Object> attributes;

@Deprecated
@DataField(id = "assignedBy")
private String assignedBy;

@DataField(id = "date", indexed = true,
description = FieldConstants.CLINICAL_ANALYST_DATE_DESCRIPTION)
@Deprecated
@DataField(id = "date")
private String date;

public ClinicalAnalyst() {
}

public ClinicalAnalyst(String id, String name, String email, String assignedBy, String date) {
public ClinicalAnalyst(String id, String name, String email, String role, Map<String, Object> attributes) {
this.id = id;
this.name = name;
this.email = email;
this.assignedBy = assignedBy;
this.date = date;
this.role = role;
this.attributes = attributes;
}

@Override
Expand All @@ -42,8 +53,8 @@ public String toString() {
sb.append("id='").append(id).append('\'');
sb.append(", name='").append(name).append('\'');
sb.append(", email='").append(email).append('\'');
sb.append(", assignedBy='").append(assignedBy).append('\'');
sb.append(", date='").append(date).append('\'');
sb.append(", role='").append(role).append('\'');
sb.append(", attributes=").append(attributes);
sb.append('}');
return sb.toString();
}
Expand Down Expand Up @@ -75,21 +86,43 @@ public ClinicalAnalyst setEmail(String email) {
return this;
}

public String getRole() {
return role;
}

public ClinicalAnalyst setRole(String role) {
this.role = role;
return this;
}

public Map<String, Object> getAttributes() {
return attributes;
}

public ClinicalAnalyst setAttributes(Map<String, Object> attributes) {
this.attributes = attributes;
return this;
}

@JsonIgnore
@Deprecated
public String getAssignedBy() {
return assignedBy;
}

@Deprecated
public ClinicalAnalyst setAssignedBy(String assignedBy) {
this.assignedBy = assignedBy;
return this;
}

@JsonIgnore
@Deprecated
public String getDate() {
return date;
}

@Deprecated
public ClinicalAnalyst setDate(String date) {
this.date = date;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public class ClinicalVariant extends Variant {
private List<ClinicalVariantEvidence> evidences;
private List<ClinicalComment> comments;
private Map<String, Object> filters;
private String recommendation;
private List<MiniPubmed> references;
private ClinicalDiscussion discussion;
private ClinicalVariantConfidence confidence;
private List<String> tags;
Expand Down Expand Up @@ -76,6 +78,7 @@ public ClinicalVariant(VariantAvro avro, List<ClinicalVariantEvidence> evidences
this.attributes = attributes;
}

@Deprecated
public ClinicalVariant(VariantAvro avro, List<ClinicalVariantEvidence> evidences, List<ClinicalComment> comments,
Map<String, Object> filters, ClinicalDiscussion discussion,
ClinicalVariantConfidence confidence, Status status, List<String> tags,
Expand All @@ -92,19 +95,27 @@ public ClinicalVariant(VariantAvro avro, List<ClinicalVariantEvidence> evidences
this.attributes = attributes;
}

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

this.evidences = evidences;
this.comments = comments;
this.filters = filters;
this.recommendation = recommendation;
this.references = references;
this.discussion = discussion;
this.status = status;
this.tags = tags;
this.confidence = confidence;
this.attributes = attributes;
}

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

public List<ClinicalVariantEvidence> getEvidences() {
Expand Down Expand Up @@ -134,6 +145,24 @@ public ClinicalVariant setFilters(Map<String, Object> filters) {
return this;
}

public String getRecommendation() {
return recommendation;
}

public ClinicalVariant setRecommendation(String recommendation) {
this.recommendation = recommendation;
return this;
}

public List<MiniPubmed> getReferences() {
return references;
}

public ClinicalVariant setReferences(List<MiniPubmed> references) {
this.references = references;
return this;
}

public ClinicalDiscussion getDiscussion() {
return discussion;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package org.opencb.biodata.models.clinical.interpretation;

public class MiniPubmed {

private String id;
private String name;
private String journal;
private String summary;
private String date;
private String url;

public MiniPubmed() {
}

public MiniPubmed(String id, String name, String summary, String date, String url, String journal) {
this.id = id;
this.name = name;
this.summary = summary;
this.date = date;
this.url = url;
this.journal = journal;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("MiniPubmed{");
sb.append("id='").append(id).append('\'');
sb.append(", name='").append(name).append('\'');
sb.append(", summary='").append(summary).append('\'');
sb.append(", date=").append(date);
sb.append(", url='").append(url).append('\'');
sb.append(", journal='").append(journal).append('\'');
sb.append('}');
return sb.toString();
}

public String getId() {
return id;
}

public MiniPubmed setId(String id) {
this.id = id;
return this;
}

public String getName() {
return name;
}

public MiniPubmed setName(String name) {
this.name = name;
return this;
}

public String getSummary() {
return summary;
}

public MiniPubmed setSummary(String summary) {
this.summary = summary;
return this;
}

public String getDate() {
return date;
}

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

public String getUrl() {
return url;
}

public MiniPubmed setUrl(String url) {
this.url = url;
return this;
}

public String getJournal() {
return journal;
}

public MiniPubmed setJournal(String journal) {
this.journal = journal;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

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

import org.codehaus.jackson.map.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.opencb.biodata.models.clinical.Disorder;
import org.opencb.biodata.models.clinical.Phenotype;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public class FieldConstants {
public static final String RELATEDNESS_REPORT_SCORES_DESCRIPTION = "Relatedness scores for pair of samples";
public static final String RELATEDNESS_REPORT_FILES_DESCRIPTION = "List of files of Relatedness Report";

public static final String CLINICAL_ANALYST_DATE_DESCRIPTION = "Date of the clinical analyst";
public static final String CLINICAL_ANALYST_ASSIGNED_BY_DESCRIPTION = "Assigned by field";
public static final String CLINICAL_ANALYST_ROLE_DESCRIPTION = "Analyst role";
public static final String CLINICAL_ANALYST_ATTRIBUTES_DESCRIPTION = "Analyst attributes";

public static final String CLINICAL_ANALYST_EMAIL_DESCRIPTION = "Email of the analyst";
public static final String AUDIT_AUTHOR_DESCRIPTION = "Audit author";
Expand Down
6 changes: 3 additions & 3 deletions 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.13.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -90,10 +90,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</dependency>
</dependency>-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Loading

0 comments on commit 93856d3

Please sign in to comment.