File: test-plast.sh

package info (click to toggle)
plast 2.3.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,252 kB
  • sloc: cpp: 29,001; ansic: 2,075; sh: 442; makefile: 15
file content (49 lines) | stat: -rwxr-xr-x 1,973 bytes parent folder | download
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
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash

#/*****************************************************************************
# *                                                                           *
# *   PLAST : Parallel Local Alignment Search Tool                            *
# *   Version 2.3, released November 2015                                     *
# *   Copyright (c) 2009-2015 Inria-Cnrs-Ens                                  *
# *                                                                           *
# *   PLAST is free software; you can redistribute it and/or modify it under  *
# *   the Affero GPL ver 3 License, that is compatible with the GNU General   *
# *   Public License                                                          *
# *                                                                           *
# *   This program is distributed in the hope that it will be useful,         *
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
# *   Affero GPL ver 3 License for more details.                              *
# *****************************************************************************/

# We get the directory of the script (absolute path)
BUILD_DIR=obj-$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
DATA_DIR=$(pwd)/db
_script=`find $(pwd)/obj-x86_64-linux-gnu/bin -name plast -executable`
_result=`dirname $_script`/out.txt

echo
echo "Start PLAST..."
echo

# We setup a PLAST command-line and run it to test the software
_cmdline="$_script -p plastp -i ${DATA_DIR}/query.fa -d ${DATA_DIR}/tursiops.fa -o $_result"

echo $_cmdline

eval $_cmdline

if [ ! -e $_result ] ; then
  echo "/!\ Error: PLAST fails on your system: result file does not exist: $_result"
  exit 1
fi

if [ ! -s $_result ]; then
  echo "/!\ Error: PLAST fails on your system: result file is empty: $_result"
  exit 1
fi

echo
echo "*** SUCCESS: result file is: $_result"
echo