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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 26 May 2020 15:07:58 +0200
Description: Adapt paths to Debian locations
--- a/scripts/lumpyexpress
+++ b/scripts/lumpyexpress
@@ -62,14 +62,14 @@ source_binaries() {
else
echo "Config file $1 not found. Attempting to auto-source executables"
# general
- LUMPY_HOME=$( dirname `which lumpyexpress` )
+ LUMPY_HOME=/usr/share/lumpy-sv
LUMPY=`which lumpy || true`
SAMBLASTER=`which samblaster || true`
SAMBAMBA=`which sambamba || true`
SAMTOOLS=`which samtools || true`
# python 2.7 or newer, must have pysam, numpy installed
- PYTHON=`which python || true`
+ PYTHON=`which python3 || true`
# For testing if the full BAM is actually a CRAM!
HEXDUMP=`which hexdump || true`
@@ -92,8 +92,8 @@ check_python_modules() {
PYTHON_TEST=$1
echo -e "\nChecking for required python modules ($PYTHON_TEST)..."
- $PYTHON_TEST -c "import imp; imp.find_module('pysam')"
- $PYTHON_TEST -c "import imp; imp.find_module('numpy')"
+ $PYTHON_TEST -c "from importlib import util; print('pysam not found') if util.find_spec('pysam') is None else None"
+ $PYTHON_TEST -c "from importlib import util; print('numpy not found') if util.find_spec('numpy') is None else None"
}
## usage
@@ -126,7 +126,7 @@ options:
# set defaults
LUMPY_DIR=`dirname $0`
-CONFIG="$LUMPY_DIR/lumpyexpress.config"
+CONFIG="/etc/lumpy-sv/lumpyexpress.config"
THREADS=1
ANNOTATE=0
MIN_SAMPLE_WEIGHT=4
@@ -228,17 +228,17 @@ source_binaries $CONFIG
if [[ -z "$LUMPY" ]]
then
usage
- echo -e "Error: lumpy executable not found. Please set path in $LUMPY_DIR/lumpyexpress.config file\n"
+ echo -e "Error: lumpy executable not found. Please set path in /etc/lumpy-sv/lumpyexpress.config file\n"
exit 1
elif [[ -z "$PAIREND_DISTRO" ]]
then
usage
- echo -e "Error: pairend_distro.py executable not found. Please set path in $LUMPY_DIR/lumpyexpress.config file\n"
+ echo -e "Error: pairend_distro.py executable not found. Please set path in /etc/lumpy-sv/lumpyexpress.config file\n"
exit 1
elif [[ -z "$BAMFILTERRG" ]]
then
usage
- echo -e "Error: bamfilterrg.py executable not found. Please set path in $LUMPY_DIR/lumpyexpress.config file\n"
+ echo -e "Error: bamfilterrg.py executable not found. Please set path in /etc/lumpy-sv/lumpyexpress.config file\n"
exit 1
fi
@@ -259,7 +259,7 @@ then
SAMSORT="$SAMTOOLS sort -m 1G -T "
else
usage
- echo -e "Error: neither samtools nor sambamba were found. Please set path of one of these in $LUMPY_DIR/lumpyexpress.config file\n"
+ echo -e "Error: neither samtools nor sambamba were found. Please set path of one of these in /etc/lumpy-sv/lumpyexpress.config file\n"
exit 1
fi
|