From 63e2e5d299acca0652278930d2f11698b1f6b21a Mon Sep 17 00:00:00 2001 From: Cristina Yenyxe Gonzalez Garcia Date: Mon, 2 Mar 2015 13:33:16 +0000 Subject: [PATCH] Version 0.9.1 using OpenCGA 0.4.0 final --- eva-lib/pom.xml | 2 +- .../eva/lib/storage/metadata/ArchiveDgvaDBAdaptor.java | 4 ++-- .../eva/lib/storage/metadata/ArchiveEvaproDBAdaptor.java | 8 ++++---- .../eva/lib/storage/metadata/StudyDgvaDBAdaptor.java | 6 +++--- .../eva/lib/storage/metadata/StudyEvaproDBAdaptor.java | 8 ++++---- .../storage/metadata/VariantSourceEvaproDBAdaptor.java | 8 +++++++- eva-server/pom.xml | 2 +- pom.xml | 2 +- 8 files changed, 23 insertions(+), 17 deletions(-) diff --git a/eva-lib/pom.xml b/eva-lib/pom.xml index 47a7e6074..4e668fd08 100644 --- a/eva-lib/pom.xml +++ b/eva-lib/pom.xml @@ -5,7 +5,7 @@ uk.ac.ebi.variation.eva eva - 0.3.1 + 0.9.1 4.0.0 diff --git a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveDgvaDBAdaptor.java b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveDgvaDBAdaptor.java index f5fefb7e1..9ca190988 100644 --- a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveDgvaDBAdaptor.java +++ b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveDgvaDBAdaptor.java @@ -90,9 +90,9 @@ public QueryResult countStudiesPerType(QueryOptions options) { StringBuilder query = new StringBuilder("select study_type, count(*) as COUNT from dgva_study_browser "); if (options.containsKey("species")) { query.append("where "); - query.append(EvaproUtils.getInClause("common_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("common_name", options.getAsStringList("species"))); query.append(" or "); - query.append(EvaproUtils.getInClause("scientific_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("scientific_name", options.getAsStringList("species"))); } query.append(" group by study_type order by COUNT desc"); diff --git a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveEvaproDBAdaptor.java b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveEvaproDBAdaptor.java index ad712d16a..0e6074c57 100644 --- a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveEvaproDBAdaptor.java +++ b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/ArchiveEvaproDBAdaptor.java @@ -50,9 +50,9 @@ public QueryResult countStudiesPerSpecies(QueryOptions options) { StringBuilder query = new StringBuilder("select common_name, count(*) as COUNT from study_browser "); if (options.containsKey("species")) { query.append("where "); - query.append(EvaproUtils.getInClause("common_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("common_name", options.getAsStringList("species"))); query.append(" or "); - query.append(EvaproUtils.getInClause("scientific_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("scientific_name", options.getAsStringList("species"))); } query.append(" group by common_name order by COUNT desc"); @@ -96,9 +96,9 @@ public QueryResult countStudiesPerType(QueryOptions options) { StringBuilder query = new StringBuilder("select experiment_type, count(*) as COUNT from study_browser "); if (options.containsKey("species")) { query.append("where "); - query.append(EvaproUtils.getInClause("common_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("common_name", options.getAsStringList("species"))); query.append(" or "); - query.append(EvaproUtils.getInClause("scientific_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("scientific_name", options.getAsStringList("species"))); } query.append(" group by experiment_type order by COUNT desc"); diff --git a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyDgvaDBAdaptor.java b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyDgvaDBAdaptor.java index 1245b82df..0b15ed2f8 100644 --- a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyDgvaDBAdaptor.java +++ b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyDgvaDBAdaptor.java @@ -42,16 +42,16 @@ public QueryResult getAllStudies(QueryOptions options) { } if (hasSpecies) { query.append("("); - query.append(EvaproUtils.getInClause("common_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("common_name", options.getAsStringList("species"))); query.append(" or "); - query.append(EvaproUtils.getInClause("scientific_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("scientific_name", options.getAsStringList("species"))); query.append(")"); } if (hasType) { if (hasSpecies) { query.append(" and "); } - query.append(EvaproUtils.getInClause("study_type", options.getListAs("type", String.class))); + query.append(EvaproUtils.getInClause("study_type", options.getAsStringList("species"))); } Connection conn = null; diff --git a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyEvaproDBAdaptor.java b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyEvaproDBAdaptor.java index 70225e241..fbbe835a0 100644 --- a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyEvaproDBAdaptor.java +++ b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/StudyEvaproDBAdaptor.java @@ -42,17 +42,17 @@ public QueryResult getAllStudies(QueryOptions options) { } if (hasSpecies) { query.append("("); - query.append(EvaproUtils.getInClause("common_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("common_name", options.getAsStringList("species"))); query.append(" or "); - query.append(EvaproUtils.getInClause("scientific_name", options.getListAs("species", String.class))); + query.append(EvaproUtils.getInClause("scientific_name", options.getAsStringList("species"))); query.append(")"); } if (hasType) { if (hasSpecies) { query.append(" and "); } - query.append(EvaproUtils.getInClause("experiment_type", options.getListAs("type", String.class))); - for (String t : options.getListAs("type", String.class)) { + query.append(EvaproUtils.getInClause("experiment_type", options.getAsStringList("type"))); + for (String t : options.getAsStringList("type")) { query.append(" or experiment_type like '%").append(t).append("%'"); } } diff --git a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/VariantSourceEvaproDBAdaptor.java b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/VariantSourceEvaproDBAdaptor.java index 33cb4ce90..c90161232 100644 --- a/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/VariantSourceEvaproDBAdaptor.java +++ b/eva-lib/src/main/java/uk/ac/ebi/variation/eva/lib/storage/metadata/VariantSourceEvaproDBAdaptor.java @@ -14,6 +14,7 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; +import org.opencb.biodata.models.variant.stats.VariantSourceStats; import org.opencb.datastore.core.QueryOptions; import org.opencb.datastore.core.QueryResult; import org.opencb.opencga.storage.core.variant.adaptors.VariantSourceDBAdaptor; @@ -89,6 +90,11 @@ public QueryResult getSamplesBySources(List fileIds, QueryOptions option throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } + @Override + public QueryResult getSourceDownloadUrlById(String fileId, String studyId) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + @Override public QueryResult getSourceDownloadUrlByName(String filename) { Connection conn = null; @@ -213,7 +219,7 @@ public List getSourceDownloadUrlByName(List filenames) { } @Override - public QueryResult getSourceDownloadUrlById(String fileId, String studyId) { + public QueryResult updateSourceStats(VariantSourceStats variantSourceStats, QueryOptions queryOptions) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } diff --git a/eva-server/pom.xml b/eva-server/pom.xml index db0ddc756..ca3a8c407 100644 --- a/eva-server/pom.xml +++ b/eva-server/pom.xml @@ -5,7 +5,7 @@ eva uk.ac.ebi.variation.eva - 0.3.1 + 0.9.1 .. diff --git a/pom.xml b/pom.xml index 67a5b3678..e5cdd35a4 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ uk.ac.ebi.variation.eva eva pom - 0.3.1 + 0.9.1 eva-lib