File: simple_test.sh

package info (click to toggle)
simka 1.5.3-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,204 kB
  • sloc: cpp: 5,321; python: 672; sh: 386; makefile: 26
file content (38 lines) | stat: -rwxr-xr-x 1,151 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
ADDITIONAL_SIMKA_OPTIONS=$*
#simple test with real data

# look for simka binary. In devel mode, it's in ../build/bin directory.
# In production mode, it's in ../bin directory.
bindir="/usr/bin"

# run simka
command="$bindir/simka -in ../example/simka_input.txt -out ./simka_results/ -out-tmp ./simka_temp_output $ADDITIONAL_SIMKA_OPTIONS"
#printf "$command\n\n"

# DO NOT add lines between '$command' exec and 'var...' !
$command
var=$?

printf "\n\n\n"

if [ $var -eq 0 ]
then
    echo  "*** Test: PASSED"
else
    echo  "*** Test: FAILED"
    exit 1
fi

#printf "\nremoving all created dirs\n"
# clean temp files
rm -rf temp_output

printf "\nCommand used:\n" 
printf "\t$command\n"

printf "\nCommand for visualizing results:\n"
printf "\tpython ../scripts/visualization/run-visualization.py -in ./simka_results/ -out ./simka_results/ -pca -heatmap -tree\n"

printf "\nCommand for visualizing results with metadata annotations:\n"
printf "\tpython ../scripts/visualization/run-visualization.py -in ./simka_results/ -out ./simka_results/ -pca -heatmap -tree -metadata-in ../example/dataset_metadata.csv -metadata-variable VARIABLE_1\n"