diff --git a/README.md b/README.md index 1e48124..e07374d 100644 --- a/README.md +++ b/README.md @@ -20,42 +20,45 @@ For the visualizations, the following R (R version 3.4.0) packages are needed This repository contains Matlab code for the project *CoMIK*. The various ".m" files define corresponding Matlab functions. We use MKL implementation from Shogun's modular interface for Python. The Python script mkl.py handles solving of the MKL problem. +If you have MATLAB installed, you can run _CoMIK_ from inside MATLAB. But, in case you do not have MATLAB installed, we provide an executable version for which you would additionally need the MATLAB Runtime. MATLAB Runtime can be downloaded from https://mathworks.com/products/compiler/mcr.html . We recommend getting version 9.0 (R2016a) installed. + ## Installation: ``` git clone https://github.molgen.mpg.de/snikumbh/comik.git cd comik sh install.sh ``` -Once the dependencies are handled, e.g., SHOGUN, MATLAB runtime etc., you can test the installation as follows - +- Install SHOGUN +- Install MATLAB Runtime. Follow the instructions for installation of the MATLAB Runtime; install at any location of your choice on the disk. +Once the dependencies are handled, e.g., SHOGUN, MATLAB runtime etc., and the paths are set, you can test _CoMIK_ as follows ``` -sh test_install.sh +a) sh test_install.sh matlab + + OR + +b) sh test_install.sh executable ``` -This performs the test for both, the executable and from inside MATLAB. For testing either of them, use +With (a), _CoMIK_ is tested from inside of MATLAB, and with (b), the _CoMIK_ executable is tested. Example command to test the executable for version 9.0 (R2016a) ``` -sh test_install.sh executable -OR -sh test_install.sh matlab +sh test_install.sh executable /usr/lib/matlab-9.0 v90 ``` ## Usage: -- If you have MATLAB, see the example config file `config-comik.txt`, for an example function call from inside Matlab: +If you have MATLAB, an example function call from inside Matlab is as follows: For simulated dataset 1 provided in the folder `sample_data/simulated_dataset1` ```Matlab comik_wrapper('config-comik.txt'); ``` -- For those who do not have MATLAB, we provide an executable. Additionally, you require only the MATLAB Runtime installed. The appropriate version can be downloaded from https://mathworks.com/products/compiler/mcr.html . -- Follow the instructions for installation of the MATLAB Runtime; install at any location of your choice on the disk. -- Once installed, provide the corresponding path when running the shell script `run_CoMIK.sh` as follows: +If not, you can use the executable as follows: ``` ./run_CoMIK_v90.sh ./run_CoMIK_v90.sh /usr/lib/matlab-9.0 config-comik.txt #for version 9.0 (R2016a) -OR + OR ./run_CoMIK_v86.sh /usr/lib/matlab-8.6 config-comik.txt #for version 8.6 (R2015b) ``` -where `/usr/lib/matlab-9.0` could be replaced with the location of the MATLAB runtime on your machine. Additionally, when required, you can add your own paths to the `LD_LIBRARY_PATH` environment variable in the file `run_CoMIK_v86.sh` or `run_CoMIK_v90.sh` (for example, the path for shogun can be added here). +where `/usr/lib/matlab-9.0` could be replaced with the location of the MATLAB Runtime on your machine. Additionally, when required, you can add your own paths to the `LD_LIBRARY_PATH` environment variable in the file `run_CoMIK_v86.sh` or `run_CoMIK_v90.sh` (for example, the path for shogun can be added here). _CoMIK_ requires two FASTA files as input -- the first FASTA file containing sequences in the positive class; the second FASTA file containing negative class sequences. Other params are explained below. diff --git a/run_CoMIK.sh b/run_CoMIK.sh deleted file mode 100755 index 5d0ef00..0000000 --- a/run_CoMIK.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# script for execution of deployed applications -# -# Sets up the MATLAB Runtime environment for the current $ARCH and executes -# the specified command. -# -exe_name=$0 -exe_dir=`dirname "$0"` -echo "------------------------------------------" -if [ "x$1" = "x" ]; then - echo Usage: - echo $0 \ args -else - echo Setting up environment variables - MCRROOT="$1" - echo --- - LD_LIBRARY_PATH=.:${MCRROOT}/runtime/glnxa64 ; - LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnxa64 ; - LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnxa64; - LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/opengl/lib/glnxa64; - # Uncomment the next line and append your paths here - # LD_LIBRARY_PATH=${LD_LIBRARY_PATH}: ; - export LD_LIBRARY_PATH; - echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}; - shift 1 - args= - while [ $# -gt 0 ]; do - token=$1 - args="${args} \"${token}\"" - shift - done - eval "\"${exe_dir}/CoMIK\"" $args -fi -exit - diff --git a/test_install.sh b/test_install.sh index 590b0a1..7b1ad07 100644 --- a/test_install.sh +++ b/test_install.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Author: snikumbh +# +# Expected input arguments: +# a. First argument: executable/matlab +# b. Only if you specified "executable" in (a), specify the path where the MATLAB Runtime is installed +# c. Only if you specified "executable" in (a), specify the version as v86/v90 for MATLAB Runtime version 8.6 (R2015b) or version 9.0 (R2016a) +# echo 'Preparing for testing ...' cp config-comik.txt config-comik-test.txt @@ -36,8 +43,6 @@ elif [ "$1" = "matlab" ] then echo 'Only testing inside MATLAB ... this might take some time' matlab -nodesktop -nodisplay -nosplash -r "comik_wrapper('config-comik-test.txt'); exit;" -else - echo 'Testing both executable and from inside matlab ... this might take some time' fi if [ -d "$test_comik_run_simulated_dataset1"]; then