Skip to content

Commit

Permalink
Version 0.9.1 using OpenCGA 0.4.0 final
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristina Yenyxe Gonzalez Garcia committed Mar 2, 2015
1 parent 8e0fb3c commit 63e2e5d
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion eva-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>uk.ac.ebi.variation.eva</groupId>
<artifactId>eva</artifactId>
<version>0.3.1</version>
<version>0.9.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down Expand Up @@ -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");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("%'");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,6 +90,11 @@ public QueryResult getSamplesBySources(List<String> 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;
Expand Down Expand Up @@ -213,7 +219,7 @@ public List<QueryResult> getSourceDownloadUrlByName(List<String> 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.
}

Expand Down
2 changes: 1 addition & 1 deletion eva-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>eva</artifactId>
<groupId>uk.ac.ebi.variation.eva</groupId>
<version>0.3.1</version>
<version>0.9.1</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>uk.ac.ebi.variation.eva</groupId>
<artifactId>eva</artifactId>
<packaging>pom</packaging>
<version>0.3.1</version>
<version>0.9.1</version>

<modules>
<module>eva-lib</module>
Expand Down

0 comments on commit 63e2e5d

Please sign in to comment.