From 8d23c7889b3ab02bb919ac9243c7c34f0d8d9112 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Mon, 4 Sep 2017 16:56:22 +0200 Subject: [PATCH 1/8] [maven-release-plugin] prepare for next development iteration --- ontolib-cli/pom.xml | 2 +- ontolib-core/pom.xml | 2 +- ontolib-io/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ontolib-cli/pom.xml b/ontolib-cli/pom.xml index ab9fbf9..b6674ef 100644 --- a/ontolib-cli/pom.xml +++ b/ontolib-cli/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.3 + 0.4-SNAPSHOT diff --git a/ontolib-core/pom.xml b/ontolib-core/pom.xml index 79dfc5a..3878f70 100644 --- a/ontolib-core/pom.xml +++ b/ontolib-core/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.3 + 0.4-SNAPSHOT diff --git a/ontolib-io/pom.xml b/ontolib-io/pom.xml index d0ae0c1..919f29c 100644 --- a/ontolib-io/pom.xml +++ b/ontolib-io/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.3 + 0.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index e0d3936..7bbdca1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.github.phenomics OntoLib pom - 0.3 + 0.4-SNAPSHOT ${project.groupId}:${project.artifactId} OntoLib contains data structures and algorithms for processing ontologies. From 8636ef0872473358f89a56f2556620d88e704c8a Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Mon, 4 Sep 2017 17:06:38 +0200 Subject: [PATCH 2/8] Updating README and CHANGELOG for next iteration. --- CHANGELOG.rst | 4 ++++ README.md | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ca6db3..7a95812 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,10 @@ Changelog ========= +----------------------- +v0.4 (work in progress) +----------------------- + ---- v0.3 ---- diff --git a/README.md b/README.md index 393d411..f37f889 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A modern Java library for working with (biological) ontologies. - **Language/Platform:** Java >=8 - **License:** BSD 3-Clause Clear -- **Version:** 0.3 +- **Version:** 0.4 - **Authors:** - Sebastian Bauer - Peter N. Robinson @@ -18,6 +18,6 @@ A modern Java library for working with (biological) ontologies. - Max Schubach - Manuel Holtgrewe - **Availability:** - - Maven module `ontolib-core` for dealing with (biological) ontologies ([Javadoc via javadoc.io](http://javadoc.io/doc/com.github.phenomics/ontolib-core/0.3)). - - Maven module `ontolib-io` for reading ontologies from OBO files ([Javadoc via javadoc.io](http://javadoc.io/doc/com.github.phenomics/ontolib-io/0.3)). + - Maven module `ontolib-core` for dealing with (biological) ontologies ([Javadoc via javadoc.io](http://javadoc.io/doc/com.github.phenomics/ontolib-core/0.4)). + - Maven module `ontolib-io` for reading ontologies from OBO files ([Javadoc via javadoc.io](http://javadoc.io/doc/com.github.phenomics/ontolib-io/0.4)). - Maven module `ontolib-cli` for performing empirical score distribution computation as a stand-alone program. From 5fd0f1735129478e5e1f9f27b13fbcb86e096f2f Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 5 Sep 2017 13:17:51 +0200 Subject: [PATCH 3/8] Fixing various bugs in score distribution I/O. Also, disabling `mv_store` feature of H2 DB engine. --- CHANGELOG.rst | 3 +++ .../io/scoredist/H2ScoreDistributionReader.java | 11 ++++++----- .../io/scoredist/H2ScoreDistributionWriter.java | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7a95812..3c4871a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,9 @@ Changelog v0.4 (work in progress) ----------------------- +- Disabling ``mv_store`` feature of H2. +- Fixing various bugs in ``H2ScoreDistributionReader`` and ``H2ScoreDistributionWriter``. + ---- v0.3 ---- diff --git a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionReader.java b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionReader.java index feeaad2..61d83ff 100644 --- a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionReader.java +++ b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionReader.java @@ -39,15 +39,15 @@ public class H2ScoreDistributionReader implements ScoreDistributionReader { private final Connection conn; /** H2 query for selecting all term counts. */ - private final static String H2_SELECT_TERM_COUNTS = "SELECT DISTINCT (term_count) from %s"; + private final static String H2_SELECT_TERM_COUNTS = "SELECT DISTINCT (num_terms) from %s"; /** H2 query for selecting by term count. */ private final static String H2_SELECT_BY_TERM_COUNT_STATEMENT = - "SELECT (term_count, object_id, scores, p_values) FROM % WHERE (term_count = ?)"; + "SELECT num_terms, entrez_id, sample_size, scores, p_values FROM %s WHERE (num_terms = ?)"; /** H2 query for selecting by term count and object ID. */ private final static String H2_SELECT_BY_TERM_COUNT_AND_OBJECT_STATEMENT = - "SELECT (term_count, object_id, scores, p_values) FROM % WHERE (term_count = ? AND object_id = ?)"; + "SELECT num_terms, entrez_id, sample_size, scores, p_values FROM %s WHERE (num_terms = ? AND entrez_id = ?)"; /** * Create new reader object. @@ -74,7 +74,8 @@ private Connection openConnection() throws OntoLibException { final Connection result; try { Class.forName("org.h2.Driver"); - result = DriverManager.getConnection("jdbc:h2:" + pathDb, "", ""); + result = DriverManager + .getConnection("jdbc:h2:" + pathDb + ";ACCESS_MODE_DATA=r;mv_store=false", "", ""); } catch (ClassNotFoundException e) { throw new OntoLibException("H2 driver class could not be found", e); } catch (SQLException e) { @@ -110,7 +111,7 @@ public ObjectScoreDistribution readForTermCountAndObject(int termCount, int obje } } catch (SQLException e) { throw new OntoLibException("Problem with getting object score distribution for termCount: " - + termCount + ", objectId: " + objectId); + + termCount + ", objectId: " + objectId, e); } throw new OntoLibException( diff --git a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionWriter.java b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionWriter.java index 4925427..9d9a5b6 100644 --- a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionWriter.java +++ b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/scoredist/H2ScoreDistributionWriter.java @@ -87,7 +87,7 @@ private Connection openConnection(boolean resetTableIfExists) throws OntoLibExce final Connection resultConn; try { Class.forName("org.h2.Driver"); - resultConn = DriverManager.getConnection("jdbc:h2:" + pathDb, "", ""); + resultConn = DriverManager.getConnection("jdbc:h2:" + pathDb + ";mv_store=false", "", ""); } catch (ClassNotFoundException e) { throw new OntoLibException("H2 driver class could not be found", e); } catch (SQLException e) { @@ -190,6 +190,7 @@ private void writeObjectScoreDistribution(int numTerms, ObjectScoreDistribution for (Entry e : dist.getCumulativeFrequencies().entrySet()) { scores[i] = e.getKey(); pValues[i] = e.getValue(); + i += 1; } } From 0b51cdf5e68d82b57ad51e01ff1c5b26c0a70816 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 5 Sep 2017 13:26:16 +0200 Subject: [PATCH 4/8] Preparing CHANGELOG.rst for next release. --- CHANGELOG.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3c4871a..a31bb05 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,9 +2,9 @@ Changelog ========= ------------------------ -v0.4 (work in progress) ------------------------ +---- +v0.4 +---- - Disabling ``mv_store`` feature of H2. - Fixing various bugs in ``H2ScoreDistributionReader`` and ``H2ScoreDistributionWriter``. From 0bf72234c004f998c5f8a666be5d88284e3bd557 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 5 Sep 2017 13:27:26 +0200 Subject: [PATCH 5/8] [maven-release-plugin] prepare release v0.4 --- ontolib-cli/pom.xml | 2 +- ontolib-core/pom.xml | 2 +- ontolib-io/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ontolib-cli/pom.xml b/ontolib-cli/pom.xml index b6674ef..647ac73 100644 --- a/ontolib-cli/pom.xml +++ b/ontolib-cli/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4-SNAPSHOT + 0.4 diff --git a/ontolib-core/pom.xml b/ontolib-core/pom.xml index 3878f70..0c55e8f 100644 --- a/ontolib-core/pom.xml +++ b/ontolib-core/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4-SNAPSHOT + 0.4 diff --git a/ontolib-io/pom.xml b/ontolib-io/pom.xml index 919f29c..4d2e774 100644 --- a/ontolib-io/pom.xml +++ b/ontolib-io/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4-SNAPSHOT + 0.4 diff --git a/pom.xml b/pom.xml index 7bbdca1..e147b4c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.github.phenomics OntoLib pom - 0.4-SNAPSHOT + 0.4 ${project.groupId}:${project.artifactId} OntoLib contains data structures and algorithms for processing ontologies. From 39649416e7044ad11789c02fd8bae4b34bdbb8cb Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 5 Sep 2017 13:27:32 +0200 Subject: [PATCH 6/8] [maven-release-plugin] prepare for next development iteration --- ontolib-cli/pom.xml | 2 +- ontolib-core/pom.xml | 2 +- ontolib-io/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ontolib-cli/pom.xml b/ontolib-cli/pom.xml index 647ac73..7b39af9 100644 --- a/ontolib-cli/pom.xml +++ b/ontolib-cli/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4 + 0.5-SNAPSHOT diff --git a/ontolib-core/pom.xml b/ontolib-core/pom.xml index 0c55e8f..a12081a 100644 --- a/ontolib-core/pom.xml +++ b/ontolib-core/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4 + 0.5-SNAPSHOT diff --git a/ontolib-io/pom.xml b/ontolib-io/pom.xml index 4d2e774..d0bb10f 100644 --- a/ontolib-io/pom.xml +++ b/ontolib-io/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.4 + 0.5-SNAPSHOT diff --git a/pom.xml b/pom.xml index e147b4c..5023611 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.github.phenomics OntoLib pom - 0.4 + 0.5-SNAPSHOT ${project.groupId}:${project.artifactId} OntoLib contains data structures and algorithms for processing ontologies. From 9ebe6d541fc0f064f915c96d9e70c95ee2cd8606 Mon Sep 17 00:00:00 2001 From: pnrobinson Date: Mon, 20 Nov 2017 17:41:54 -0500 Subject: [PATCH 7/8] Fixing date parsing error (anologous to HpoOboFactory change 825216721aaa48d806465d47ffa0e31d1c5becb3 on Aug 14, 2017) --- .../com/github/phenomics/ontolib/io/obo/mpo/MpoOboFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/mpo/MpoOboFactory.java b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/mpo/MpoOboFactory.java index 5f07621..d148e0a 100644 --- a/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/mpo/MpoOboFactory.java +++ b/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/mpo/MpoOboFactory.java @@ -140,7 +140,7 @@ public MpoTerm constructTerm(Stanza stanza) { final String creationDateStr = (creationDateEntry == null) ? null : creationDateEntry.getValue(); - final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); Date creationDate = null; if (creationDateStr != null) { try { From 9ebbec049c52990dbebec177e729c375eb5921ad Mon Sep 17 00:00:00 2001 From: pnrobinson Date: Sat, 13 Jan 2018 11:04:34 -0500 Subject: [PATCH 8/8] fixing version no. --- ontolib-cli/pom.xml | 12 ++++++------ ontolib-core/pom.xml | 8 ++++---- ontolib-io/pom.xml | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ontolib-cli/pom.xml b/ontolib-cli/pom.xml index 7b39af9..9b6f7fa 100644 --- a/ontolib-cli/pom.xml +++ b/ontolib-cli/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.5-SNAPSHOT + 0.3 @@ -57,7 +57,7 @@ src/main/resources - true @@ -73,7 +73,7 @@ true lib/ - false com.github.phenomics.ontolib.cli.Main @@ -105,7 +105,7 @@ - maven-resources-plugin @@ -122,7 +122,7 @@ src/resources - true @@ -137,7 +137,7 @@ - maven-assembly-plugin diff --git a/ontolib-core/pom.xml b/ontolib-core/pom.xml index a12081a..641daeb 100644 --- a/ontolib-core/pom.xml +++ b/ontolib-core/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.5-SNAPSHOT + 0.3 @@ -22,7 +22,7 @@ src/main/resources - true @@ -51,7 +51,7 @@ - maven-resources-plugin @@ -68,7 +68,7 @@ src/main/resources - true diff --git a/ontolib-io/pom.xml b/ontolib-io/pom.xml index d0bb10f..c71bd57 100644 --- a/ontolib-io/pom.xml +++ b/ontolib-io/pom.xml @@ -11,7 +11,7 @@ com.github.phenomics OntoLib - 0.5-SNAPSHOT + 0.3 @@ -45,7 +45,7 @@ src/main/resources - true @@ -109,7 +109,7 @@ - maven-resources-plugin @@ -126,7 +126,7 @@ src/main/resources - true