From 56881658efe3c4750c7e6267374a71ad2361c9e2 Mon Sep 17 00:00:00 2001 From: Dario Date: Wed, 7 Aug 2024 15:54:40 +0200 Subject: [PATCH] clean out repository --- .github/workflows/gradle_build_test.yml | 27 - .gitignore | 26 +- docker/java_docker/Dockerfile => Dockerfile | 8 +- README.md | 146 +-- build.gradle | 45 +- dependency-licenses.txt | 3 - development/docker-compose.databases.yml | 28 +- development/docker-compose.local-jar.yml | 14 +- .../{servers.json => pgadmin-servers.json} | 0 docker-compose.yml | 12 +- docker/adb_docker/Dockerfile | 23 - docker/adb_docker/restore_adb.sh | 6 - docker/bigg_docker/Dockerfile | 23 - docker/bigg_docker/restore_biggdb.sh | 5 - docs/allclasses-index.html | 30 +- docs/allpackages-index.html | 12 +- docs/constant-values.html | 54 +- docs/copy.svg | 33 - .../ucsd/sbrg/ModelPolisherCLILauncher.html | 104 +-- .../sbrg/ModelPolisherOptions.OutputType.html | 72 +- docs/edu/ucsd/sbrg/ModelPolisherOptions.html | 96 +- docs/edu/ucsd/sbrg/ModelValidator.html | 50 +- .../ucsd/sbrg/ModelValidatorException.html | 70 +- docs/edu/ucsd/sbrg/SBMLValidator.html | 50 +- docs/edu/ucsd/sbrg/XHTMLBuilder.html | 90 +- .../sbrg/annotation/AbstractAnnotator.html | 86 +- .../sbrg/annotation/AnnotationException.html | 60 +- .../sbrg/annotation/AnnotationsSorter.html | 46 +- .../annotation/adb/ADBReactionsAnnotator.html | 58 +- .../sbrg/annotation/adb/ADBSBMLAnnotator.html | 50 +- .../annotation/adb/ADBSpeciesAnnotator.html | 58 +- .../annotation/adb/AbstractADBAnnotator.html | 56 +- .../sbrg/annotation/adb/package-summary.html | 23 +- .../sbrg/annotation/adb/package-tree.html | 18 +- .../bigg/AbstractBiGGAnnotator.html | 64 +- .../bigg/BiGGAnnotationException.html | 72 +- .../annotation/bigg/BiGGCVTermAnnotator.html | 58 +- .../bigg/BiGGCompartmentsAnnotator.html | 62 +- .../bigg/BiGGDocumentNotesProcessor.html | 50 +- .../annotation/bigg/BiGGModelAnnotator.html | 66 +- .../bigg/BiGGPublicationsAnnotator.html | 54 +- .../bigg/BiGGReactionsAnnotator.html | 86 +- .../annotation/bigg/BiGGSBMLAnnotator.html | 54 +- .../annotation/bigg/BiGGSpeciesAnnotator.html | 78 +- .../annotation/bigg/fbc/BiGGFBCAnnotator.html | 54 +- .../bigg/fbc/BiGGGeneProductAnnotator.html | 96 +- .../BiGGGeneProductReferencesAnnotator.html | 46 +- .../annotation/bigg/fbc/package-summary.html | 23 +- .../annotation/bigg/fbc/package-tree.html | 18 +- .../sbrg/annotation/bigg/package-summary.html | 31 +- .../sbrg/annotation/bigg/package-tree.html | 22 +- .../ucsd/sbrg/annotation/package-summary.html | 31 +- .../ucsd/sbrg/annotation/package-tree.html | 22 +- .../ucsd/sbrg/db/PostgresConnectionPool.html | 70 +- docs/edu/ucsd/sbrg/db/adb/AnnotateDB.html | 100 +- .../AnnotateDBContract.Constants.Column.html | 42 +- .../AnnotateDBContract.Constants.Table.html | 42 +- .../db/adb/AnnotateDBContract.Constants.html | 54 +- .../ucsd/sbrg/db/adb/AnnotateDBContract.html | 40 +- .../ucsd/sbrg/db/adb/AnnotateDBOptions.html | 54 +- .../edu/ucsd/sbrg/db/adb/package-summary.html | 29 +- docs/edu/ucsd/sbrg/db/adb/package-tree.html | 18 +- .../sbrg/db/bigg/BiGGDB.ForeignReaction.html | 66 +- docs/edu/ucsd/sbrg/db/bigg/BiGGDB.html | 424 +++++---- .../bigg/BiGGDBContract.Constants.Column.html | 42 +- .../bigg/BiGGDBContract.Constants.Table.html | 42 +- .../db/bigg/BiGGDBContract.Constants.html | 60 +- .../edu/ucsd/sbrg/db/bigg/BiGGDBContract.html | 40 +- docs/edu/ucsd/sbrg/db/bigg/BiGGDBOptions.html | 54 +- docs/edu/ucsd/sbrg/db/bigg/BiGGId.html | 186 ++-- docs/edu/ucsd/sbrg/db/bigg/Publication.html | 82 +- .../ucsd/sbrg/db/bigg/package-summary.html | 29 +- docs/edu/ucsd/sbrg/db/bigg/package-tree.html | 37 +- docs/edu/ucsd/sbrg/db/package-summary.html | 23 +- docs/edu/ucsd/sbrg/db/package-tree.html | 18 +- docs/edu/ucsd/sbrg/eco/DAG.html | 56 +- docs/edu/ucsd/sbrg/eco/ECOparser.html | 64 +- docs/edu/ucsd/sbrg/eco/package-summary.html | 23 +- docs/edu/ucsd/sbrg/eco/package-tree.html | 18 +- docs/edu/ucsd/sbrg/io/CombineArchive.html | 86 +- .../sbrg/io/DeleteOnCloseFileInputStream.html | 86 +- docs/edu/ucsd/sbrg/io/IOOptions.html | 46 +- docs/edu/ucsd/sbrg/io/ModelReader.html | 50 +- .../ucsd/sbrg/io/ModelReaderException.html | 74 +- docs/edu/ucsd/sbrg/io/ModelWriter.html | 58 +- .../ucsd/sbrg/io/ModelWriterException.html | 90 +- .../ucsd/sbrg/io/SBMLFileUtils.FileType.html | 68 +- docs/edu/ucsd/sbrg/io/SBMLFileUtils.html | 72 +- docs/edu/ucsd/sbrg/io/UpdateListener.html | 58 +- docs/edu/ucsd/sbrg/io/package-summary.html | 31 +- docs/edu/ucsd/sbrg/io/package-tree.html | 30 +- .../sbrg/io/parsers/cobra/COBRAUtils.html | 76 +- .../sbrg/io/parsers/cobra/GeneParser.html | 46 +- .../sbrg/io/parsers/cobra/MatlabParser.html | 54 +- .../sbrg/io/parsers/cobra/ModelField.html | 88 +- .../sbrg/io/parsers/cobra/ReactionParser.html | 54 +- .../sbrg/io/parsers/cobra/SpeciesParser.html | 50 +- .../io/parsers/cobra/package-summary.html | 29 +- .../sbrg/io/parsers/cobra/package-tree.html | 22 +- .../sbrg/io/parsers/json/JSONConverter.html | 78 +- .../ucsd/sbrg/io/parsers/json/JSONParser.html | 74 +- .../io/parsers/json/mapping/Compartments.html | 66 +- .../sbrg/io/parsers/json/mapping/Gene.html | 78 +- .../io/parsers/json/mapping/Metabolite.html | 94 +- .../io/parsers/json/mapping/Metabolites.html | 58 +- .../io/parsers/json/mapping/Reaction.html | 94 +- .../sbrg/io/parsers/json/mapping/Root.html | 110 +-- .../parsers/json/mapping/package-summary.html | 23 +- .../io/parsers/json/mapping/package-tree.html | 18 +- .../sbrg/io/parsers/json/package-summary.html | 23 +- .../sbrg/io/parsers/json/package-tree.html | 18 +- docs/edu/ucsd/sbrg/package-summary.html | 31 +- docs/edu/ucsd/sbrg/package-tree.html | 28 +- .../parameters/ADBAnnotationParameters.html | 46 +- .../sbrg/parameters/AnnotationParameters.html | 46 +- .../parameters/BiGGAnnotationParameters.html | 58 +- .../sbrg/parameters/BiGGNotesParameters.html | 62 +- .../parameters/CommandLineParameters.html | 58 +- .../ucsd/sbrg/parameters/DBParameters.html | 86 +- .../FluxObjectivesPolishingParameters.html | 82 +- docs/edu/ucsd/sbrg/parameters/Parameters.html | 46 +- .../sbrg/parameters/ParametersParser.html | 54 +- .../sbrg/parameters/PolishingParameters.html | 50 +- .../ReactionPolishingParameters.html | 56 +- .../ucsd/sbrg/parameters/SBOParameters.html | 46 +- .../ucsd/sbrg/parameters/package-summary.html | 23 +- .../ucsd/sbrg/parameters/package-tree.html | 18 +- .../ucsd/sbrg/polishing/AbstractPolisher.html | 92 +- .../sbrg/polishing/AnnotationPolisher.html | 48 +- .../sbrg/polishing/CompartmentPolisher.html | 52 +- .../GeneProductAssociationsProcessor.html | 46 +- .../ucsd/sbrg/polishing/ModelPolisher.html | 52 +- .../sbrg/polishing/ParametersPolisher.html | 52 +- .../ucsd/sbrg/polishing/PolishingUtils.html | 52 +- .../sbrg/polishing/ReactionNamePatterns.html | 70 +- .../sbrg/polishing/ReactionsPolisher.html | 52 +- .../edu/ucsd/sbrg/polishing/SBMLPolisher.html | 48 +- .../ucsd/sbrg/polishing/SpeciesPolisher.html | 52 +- .../edu/ucsd/sbrg/polishing/UnitPolisher.html | 60 +- .../ucsd/sbrg/polishing/fbc/FBCPolisher.html | 48 +- .../polishing/fbc/FluxObjectivesPolisher.html | 52 +- .../polishing/fbc/GeneProductsPolisher.html | 52 +- .../polishing/fbc/StrictnessPredicate.html | 60 +- .../sbrg/polishing/fbc/package-summary.html | 23 +- .../ucsd/sbrg/polishing/fbc/package-tree.html | 20 +- .../ucsd/sbrg/polishing/package-summary.html | 29 +- .../edu/ucsd/sbrg/polishing/package-tree.html | 22 +- .../sbrg/reporting/PolisherProgressBar.html | 46 +- .../sbrg/reporting/ProgressFinalization.html | 62 +- .../reporting/ProgressInitialization.html | 62 +- .../ucsd/sbrg/reporting/ProgressObserver.html | 38 +- .../ucsd/sbrg/reporting/ProgressUpdate.html | 82 +- docs/edu/ucsd/sbrg/reporting/ReportType.html | 66 +- .../ucsd/sbrg/reporting/package-summary.html | 29 +- .../edu/ucsd/sbrg/reporting/package-tree.html | 45 +- docs/edu/ucsd/sbrg/resolver/Registry.html | 66 +- docs/edu/ucsd/sbrg/resolver/RegistryURI.html | 50 +- .../identifiersorg/IdentifiersOrg.html | 76 +- .../IdentifiersOrgRegistryParser.html | 54 +- .../identifiersorg/IdentifiersOrgURI.html | 108 +-- .../IdentifiersOrgURIUtils.html | 68 +- .../identifiersorg/mapping/Institution.html | 78 +- .../identifiersorg/mapping/Location.html | 62 +- .../identifiersorg/mapping/Namespace.html | 126 ++- .../mapping/RawIdentifiersOrgRegistry.html | 70 +- .../identifiersorg/mapping/Resource.html | 110 +-- .../mapping/package-summary.html | 23 +- .../identifiersorg/mapping/package-tree.html | 18 +- .../identifiersorg/package-summary.html | 23 +- .../resolver/identifiersorg/package-tree.html | 20 +- .../ucsd/sbrg/resolver/package-summary.html | 23 +- docs/edu/ucsd/sbrg/resolver/package-tree.html | 16 +- docs/edu/ucsd/sbrg/util/GPRParser.html | 66 +- docs/edu/ucsd/sbrg/util/SBMLFix.html | 94 +- docs/edu/ucsd/sbrg/util/SBMLUtils.html | 52 +- docs/edu/ucsd/sbrg/util/package-summary.html | 23 +- docs/edu/ucsd/sbrg/util/package-tree.html | 18 +- docs/help-doc.html | 39 +- docs/index-all.html | 58 +- docs/index.html | 12 +- docs/jquery-ui.overrides.css | 35 + docs/legal/ASSEMBLY_EXCEPTION | 6 +- docs/link.svg | 31 - docs/overview-summary.html | 2 +- docs/overview-tree.html | 61 +- docs/script.js | 141 +-- docs/search-page.js | 284 ------ docs/search.html | 71 -- docs/search.js | 612 +++++------- docs/serialized-form.html | 44 +- docs/stylesheet.css | 869 +++++------------- gradle/wrapper/gradle-wrapper.jar | Bin 43453 -> 43462 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- gradlew.bat | 20 +- lib/de/zbit/SysBio/1390/SysBio-1390.jar | Bin 823949 -> 0 bytes LICENSE => licenses/LICENSE | 0 .../META-INF/licenses/COPYING.txt | 0 .../hamcrest-core-1.1.jar/LICENSE.txt | 0 licenses/{dependency-licenses => }/index.html | 0 .../META-INF/LICENSE | 0 .../jackson-core-2.10.1.jar/META-INF/LICENSE | 0 .../jackson-core-2.10.1.jar/META-INF/NOTICE | 0 .../META-INF/LICENSE | 0 .../META-INF/NOTICE | 0 .../jdom2-2.0.6.jar/META-INF/LICENSE.txt | 0 .../jtidy-r938.jar/META-INF/LICENSE.txt | 0 .../junit-4.10.jar/LICENSE.txt | 0 .../log4j-1.2-api-2.3.jar/META-INF/LICENSE | 0 .../log4j-1.2-api-2.3.jar/META-INF/NOTICE | 0 .../log4j-api-2.6.2.jar/META-INF/LICENSE | 0 .../log4j-api-2.6.2.jar/META-INF/NOTICE | 0 .../log4j-core-2.6.2.jar/META-INF/LICENSE | 0 .../log4j-core-2.6.2.jar/META-INF/NOTICE | 0 .../META-INF/LICENSE | 0 .../META-INF/NOTICE | 0 .../postgresql-42.2.2.jar/META-INF/LICENSE | 0 .../staxmate-2.3.0.jar/META-INF/LICENSE | 0 .../staxmate-2.3.0.jar/META-INF/NOTICE | 0 {doc => public}/img/ModelPolisherIcon.png | Bin {doc => public}/img/ModelPolisherIcon.psd | Bin {doc => public}/img/ModelPolisherIcon256.png | Bin runModelPolisher.sh | 26 - .../sbrg/polishing/CompartmentPolisher.java | 2 +- src/overview.html | 9 - src/scripts/ModelPolisher.sh | 17 - src/scripts/runModelPolisher.sh | 111 --- 227 files changed, 4412 insertions(+), 7572 deletions(-) delete mode 100644 .github/workflows/gradle_build_test.yml rename docker/java_docker/Dockerfile => Dockerfile (57%) mode change 100644 => 100755 build.gradle delete mode 100644 dependency-licenses.txt rename development/{servers.json => pgadmin-servers.json} (100%) delete mode 100644 docker/adb_docker/Dockerfile delete mode 100644 docker/adb_docker/restore_adb.sh delete mode 100644 docker/bigg_docker/Dockerfile delete mode 100644 docker/bigg_docker/restore_biggdb.sh delete mode 100644 docs/copy.svg create mode 100644 docs/jquery-ui.overrides.css delete mode 100644 docs/link.svg delete mode 100644 docs/search-page.js delete mode 100644 docs/search.html delete mode 100644 lib/de/zbit/SysBio/1390/SysBio-1390.jar rename LICENSE => licenses/LICENSE (100%) rename licenses/{dependency-licenses => }/SysBio-1390.jar/META-INF/licenses/COPYING.txt (100%) rename licenses/{dependency-licenses => }/hamcrest-core-1.1.jar/LICENSE.txt (100%) rename licenses/{dependency-licenses => }/index.html (100%) rename licenses/{dependency-licenses => }/jackson-annotations-2.10.1.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/jackson-core-2.10.1.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/jackson-core-2.10.1.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/jackson-databind-2.10.1.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/jackson-databind-2.10.1.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/jdom2-2.0.6.jar/META-INF/LICENSE.txt (100%) rename licenses/{dependency-licenses => }/jtidy-r938.jar/META-INF/LICENSE.txt (100%) rename licenses/{dependency-licenses => }/junit-4.10.jar/LICENSE.txt (100%) rename licenses/{dependency-licenses => }/log4j-1.2-api-2.3.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/log4j-1.2-api-2.3.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/log4j-api-2.6.2.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/log4j-api-2.6.2.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/log4j-core-2.6.2.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/log4j-core-2.6.2.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/log4j-slf4j-impl-2.6.2.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/log4j-slf4j-impl-2.6.2.jar/META-INF/NOTICE (100%) rename licenses/{dependency-licenses => }/postgresql-42.2.2.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/staxmate-2.3.0.jar/META-INF/LICENSE (100%) rename licenses/{dependency-licenses => }/staxmate-2.3.0.jar/META-INF/NOTICE (100%) rename {doc => public}/img/ModelPolisherIcon.png (100%) rename {doc => public}/img/ModelPolisherIcon.psd (100%) rename {doc => public}/img/ModelPolisherIcon256.png (100%) delete mode 100755 runModelPolisher.sh delete mode 100644 src/overview.html delete mode 100755 src/scripts/ModelPolisher.sh delete mode 100755 src/scripts/runModelPolisher.sh diff --git a/.github/workflows/gradle_build_test.yml b/.github/workflows/gradle_build_test.yml deleted file mode 100644 index 99dc131f..00000000 --- a/.github/workflows/gradle_build_test.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Gradle build (and run tests) - -on: - push: - branches: [ "2.1" ] - pull_request: - branches: [ "2.1" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 18 - uses: actions/setup-java@v4 - with: - java-version: '18' - distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@v3 - with: - arguments: build diff --git a/.gitignore b/.gitignore index 40a7bfc9..26cc66b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,23 @@ +*.class +*.dump +.classpath .gradle/ .idea/ -.settings/ -.classpath .project -/build/ -/target/ -src/main/resources/edu/ucsd/sbrg/identifiersOrgRegistry/IdentifiersOrg-Registry.json -/src/scripts/ModelPolisherTemplate.* -ModelPolisher.iml -jsbml.log +.settings/ /.DS_Store +/.vscode/ +/bin +/build/ +/gradle +/lib /minimalSysBio.xml /model_polisher.log /out /src/main/resources/edu/ucsd/sbrg/example_models/output +/src/scripts/ModelPolisherTemplate.* /src/test/resources/edu/ucsd/sbrg/bigg/e_coli_core.zip -*.class -/bin -/.vscode/ -*.dump \ No newline at end of file +/target/ +ModelPolisher.iml +jsbml.log +src/main/resources/edu/ucsd/sbrg/identifiersOrgRegistry/IdentifiersOrg-Registry.json \ No newline at end of file diff --git a/docker/java_docker/Dockerfile b/Dockerfile similarity index 57% rename from docker/java_docker/Dockerfile rename to Dockerfile index 4d416238..c141a8ca 100644 --- a/docker/java_docker/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -FROM openjdk:11-slim +FROM openjdk:17-slim # Set the maintainer email for the image -LABEL maintainer="zajac.thomas1992@gmail.com" +LABEL maintainer="dario.eltzner@student.uni-tuebingen.de" # Copy the ModelPolisher jar file into the root directory of the image COPY ModelPolisher-2.1.jar / -# Create necessary directories for Java preferences and set permissions -# Reference: https://stackoverflow.com/a/23961144 -RUN mkdir -p /.java/.systemPrefs && mkdir /.java/.userPrefs && chmod -R 777 /.java - # Set the container to run the ModelPolisher jar file as the default executable ENTRYPOINT ["java", "-jar", "/ModelPolisher-2.1.jar"] diff --git a/README.md b/README.md index e3b2d88d..06cfbcbb 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,103 @@ # ModelPolisher **Annotating Systems Biology Models** - + -*Authors:* [Andreas Dräger](https://github.com/draeger/), [Thomas J. Zajac](https://github.com/mephenor/), [Matthias König](https://github.com/matthiaskoenig), [Kaustubh Trivedi](https://github.com/codekaust) - -[![Build Status](https://travis-ci.org/draeger-lab/ModelPolisher.svg?branch=master?style=plastic)](https://travis-ci.org/draeger-lab/ModelPolisher) -[![Stable version](https://img.shields.io/badge/Stable_version-2.0-brightgreen.svg?style=plastic)](https://github.com/draeger-lab/ModelPolisher/releases/) +[![Stable version](https://img.shields.io/badge/Stable_version-2.1-brightgreen.svg?style=plastic)](https://github.com/draeger-lab/ModelPolisher/releases/) [![DOI](http://img.shields.io/badge/DOI-10.1371%20%2F%20journal.pone.0149263-blue.svg?style=plastic)](https://doi.org/10.1371/journal.pone.0149263) [![License (MIT)](https://img.shields.io/badge/license-MIT-blue.svg?style=plastic)](http://opensource.org/licenses/MIT) -ModelPolisher accesses the [BiGG Models knowledgebase](http://bigg.ucsd.edu) to annotate and autocomplete [SBML](http://sbml.org) models. -Thereby, the program mainly relies on [BiGG identifiers](https://github.com/SBRG/bigg_models/wiki/BiGG-Models-ID-Specification-and-Guidelines) for model components. -Moreover, it fixes some apparent errors in the models and uses mappings from [AnnotateDB](https://github.com/matthiaskoenig/annotatedb) to further add annotations. +ModelPolisher is a simple single-purpose automated curation tool for SBML models. +It + +- improves the adherence to [FAIR]((https://doi.org/10.1038%2FSDATA.2016.18)) data standards as practiced in the SBML modelling community, +- implements non-binding best practices as defined by the [SBML specification](https://sbml.org/documents/specifications/) documents, +- adds [MIRIAM]((https://doi.org/10.1038%2Fnbt1156))-style semantic annotations to models, using the [BiGG Models knowledgebase](http://bigg.ucsd.edu) and [AnnotateDB](https://github.com/matthiaskoenig/annotatedb). + +You can find comprehensive documentation on what ModelPolisher does in [our Wiki](https://github.com/draeger-lab/ModelPolisher/wiki). + +Furthermore, it can, on a best effort basis, attempt to perform minimal fixes on a model to make it valid with regards to the [SBMLValidator](https://sbml.org/jsbml/files/doc/api/1.6.1/org/sbml/jsbml/validator/SBMLValidator.html). +Note however, that it will not perform curation on a model that cannot be brought into a valid state. + +Again, you find comprehensive documentation on this in [our Wiki](https://github.com/draeger-lab/ModelPolisher/wiki). + +Currently supported versions of the SBML standard are: -ModelPolisher is primarily a command-line based tool. You can run ModelPolisher locally [using `Docker`](#using-docker) or using your installation of BiGG Models database (see https://github.com/SBRG/bigg_models). +- Version 3 Level 1 + - FBC Version 2 + +You can use ModelPolisher as a tool via its [Python API client](https://github.com/draeger-lab/MPClient) to our HTTP server, or locally using Docker or as a Standalone JAR. + +ModelPolisher can also be used as a Java library, building on the [JSBML](https://sbml.org/software/jsbml/) project. # Table of Contents -* [Usage Notes](#run-ModelPolisher) +* [Performance](#performance) +* [Using ModelPolisher as a Tool](#using-modelpolisher-as-a-tool) + * [Parameters](#parameters) + * [Using the Python API package](#using-the-python-api-client- + package) * [Using Docker](#using-docker) - * [Using ModelPolisher jar](#using-jar) -* [How to cite ModelPolisher?](#cite-ModelPolisher) + * [Using ModelPolisher Jar](#using-modepolisher-jar) +* [Using ModelPolisher as a Java library](#using-modelpolisher-as-a-java-library) +* [How to cite ModelPolisher](#how-to-cite-ModelPolisher) * [Licenses](#licenses) -# Usage Notes +# Performance +We have run ModelPolisher on all models in the BiGG Database and on 3000 models available on Biomodels. Furthermore, we have evaluated it's performance on newly generated models using [CarveMe](https://github.com/cdanielmachado/carveme), [Reconstructor](https://github.com/emmamglass/reconstructor) and the [KBase Create Metabolic Model App](https://kbase.us/applist/apps/fba_tools/build_multiple_metabolic_models/release), with regards to [MEMOTE](https://memote.readthedocs.io/en/latest/) scores. -We recommend users to run ModelPolisher [using `docker`](#using-docker), though ModelPolisher can be run [from ModelPolisher `jar`](#using-jar), which is preferred for developers. +Here you can see a brief overview of its impact: -NOTE: ModelPolisher provides various command line arguments which can be seen using arguments `-?` and `--help`: -``` -java -jar /ModelPolisher/target/ModelPolisher-2.1.jar -? -``` +You can find a more detailed analysis in [our Wiki](https://github.com/draeger-lab/ModelPolisher/wiki/Performance). -See further documentation on the most important arguments here [here](https://github.com/draeger-lab/ModelPolisher/wiki/Command-Line-Arguments). +# Using ModelPolisher as a Tool +We recommend users to either use the [Python API client package](#using-the-python-api-client-package) or run ModelPolisher [using `docker`](#using-docker). -## Using Docker -ModelPolisher can be run in docker containers. This allows user to skip the build process, and database setup required to run ModelPolisher. Please install `docker` and `docker-compose`, if not installed already. +However, ModelPolisher can also be run [from the ModelPolisher `Jar`](#using-jar). -Clone ModelPolisher and change directory to ModelPolisher/: -``` -git clone https://github.com/draeger-lab/ModelPolisher/ -cd /ModelPolisher -``` -Now, bring up docker containers required for ModelPolisher(NOTE: You must be in `ModelPolisher/` directory): -``` -docker-compose up -``` +## Using the Python API client package +If you don't want to process large numbers of models and have an internet connection available, this is the recommended usage. -We recommend using docker-compose in non-detached mode when building containers for first time. If you have previously built ModelPolisher containers use `docker-compose up --detach`. +ModelPolisher is hosted as an HTTP server at [biodata.informatik.uni-halle.de/modelling/polisher](biodata.informatik.uni-halle.de/modelling/polisher). -NOTE: Once database backend is set-up by `docker-compose`, the databases are also available at following ports for `localhost`: -- AnnotateDB: `1013` -- BiGGDB: `1310` +We provide a [Python API client package](https://github.com/draeger-lab/MPClient) (available on PyPI) for interaction with the server. All documentation regarding usage of the API client can be found in that repository. -On running these commands, databases will be restored in respective containers. After databases are successfully set up, use the following command (in `ModelPolisher/` directory) to run ModelPolisher: -``` -docker-compose run -v :/models/ polisher --input=/models/ --output=/models/output/ --annotate-with-bigg=true --add-adb-annotations=true --output-combine=true -``` +## Using ModelPolisher Locally +ModelPolisher can also be run locally. -Note: You must pass *absolute path for host directory*. This command will mount volume `` to `/models/` in container. Thus, outputs will be produced in directory `/output`. +If you want to process a large number of models, or you don't feel comfortable using the Python API client package, this is the recommendend usage. -User may use `-u ` with `docker-compose run` in above command to generate output with correct ownership. Preferably use uid (obtained by `id -u `) due to some existing bugs in docker. +### Parameters +Parameters can be passed via a [json file](https://github.com/draeger-lab/ModelPolisher/wiki/Parameters#json-file) or as [command line arguments]((https://github.com/draeger-lab/ModelPolisher/wiki/Parameters#command-line-arguments)). -To bring down the containers, you can run `docker-compose stop`. This will only stop the containers but won't delete them. Otherwise, you can use `docker-compose down -v` to stop and remove all containers and related volumes. +### Using Docker +ModelPolisher is provided as a Docker image. -Note: `docker-compose down -v` will cause all databases to be restored again on running `docker-compose up`, as restored databases exist in containers not in images. +This repository contains a [`docker-compose.yml`](./docker-compose.yml) which also sets up BiGG DB and AnnotateDB as Docker containers, to support the [annotation functionality](https://github.com/draeger-lab/ModelPolisher/wiki/Annotation). -Using `docker` might cause system space to be filled up, and `docker-compose up` may fail due to insufficient space. Use the following commands if there is need to empty space used by ModelPolisher_docker: -``` -docker stop modelpolisher_biggdb modelpolisher_adb modelpolisher_java -docker rm modelpolisher_biggdb modelpolisher_adb modelpolisher_java -docker rmi modelpolisher_java:latest modelpolisher_adb:latest modelpolisher_biggdb:latest postgres:11.4 openjdk:11-slim -docker volume prune +For a single model file, you can use +``` shell +docker-compose run \ + -v :/models/ \ + polisher \ + --input=/models/ \ + --output=/models/output/ \ + --annotate-with-bigg=true \ + --add-adb-annotations=true \ + --output-combine=true ``` -#### Using a non-release jar with Docker +Output will be produced in directory `/output`. -Building using `gradle devel` builds a container with the local ModelPolisher jar. -This container can be used analogously to the release version, though either `-f docker-compose.devel.yml` needs to be -passed to each invocation of `docker-compose` or the `COMPOSE_FILE` environment variable needs to be set so it points -to `docker-compose.devel.yml`, e.g. using `export COMPOSE_FILE=docker-compose.devel.yml` for sh or bash. +*Note*: It is always recommended to [run Docker as your current user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) and not as root. Running as root will produce root-owned output. Users can use `-u ` with `docker-compose run` to generate output with correct ownership in this case. -## Using ModelPolisher jar -For polishing models, you essentially need to run ModelPolisher using `jar` produced from [build instructions](#build-instructions). +### Using ModelPolisher Jar +You can run ModelPolisher using its `Jar `. +See [Releases](https://github.com/draeger-lab/ModelPolisher/releases/latest) for downloads of stable versions of standalone Jars and the [Parameters](https://github.com/draeger-lab/ModelPolisher/wiki/Parameters) Wiki page for documentation of the input parameters. -User needs to host the [BiGG](https://github.com/SBRG/bigg_models) Database & [AnnotateDB](https://github.com/matthiaskoenig/annotatedb) on `PostgreSQL` on your local system. +If the [annotation functionality](https://github.com/draeger-lab/ModelPolisher/wiki/Annotation) is required, users need to provide connections to the [BiGG](https://github.com/SBRG/bigg_models) Database and/or [AnnotateDB](https://github.com/matthiaskoenig/annotatedb) as `PostgreSQL` databases. -Now, you can run the following command in general: +This can be achieved like this: ``` java -jar "/ModelPolisher/target/ModelPolisher-2.1.jar" \ --input= \ @@ -107,22 +117,18 @@ java -jar "/ModelPolisher/target/ModelPolisher-2.1.jar" \ --adb-passwd= ``` -We understand problems in setting-up database backend and that a developer would need to build ModelPolisher multiple times and making required changes in `java` Dockerfile will be a tedious task. -We recommend the following practice for developers: -1. Set up required databases by running `docker-compose up`. -2. After making required changes in codebase build `jar` by `gradle fatJar`. -3. Run the newly build jar using: -``` -java -jar ./target/ModelPolisher-2.1.jar --input= --output= --output-combine=true --annotate-with-bigg=true --bigg-host=0.0.0.0 --bigg-port=1310 --add-adb-annotations=true --adb-host=0.0.0.0 --adb-port=1013 -``` -Note: All above commands must be run in `/ModelPolisher/` directory and you must have installed Java `version >= 8` and Gradle `version >= 5.0`. -# How to cite ModelPolisher? +Note: ModelPolisher requires Java `version >= 17`. + +# Using ModelPolisher as a Java library +ModelPolisher and all its dependencies are hosted on [Maven Central](). You can see our [GitHub Pages](http://draeger-lab.github.io/ModelPolisher/) for its Javadocs. +# How to cite ModelPolisher The online version of ModelPolisher is described in this article: http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0149263 The article ["BiGG Models: A platform for integrating, standardizing and sharing genome-scale models"](https://nar.oxfordjournals.org/content/44/D1/D515) describes BiGG Models knowledge-base including ModelPolisher. -# Licenses - +# Licenses ModelPolisher is distributed under the MIT License (see LICENSE). -An Overview of all dependencies is provided in [THIRD-PARTY.txt](https://github.com/draeger-lab/ModelPolisher/blob/master/THIRD-PARTY.txt), their respective licenses can be found in the licenses folder. +An Overview of all dependencies is provided in [THIRD-PARTY.txt](https://github.com/draeger-lab/ModelPolisher/blob/master/THIRD-PARTY.txt), their respective licenses can be found in the [licenses](./licenses) folder. + + diff --git a/build.gradle b/build.gradle old mode 100644 new mode 100755 index 9cf7972a..c1044a15 --- a/build.gradle +++ b/build.gradle @@ -35,14 +35,14 @@ licenseReport { /** === Java plugin configuration === **/ // sourceCompatibility defines the version of Java for compiling the source code. -// Ensures that the Java compiler will accept Java 18 language features. -sourceCompatibility = JavaVersion.VERSION_18 +// Ensures that the Java compiler will accept Java 17 language features. +sourceCompatibility = JavaVersion.VERSION_17 // targetCompatibility defines the version of Java bytecode to be generated. // Ensures that the compiled bytecode is compatible with Java 18 JVMs. -// Implication: The generated bytecode will run on Java 18 and newer JVMs, +// Implication: The generated bytecode will run on Java 17 and newer JVMs, // but not on older versions. -targetCompatibility = JavaVersion.VERSION_18 +targetCompatibility = JavaVersion.VERSION_17 /* Logical grouping of source files and resources. @@ -220,7 +220,7 @@ processResources.dependsOn(downloadMIRIAM) // create distributable standalone JAR that includes // not only the project's compiled classes but also all the dependencies' classes -tasks.register('uberJar', Jar) { +tasks.register('uberjar', Jar) { duplicatesStrategy = DuplicatesStrategy.EXCLUDE from sourceSets.main.output @@ -230,41 +230,6 @@ tasks.register('uberJar', Jar) { } } -// build a Docker container image after rebuilding the JAR -tasks.register('buildDockerContainer', Exec) { - commandLine "sh", "-c", "cp target/ModelPolisher-" + project.version + ".jar docker/java_docker && " + - "export COMPOSE_FILE=docker-compose.devel.yml && " + - "docker-compose pull && " + - "docker-compose build && " + - "rm docker/java_docker/ModelPolisher-" + project.version + ".jar" - dependsOn uberJar -} - -// bump jar version in ModelPolisher.sh -if (project.file( "src/scripts/ModelPolisher.sh").exists()) { - tasks.register('bumpVersionMP') { - replaceVersion(rootProject.projectDir.toString() + "/docker/java_docker/Dockerfile") - replaceVersion(rootProject.projectDir.toString() + "/README.md") - replaceVersion(rootProject.projectDir.toString() + "/src/scripts/ModelPolisher.sh") - } - processResources.dependsOn bumpVersionMP -} - -def replaceVersion(String path) { - ArrayList content = new ArrayList<>() - File file = new File(path) - String MPVersion = /ModelPolisher-(.*?)\d{1,2}(.\d{1,2}){1,2}(-beta)?.jar/ - file.eachLine { - line -> - content.add(line.replaceAll(MPVersion, "ModelPolisher-" + "${version}.jar")) - } - BufferedWriter writer = new BufferedWriter(new FileWriter(file)) - content.each { - line -> writer.writeLine(line) - } - writer.close() -} - /* === Application Plugin configuration */ diff --git a/dependency-licenses.txt b/dependency-licenses.txt deleted file mode 100644 index 00a37347..00000000 --- a/dependency-licenses.txt +++ /dev/null @@ -1,3 +0,0 @@ -License information for dependencies can be created by running 'gradle generateLicenseReport' -and is located in build/reports/dependency-license/index.html. -This functionality is provided by the 'Gradle License Report' plugin (https://github.com/jk1/Gradle-License-Report). diff --git a/development/docker-compose.databases.yml b/development/docker-compose.databases.yml index b5d55ad9..6c11a975 100644 --- a/development/docker-compose.databases.yml +++ b/development/docker-compose.databases.yml @@ -1,17 +1,27 @@ networks: modelpolisher: - driver: bridge + +volumes: + pgadmin-data: + +configs: + pgadmin-server-config: + file: ./pgadmin-servers.json + services: + biggdb: image: schmirgel/bigg_db:1.6 container_name: modelpolisher_pgadmin_biggdb networks: - modelpolisher + adb: image: schmirgel/annotatedb:0.1.1 container_name: modelpolisher_pgadmin_adb networks: - modelpolisher + pgadmin: image: dpage/pgadmin4 container_name: modelpolisher_pgadmin @@ -19,12 +29,16 @@ services: - biggdb - adb environment: - - PGADMIN_DEFAULT_USER=admin - - PGADMIN_DEFAULT_EMAIL=admin@example.com - - PGADMIN_DEFAULT_PASSWORD=admin + DEFAULT_SERVER_PORT: 80 + PGADMIN_DEFAULT_EMAIL: admin@example.com + PGADMIN_DEFAULT_PASSWORD: admin + PGADMIN_SERVER_JSON_FILE: /pgadmin4/servers.json volumes: - - ./servers.json:/pgadmin4/servers.json - networks: - - modelpolisher + - pgadmin-data:/var/lib/pgadmin + configs: + - source: pgadmin-server-config + target: /pgadmin4/servers.json ports: - "127.0.0.1:5050:80" + networks: + - modelpolisher diff --git a/development/docker-compose.local-jar.yml b/development/docker-compose.local-jar.yml index ceec582c..7940287a 100644 --- a/development/docker-compose.local-jar.yml +++ b/development/docker-compose.local-jar.yml @@ -1,21 +1,19 @@ -# ------------------------------------------------ -# docker-compose for ModelPolisher development -# run gradle devel first and then docker-compose -f docker-compose.devel.yml run ... or export COMPOSE_FILE and run normally -# ------------------------------------------------ -version: '3' services: + biggdb: image: schmirgel/bigg_db:1.6 container_name: modelpolisher_biggdb ports: - - 1310:5432 + - 127.0.0.1:1310:5432 + adb: image: schmirgel/annotatedb:0.1.1 container_name: modelpolisher_adb ports: - - 1013:5432 + - 127.0.0.1:1013:5432 + polisher: - build: ./docker/java_docker + build: ../Dockerfile container_name: modelpolisher_java depends_on: - biggdb diff --git a/development/servers.json b/development/pgadmin-servers.json similarity index 100% rename from development/servers.json rename to development/pgadmin-servers.json diff --git a/docker-compose.yml b/docker-compose.yml index 0129493e..3145ed6f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,17 @@ -# ------------------------------------------------ -# docker-compose for ModelPolisher release version -# update docker hub images for new releases and change image accordingly -# ------------------------------------------------ -version: '3' services: + biggdb: image: schmirgel/bigg_db:1.6 container_name: modelpolisher_biggdb ports: - - 1310:5432 + - 127.0.0.1:1310:5432 + adb: image: schmirgel/annotatedb:0.1.1 container_name: modelpolisher_adb ports: - - 1013:5432 + - 127.0.0.1:1013:5432 + polisher: image: mephenor/modelpolisher:2.1-beta depends_on: diff --git a/docker/adb_docker/Dockerfile b/docker/adb_docker/Dockerfile deleted file mode 100644 index 5586bc70..00000000 --- a/docker/adb_docker/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM postgres:latest AS builder - -LABEL maintainer="dario.eltzner@student.uni-tuebingen.de" - -RUN apt-get update && apt-get upgrade -y -COPY ./adb-v0.1.1.dump /adb.dump -COPY ./restore_adb.sh /docker-entrypoint-initdb.d/restore_adb.sh - -RUN mkdir -p /var/lib/postgresql-static/data -ENV PGDATA=/var/lib/postgresql-static/data -ENV POSTGRES_USER=postgres -ENV POSTGRES_PASSWORD=postgres - -RUN ["sed", "-i", "s/exec \"$@\"/echo \"skipping...\"/", "/usr/local/bin/docker-entrypoint.sh"] - -RUN ["/usr/local/bin/docker-entrypoint.sh", "postgres"] - -FROM postgres:latest - -COPY --from=builder /var/lib/postgresql-static/data $PGDATA - -EXPOSE 5432 - diff --git a/docker/adb_docker/restore_adb.sh b/docker/adb_docker/restore_adb.sh deleted file mode 100644 index 46e19623..00000000 --- a/docker/adb_docker/restore_adb.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -psql -c "DROP DATABASE IF EXISTS adb"; -psql -c "CREATE DATABASE adb"; -bash -c "pg_restore -O -d adb --verbose /adb.dump"; - diff --git a/docker/bigg_docker/Dockerfile b/docker/bigg_docker/Dockerfile deleted file mode 100644 index 6be5201a..00000000 --- a/docker/bigg_docker/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -FROM postgres:latest AS builder - -LABEL maintainer="dario.eltzner@student.uni-tuebingen.de" - -RUN apt-get update && apt-get upgrade -y -COPY ./bigg_database.dump /bigg_database.dump -COPY ./restore_biggdb.sh /docker-entrypoint-initdb.d/restore_biggdb.sh - -RUN mkdir -p /var/lib/postgresql-static/data -ENV PGDATA=/var/lib/postgresql-static/data -ENV POSTGRES_USER=postgres -ENV POSTGRES_PASSWORD=postgres - -RUN ["sed", "-i", "s/exec \"$@\"/echo \"skipping...\"/", "/usr/local/bin/docker-entrypoint.sh"] - -RUN ["/usr/local/bin/docker-entrypoint.sh", "postgres"] - -FROM postgres:latest - -COPY --from=builder /var/lib/postgresql-static/data $PGDATA - -EXPOSE 5432 - diff --git a/docker/bigg_docker/restore_biggdb.sh b/docker/bigg_docker/restore_biggdb.sh deleted file mode 100644 index dc1b3c03..00000000 --- a/docker/bigg_docker/restore_biggdb.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -psql -c 'DROP DATABASE IF EXISTS bigg' -psql -c 'CREATE DATABASE bigg' -bash -c 'pg_restore -O -d bigg --verbose /bigg_database.dump' diff --git a/docs/allclasses-index.html b/docs/allclasses-index.html index f3ea6ad7..ca3e5f93 100644 --- a/docs/allclasses-index.html +++ b/docs/allclasses-index.html @@ -1,7 +1,7 @@ - + All Classes and Interfaces (ModelPolisher 2.1 API) @@ -9,12 +9,17 @@ + -