- Java = openjdk11
- Apache Maven = 3.8
- download sources by cloning git repository
git clone https://github.com/ipb-halle/MetFragRelaunched.git
This container packages the MetFrag (https://github.com/ipb-halle/MetFragRelaunched) webapp and some text databases based on the latest official tomcat docker container.
- environment variable JAVA_OPTS="-Xmx?g -Xms?g" to adjust jvm memory
- environment variable WEBPREFIX to adjust the web app name
- automatic use of a metfrag settings file if provided at /resources/settings.properties
Run MetFrag at http://localhost:8888/MetFragWeb
docker run -it --rm -p 8888:8080 ipb-halle/metfragweb
Run Metfrag at http://localhost:8888/mymetfrag with 4GB JVM size using a settings file from ./settings.properties
docker run -it --rm -e JAVA_OPTS="-Xmx4g -Xms4g" -e WEBPREFIX=mymetfrag -v $(pwd)/settings.properties:/resources/settings.properties -p 8888:8080 ipbhalle/metfragweb
See https://hub.docker.com/r/ipbhalle/metfragweb for automatic builds.
mvn clean install -pl MetFragLib -am
- skipping test during build by
mvn clean install -pl MetFragLib -am -DskipTests
- MetFrag commandline version depends on MetFragLib
- for a short tutorial visit http://ipb-halle.github.io/MetFrag/projects/metfragcl/
mvn clean install -pl MetFragCommandLine -am
- skipping test during build by
mvn clean install -pl MetFragCommandLine -am -DskipTests
- MetFrag R package depends on MetFragLib
- for a short tutorial visit http://ipb-halle.github.io/MetFrag/projects/metfragr/
mvn clean install -pl MetFragR -am
- skipping test during build by
mvn clean install -pl MetFragR -am -DskipTests
- after the successful build the MetFragR java library is located in MetFragR/rpackage/metfRag/inst/java/
- point to the directory MetFragR/rpackage/ to perform checks and the build of the R package
R CMD check metfRag
R CMD build metfRag
- after the successful build the R package can be installed in R
install.packages("metfRag",repos=NULL,type="source")
library(metfRag)
- all earlier steps can be skipped by installing the pre-compiled R package from GitHub
library(devtools)
install_github("ipb-halle/MetFragR/metfRag")
- MetFrag web version depends on MetFragLib. Runs with Java Server Faces 2.2 and PrimeFaces 5.3 and brings its own Tomcat web server
- rename file settings.properties.template in MetFragWeb/src/main/webapp/resources to settings.properties and set necessary parameters
## define chemspider token to query ChemSpider database
ChemSpiderToken = ...
## if MetFragWeb host is connected via proxy to the internet provide proxy settings for
## different web services
MoNAProxyServer = ...
MoNAProxyPort = ...
KeggProxyServer = ...
KeggProxyPort = ...
MetaCycProxyServer = ...
MetaCycProxyPort = ...
## to speed up database queries you can set up local repositories by setting up MySQL or
## PostgreSQL databases
LocalPubChemDatabase = ...
LocalPubChemDatabaseCompoundsTable = ...
LocalPubChemDatabasePortNumber = ...
LocalPubChemDatabaseServerIp = ...
LocalPubChemDatabaseMassColumn = ...
LocalPubChemDatabaseFormulaColumn = ...
LocalPubChemDatabaseInChIColumn = ...
LocalPubChemDatabaseInChIKey1Column = ...
LocalPubChemDatabaseInChIKey2Column = ...
LocalPubChemDatabaseCidColumn = ...
LocalPubChemDatabaseSmilesColumn = ...
LocalPubChemDatabaseUser = ...
LocalPubChemDatabasePassword = ...
LocalPubChemDatabaseCompoundNameColumn = ...
mvn clean install -pl MetFragWeb -am
mvn org.codehaus.cargo:cargo-maven3-plugin:run -pl MetFragWeb
- skipping test during build by
mvn clean install -pl MetFragWeb -am -DskipTests
mvn org.codehaus.cargo:cargo-maven3-plugin:run -pl MetFragWeb
- after the successful build Tomcat web server runs on port 8080
- MetFragWeb can be accessed via pointing to http://localhost:8080/index.xhtml in the web browser
- if you just want to build the war file to transfer it to another Tomcat instance, run:
mvn clean package -pl MetFragWeb -am
- after the successful build the war file is located in MetFragWeb/target/MetFragWeb.war
mvn exec:java -Dexec.mainClass="java_class_path" -Dexec.args="arg0 arg1 arg2 ..."
Ruttkies C., Schymanski E.L. et al, MetFrag relaunched: incorporating strategies beyond in silico fragmentation. Journal of Cheminformatics, 2016, 8:3. http://jcheminf.springeropen.com/articles/10.1186/s13321-016-0115-9