diff --git a/Dockerfile b/Dockerfile index 1a50d76..966487f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,10 @@ FROM ubuntu:trusty -MAINTAINER Kristian Peters +MAINTAINER PhenoMeNal-H2020 Project + +LABEL Description="Convert NMR-RAW vendor files to nmrML." + -LABEL Description="Install nmrML in Docker." # Update & upgrade sources RUN apt-get -y update @@ -13,10 +15,6 @@ RUN apt-get -y install build-essential software-properties-common RUN apt-get install -y byobu curl git htop man unzip vim wget # Install Java -RUN echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections -#RUN add-apt-repository -y ppa:webupd8team/java -#RUN apt-get -y update -#RUN apt-get -y install oracle-java7-installer RUN apt-get -y install openjdk-7-jdk openjdk-7-jre # Clean up @@ -30,17 +28,13 @@ RUN git clone https://github.com/nmrML/nmrML WORKDIR /usr/src/nmrML/tools/Parser_and_Converters/Java/converter RUN install -m755 bin/nmrMLcreate /usr/local/bin RUN install -m755 bin/nmrMLproc /usr/local/bin -ADD nmrMLconv.sh /usr/local/bin/nmrMLconv RUN mkdir /usr/local/share/nmrML RUN install -m755 bin/converter.jar /usr/local/share/nmrML/ -# Set JAVA_HOME -#ENV JAVA_HOME /usr/lib/jvm/java-7-oracle -#ENV JAVA_HOME /usr/lib/jvm/default-java - # Define data directory RUN mkdir /data WORKDIR /data -ENTRYPOINT ["sh","/usr/local/bin/nmrMLconv"] +ENTRYPOINT [ "java", "-cp", "./", "-jar", "/usr/local/share/nmrML/converter.jar" ] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..d10f029 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# nmrML convert Docker Buildfile + +[nmrML](http://nmrml.org/) is an open mark-up language for NMR data. This project contains files that are needed to use the tools to convert RAW vendor NMR files to nmrML files in Docker. + +## Building the Docker image + +`docker build --tag="phnmnl/nmrmlconv:latest" .` + +Under macOS, you may encounter a `no space left on device` error, in which case you will have to create a docker machine with enough memory: +```bash +docker-machine create -d virtualbox --virtualbox-memory 2048 my_new_docker_machine +``` + +## Using the Docker image + +This examples uses one of the RAW files included in MTBLS1, which you get when you clone the [nmrML-github repository](https://github.com/nmrML/nmrML/) to /usr/src. + +`docker run -ti -v /usr/src/nmrML/examples/MTBLS1/FIDs/ADG10003u_007/10/:/src + -v $PWD:/data phnmnl/nmrmlconv:latest + -l create + -b -z -t bruker + -i /src/ + -o /data/ADG10003u_007_10.nmrml` + +## Galaxy usage + +A rudimentary Galaxy node description is included as `nmrmlconv.xml`. + diff --git a/_build.sh b/_build.sh index de33912..01fb15a 100755 --- a/_build.sh +++ b/_build.sh @@ -1,7 +1,7 @@ #!/bin/bash # Name -NAME="nmrml" +NAME="phnmnl/nmrmlconv" # CPU options #CPU_SHARES="--cpu-shares=8" @@ -10,5 +10,5 @@ NAME="nmrml" #MEM="--memory=24g" # Build docker -docker build --rm=true $CPU_SHARES $CPU_SETS $CPU_MEMS $MEM --tag=$NAME . +docker build $CPU_SHARES $CPU_SETS $CPU_MEMS $MEM --tag=$NAME . diff --git a/_run.sh b/_run.sh deleted file mode 100755 index 1ade1e9..0000000 --- a/_run.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# Make sure to add the following entry in /etc/default/grub: -#GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1" - -# Name -NAME="nmrml" - -# CPU options -#CPU_SHARES="--cpu-shares=8" -#CPU_SETS="--cpuset-cpus=0-$[$CPU_SHARES-1]" -#CPU_MEMS="--cpuset-mems=0" -#MEM="--memory=8g" - -# Ports -#PUBLISH="--publish=8080:80" - -# Volumes -#VOL="--volume=/vol/R/shiny/srv/shiny-server/MetFam:/vol/R/shiny/srv/shiny-server/MetFam:ro" - -# Run docker -docker run ${PUBLISH} --log-driver=syslog $VOL $CPU_SHARES $CPU_SETS $CPU_MEMS $MEM --name="${NAME}-run" -i -t -d $NAME - - - -# Detach/Attach docker -# detach: CTRL-P + CTRL-Q - -# Start and attach docker (you can also use docker start -ai instead) -#docker start ${NAME}-run -#docker attach ${NAME}-run - -# Start shell inside running docker -#docker exec -i -t ${NAME}-run /bin/bash - -# Start failed container with different entrypoint -#docker run -ti --entrypoint=/bin/bash ${NAME}-run - -# Commit changes locally -#docker commit ${NAME}-run - -# Show docker container and images -#docker ps -a -#docker images - -# Delete container and image -#docker rm ${NAME}-run -#docker rmi ${NAME} - -# Delete exited containers -#docker rm $(docker ps -a -f status=exited | grep -v CONTAINER\ ID | awk '{print $1}') - -# Delete intermediate/untagged images -#docker rmi $(docker images | grep '^' | awk '{print $3}') - diff --git a/nmrMLconv.sh b/nmrMLconv.sh deleted file mode 100755 index 14f1a60..0000000 --- a/nmrMLconv.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -JAVA="java" -NMRML_DIR="/usr/local/share/nmrML" -CONVERTER="$JAVA -cp ./ -jar $NMRML_DIR/converter.jar" - -$CONVERTER $i* - diff --git a/nmrmlconv.xml b/nmrmlconv.xml new file mode 100644 index 0000000..a063a4a --- /dev/null +++ b/nmrmlconv.xml @@ -0,0 +1,35 @@ + + + + + + phnmnl/nmrmlconv + + Converts vendor RAW NMR to nmrML. + + java -cp ./ -jar /usr/local/share/nmrML/converter.jar -l create -b -z -t $venformat -i $infile -o $outfile + + + + + + + + + + + + + + + + + + + + + + + nmrML is an open mark-up language for NMR data. This tool converts RAW vendor NMR data to nmrML format. + +