Skip to content

Commit

Permalink
Merge pull request #695 from opencb/TASK-5318
Browse files Browse the repository at this point in the history
TASK-5318 - Implement custom annotator to allow clients private files
  • Loading branch information
jtarraga authored Sep 26, 2024
2 parents 8f1e774 + c910a88 commit a2084c5
Show file tree
Hide file tree
Showing 7 changed files with 286 additions and 634 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ public CellBaseException(String msg) {
super(msg);
}

public CellBaseException(String msg, Exception e) {
super(msg, e);
public CellBaseException(String msg, Throwable cause) {
super(msg, cause);
}

public CellBaseException(Throwable cause) {
super(cause);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.apache.commons.lang3.StringUtils;
import org.opencb.biodata.formats.variant.clinvar.rcv.ClinvarParser;
import org.opencb.biodata.formats.variant.clinvar.rcv.v64jaxb.*;
import org.opencb.biodata.models.sequence.SequenceLocation;
import org.opencb.biodata.models.variant.avro.*;
import org.opencb.cellbase.lib.EtlCommons;
import org.opencb.cellbase.lib.variant.VariantAnnotationUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,92 +230,4 @@ protected void addHaplotypeProperty(List<EvidenceEntry> evidenceEntryList, List<
}
}
}

class SequenceLocation {
private String chromosome;
private int start;
private int end;
private String reference;
private String alternate;
private String strand;

SequenceLocation() {
}

SequenceLocation(String chromosome, int start, int end, String reference, String alternate) {
this(chromosome, start, end, reference, alternate, "+");
}

SequenceLocation(String chromosome, int start, int end, String reference, String alternate, String strand) {
this.chromosome = chromosome;
this.start = start;
this.end = end;
this.reference = reference;
this.alternate = alternate;
this.strand = strand;
}

@Override
public String toString() {
final StringBuilder sb = new StringBuilder("SequenceLocation{");
sb.append("chromosome='").append(chromosome).append('\'');
sb.append(", start=").append(start);
sb.append(", end=").append(end);
sb.append(", reference='").append(reference).append('\'');
sb.append(", alternate='").append(alternate).append('\'');
sb.append(", strand='").append(strand).append('\'');
sb.append('}');
return sb.toString();
}

public String getChromosome() {
return chromosome;
}

public int getStart() {
return start;
}

public int getEnd() {
return end;
}

public String getReference() {
return reference;
}

public String getAlternate() {
return alternate;
}

public String getStrand() {
return strand;
}

public void setChromosome(String chromosome) {
this.chromosome = chromosome;
}

public void setStart(int start) {
this.start = start;
}

public void setEnd(int end) {
this.end = end;
}

public void setReference(String reference) {
this.reference = reference;
}

public void setAlternate(String alternate) {
this.alternate = alternate;
}

public void setStrand(String strand) {
this.strand = strand;
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import org.opencb.biodata.models.variant.Variant;
import org.opencb.biodata.models.variant.avro.VariantAnnotation;
import org.opencb.cellbase.core.exception.CellBaseException;
import org.opencb.cellbase.core.serializer.CellBaseSerializer;
import org.opencb.cellbase.lib.EtlCommons;
import org.opencb.cellbase.lib.builders.CellBaseBuilder;
Expand Down Expand Up @@ -99,7 +100,7 @@ public ClinicalVariantBuilder(Path clinvarXMLFile, Path clinvarSummaryFile, Path
this.assembly = assembly;
}

public void parse() throws IOException, RocksDBException {
public void parse() throws IOException, RocksDBException, CellBaseException {

RocksDB rdb = null;
Options dbOption = null;
Expand Down
Loading

0 comments on commit a2084c5

Please sign in to comment.