Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add gnomad constraints and mirna targets to variant annotation #190

Merged
merged 5 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions biodata-models/src/main/avro/variantAnnotation.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ protocol VariantAnnotations {

enum ExpressionCall {UP, DOWN}

// deprecated
record ClinVar {
union { null, string } accession;
union { null, string } clinicalSignificance;
Expand All @@ -15,13 +16,15 @@ protocol VariantAnnotations {
union { null, string } reviewStatus;
}

// deprecated
record Gwas {
union { null, string } snpIdCurrent;
union { null, array<string> } traits;
union { null, double } riskAlleleFrequency;
union { null, string } reportedGenes;
}

// deprecated
record Cosmic {
union { null, string } mutationId;
union { null, string } primarySite;
Expand All @@ -34,6 +37,7 @@ protocol VariantAnnotations {
union { null, string } mutationSomaticStatus;
}

// deprecated
record VariantTraitAssociation {
union { null, array<ClinVar> } clinvar;
union { null, array<Gwas> } gwas;
Expand Down Expand Up @@ -62,6 +66,19 @@ protocol VariantAnnotations {
union { null, float } pvalue;
}

record Constraint {
union { null, string } source;
union { null, string } method;
union { null, string } name;
union { null, double } value;
}

record GeneMirnaTarget {
union { null, string } id;
union { null, string } name;
union { null, string } biotype;
}

record GeneTraitAssociation {
string id;
string name;
Expand Down Expand Up @@ -203,6 +220,8 @@ protocol VariantAnnotations {
union { null, array<Expression> } geneExpression;
union { null, array<GeneTraitAssociation> } geneTraitAssociation;
union { null, array<GeneDrugInteraction> } geneDrugInteraction;
union { null, array<Constraint> } geneConstraints;
union { null, array<GeneMirnaTarget> } geneMirnaTargets;
union { null, VariantTraitAssociation } variantTraitAssociation;
union { null, array<EvidenceEntry> } traitAssociation;
union { null, array<Score> } functionalScore;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import org.opencb.biodata.models.variant.avro.Expression;
import org.opencb.biodata.models.variant.avro.GeneDrugInteraction;
import org.opencb.biodata.models.variant.avro.GeneTraitAssociation;
import org.opencb.biodata.models.variant.avro.Constraint;


import java.util.List;

Expand All @@ -32,18 +34,18 @@ public class GeneAnnotation {
private List<GeneTraitAssociation> diseases;
private List<GeneDrugInteraction> drugs;
private List<Constraint> constraints;
private List<MiRnaTarget> targets;
private List<MirnaTarget> mirnaTargets;

public GeneAnnotation() {
}

public GeneAnnotation(List<Expression> expression, List<GeneTraitAssociation> diseases,
List<GeneDrugInteraction> drugs, List<Constraint> constraints, List<MiRnaTarget> targets) {
List<GeneDrugInteraction> drugs, List<Constraint> constraints, List<MirnaTarget> mirnaTargets) {
this.expression = expression;
this.diseases = diseases;
this.drugs = drugs;
this.constraints = constraints;
this.targets = targets;
this.mirnaTargets = mirnaTargets;
}

@Override
Expand All @@ -53,7 +55,7 @@ public String toString() {
sb.append(", geneTraits=").append(diseases);
sb.append(", drugs=").append(drugs);
sb.append(", constraints=").append(constraints);
sb.append(", targets=").append(targets);
sb.append(", targets=").append(mirnaTargets);
sb.append('}');
return sb.toString();
}
Expand Down Expand Up @@ -94,12 +96,12 @@ public GeneAnnotation setConstraints(List<Constraint> constraints) {
return this;
}

public List<MiRnaTarget> getTargets() {
return targets;
public List<MirnaTarget> getMirnaTargets() {
return mirnaTargets;
}

public GeneAnnotation setTargets(List<MiRnaTarget> targets) {
this.targets = targets;
public GeneAnnotation setMirnaTargets(List<MirnaTarget> mirnaTargets) {
this.mirnaTargets = mirnaTargets;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import java.util.List;

public class MiRnaTarget {
public class MirnaTarget {

/**
* miRTarBase ID, e.g. MIRT735377
Expand All @@ -42,11 +42,11 @@ public class MiRnaTarget {



public MiRnaTarget() {
public MirnaTarget() {

}

public MiRnaTarget(String id, String source, String sourceId, List<TargetGene> targets) {
public MirnaTarget(String id, String source, String sourceId, List<TargetGene> targets) {
this.id = id;
this.source = source;
this.sourceId = sourceId;
Expand All @@ -68,7 +68,7 @@ public String getId() {
return id;
}

public MiRnaTarget setId(String id) {
public MirnaTarget setId(String id) {
this.id = id;
return this;
}
Expand All @@ -77,7 +77,7 @@ public String getSource() {
return source;
}

public MiRnaTarget setSource(String source) {
public MirnaTarget setSource(String source) {
this.source = source;
return this;
}
Expand All @@ -86,7 +86,7 @@ public String getSourceId() {
return sourceId;
}

public MiRnaTarget setSourceId(String sourceId) {
public MirnaTarget setSourceId(String sourceId) {
this.sourceId = sourceId;
return this;
}
Expand All @@ -95,7 +95,7 @@ public List<TargetGene> getTargets() {
return targets;
}

public MiRnaTarget setTargets(List<TargetGene> targets) {
public MirnaTarget setTargets(List<TargetGene> targets) {
this.targets = targets;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public class Transcript implements Serializable {
private String description;
private String version;
private String source;
private String supportLevel;
private List<Exon> exons;
private List<Xref> xrefs;
private List<TranscriptTfbs> tfbs;
Expand Down Expand Up @@ -113,7 +112,7 @@ public Transcript(String id, String name, String chromosome, int start, int end,
}

public Transcript(String id, String name, String biotype, String status, String source, String chromosome, Integer start, Integer end,
String strand, String version, String supportLevel, Integer codingRegionStart, Integer codingRegionEnd,
String strand, String version, Integer codingRegionStart, Integer codingRegionEnd,
Integer cdnaCodingStart, Integer cdnaCodingEnd, Integer cdsLength, String proteinId, String description,
List<Xref> xrefs, List<Exon> exons, List<TranscriptTfbs> tfbs, TranscriptAnnotation annotation) {
this.id = id;
Expand All @@ -126,7 +125,6 @@ public Transcript(String id, String name, String biotype, String status, String
this.strand = strand;
this.version = version;
this.source = source;
this.supportLevel = supportLevel;
this.genomicCodingStart = codingRegionStart;
this.genomicCodingEnd = codingRegionEnd;
this.cdnaCodingStart = cdnaCodingStart;
Expand Down Expand Up @@ -170,7 +168,6 @@ public String toString() {
sb.append(", description='").append(description).append('\'');
sb.append(", version=").append(version);
sb.append(", source='").append(source).append('\'');
sb.append(", supportLevel='").append(supportLevel).append('\'');
sb.append(", exons=").append(exons);
sb.append(", xrefs=").append(xrefs);
sb.append(", tfbs=").append(tfbs);
Expand Down Expand Up @@ -270,15 +267,6 @@ public Transcript setSource(String source) {
return this;
}

public String getSupportLevel() {
return supportLevel;
}

public Transcript setSupportLevel(String supportLevel) {
this.supportLevel = supportLevel;
return this;
}

public int getGenomicCodingStart() {
return genomicCodingStart;
}
Expand Down Expand Up @@ -429,7 +417,6 @@ public boolean equals(Object o) {
Objects.equals(getProteinSequence(), that.getProteinSequence()) &&
Objects.equals(getDescription(), that.getDescription()) &&
Objects.equals(getSource(), that.getSource()) &&
Objects.equals(getSupportLevel(), that.getSupportLevel()) &&
Objects.equals(getExons(), that.getExons()) &&
Objects.equals(getXrefs(), that.getXrefs()) &&
Objects.equals(getTfbs(), that.getTfbs()) &&
Expand All @@ -439,6 +426,6 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(getId(), getName(), getChromosome(), getStart(), getEnd(), getStrand(), getBiotype(), getStatus(), getGenomicCodingStart(), getGenomicCodingEnd(), getCdnaCodingStart(), getCdnaCodingEnd(), getCdsLength(), getcDnaSequence(), getProteinId(), getProteinSequence(), getDescription(), getVersion(), getSource(), getSupportLevel(), getExons(), getXrefs(), getTfbs(), getAnnotationFlags(), getAnnotation());
return Objects.hash(getId(), getName(), getChromosome(), getStart(), getEnd(), getStrand(), getBiotype(), getStatus(), getGenomicCodingStart(), getGenomicCodingEnd(), getCdnaCodingStart(), getCdnaCodingEnd(), getCdsLength(), getcDnaSequence(), getProteinId(), getProteinSequence(), getDescription(), getVersion(), getSource(), getExons(), getXrefs(), getTfbs(), getAnnotationFlags(), getAnnotation());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.opencb.biodata.models.core;

import java.util.List;

import org.opencb.biodata.models.variant.avro.Constraint;

public class TranscriptAnnotation {

Expand Down