diff --git a/pom.xml b/pom.xml index cd908cf8..de96bce8 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,7 @@ eva-pipeline 2.9.8-SNAPSHOT + jar org.springframework.boot @@ -177,9 +178,13 @@ spring-boot-maven-plugin + repackage repackage + + exec + diff --git a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/HgvsMongo.java b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/HgvsMongo.java index 2841fed5..8757b2dd 100644 --- a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/HgvsMongo.java +++ b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/HgvsMongo.java @@ -40,4 +40,8 @@ public HgvsMongo(String type, String name) { this.type = type; this.name = name; } + + public String getName() { + return name; + } } diff --git a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantSourceEntryMongo.java b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantSourceEntryMongo.java index a75b653d..30369a4b 100644 --- a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantSourceEntryMongo.java +++ b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantSourceEntryMongo.java @@ -71,6 +71,20 @@ public class VariantSourceEntryMongo { // Spring empty constructor } + public VariantSourceEntryMongo(String fileId, String studyId, String[] alternates, BasicDBObject attrs, String format, BasicDBObject samp) { + this.fileId = fileId; + this.studyId = studyId; + if (alternates != null && alternates.length > 0) { + this.alternates = Arrays.stream(alternates) + .map(a -> a.toUpperCase()) + .collect(Collectors.toList()) + .toArray(new String[0]); + } + this.attrs = attrs; + this.format = format; + this.samp = samp; + } + public VariantSourceEntryMongo(String fileId, String studyId, String[] alternates, Map attributes) { this.fileId = fileId; this.studyId = studyId; @@ -193,4 +207,8 @@ public String[] getAlternates() { public BasicDBObject getAttrs() { return attrs; } + + public String getFormat() { + return format; + } } diff --git a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantStatsMongo.java b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantStatsMongo.java index e66a3071..c6cd9ca0 100644 --- a/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantStatsMongo.java +++ b/src/main/java/uk/ac/ebi/eva/commons/models/mongo/entity/subdocuments/VariantStatsMongo.java @@ -81,6 +81,19 @@ public class VariantStatsMongo { //Empty constructor for spring } + public VariantStatsMongo(String studyId, String fileId, String cohortId, float maf, float mgf, String mafAllele, String mgfGenotype, int missingAlleles, int missingGenotypes, Map numGt) { + this.studyId = studyId; + this.fileId = fileId; + this.cohortId = cohortId; + this.maf = maf; + this.mgf = mgf; + this.mafAllele = mafAllele; + this.mgfGenotype = mgfGenotype; + this.missingAlleles = missingAlleles; + this.missingGenotypes = missingGenotypes; + this.numGt = numGt; + } + public VariantStatsMongo(String studyId, String fileId, String cohortId, VariantStats stats) { this.studyId = studyId; this.fileId = fileId;