Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test_install and README updated
  • Loading branch information
snikumbh committed Aug 2, 2017
1 parent 69de8df commit 3c43837
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 50 deletions.
29 changes: 16 additions & 13 deletions README.md
Expand Up @@ -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 <your_MCR_path_here> <version>
```
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 <your_MCR_path_here>
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 <MATLAB_Runtime_location> <config_file>
./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.
Expand Down
35 changes: 0 additions & 35 deletions run_CoMIK.sh

This file was deleted.

9 changes: 7 additions & 2 deletions 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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3c43837

Please sign in to comment.