Sign inSign up

sneumann/metfrag-war

By sneumann

•Updated over 5 years ago

MetFrag web application WAR file to be used with tomcat container

Image
0

1.0K

sneumann/metfrag-war repository overview

Build Status install with bioconda

⁠MetFrag relaunched

⁠Requirements
  • Java >= 1.6
  • Apache Maven ≥ 3.0.4
⁠Sources
  • download sources by cloning git repository
git clone https://github.com/ipb-halle/MetFragRelaunched.git

⁠MetFrag Webapp container

This container packages the MetFrag (https://github.com/ipb-halle/MetFragRelaunched⁠) webapp and some text databases based on the latest official tomcat docker container.

⁠Following options are supported:
  • 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
⁠Examples:

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
⁠Container repositories

See https://hub.docker.com/r/ipbhalle/metfragweb⁠ for automatic builds.

⁠MetFragLib

⁠Build
mvn clean install -pl MetFragLib -am
  • skipping test during build by
mvn clean install -pl MetFragLib -am -DskipTests

⁠MetFragCommandLine

⁠Basics
⁠Build
mvn clean install -pl MetFragCommandLine -am
  • skipping test during build by
mvn clean install -pl MetFragCommandLine -am -DskipTests

⁠MetFragR

⁠Basics
⁠Build
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")

⁠MetFragWeb

⁠Basics
  • MetFrag web version depends on MetFragLib. Runs with Java Server Faces 2.2 and PrimeFaces 5.3 and brings its own Tomcat web server
⁠Configuration
  • 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 = ...
⁠Build and Run
mvn clean tomcat7:run-war -pl MetFragWeb
  • skipping test during build by
mvn clean tomcat7:run-war -pl MetFragWeb -DskipTests
  • 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

  • you can change the port by adding -Dmaven.tomcat.port=...

⁠Build
  • if you just want to build the war file to transfer it to another Tomcat instance, run:
mvn package -pl MetFragWeb
  • after the successful build the war file is located in MetFragWeb/target/MetFragWeb.war
⁠Run
  • after the war file has been built once you can just run the embedded Tomcat server:
mvn tomcat7:run-war-only -pl MetFragWeb

⁠Additionals

⁠Run main methods
mvn exec:java -Dexec.mainClass="java_class_path" -Dexec.args="arg0 arg1 arg2 ..."  

⁠References

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⁠

Tag summary

Content type

Image

Digest

Size

1.1 GB

Last updated

over 5 years ago

docker pull sneumann/metfrag-war