Author: Andreas Tille <tille@debian.org>
Last-Update: Mon, 21 Jan 2019 09:01:19 +0100
Description: There is no point in delivering read_file_names in /usr/bin
 It is available in /usr/share/discosnp/bin/read_file_names - this patch adapts
 the scripts using it.
 .
 Some other issues of these scripts are fixed as well.

--- a/run_discoSnp++.sh
+++ b/run_discoSnp++.sh
@@ -66,7 +66,8 @@ e="" # if set to -e: Map variant predict
 graph_reused="Egg62hdS7knSFvF3" # with -g option, we use a previously created graph. 
 
 #EDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-EDIR=$( python -c "import os.path; print(os.path.dirname(os.path.realpath(\"${BASH_SOURCE[0]}\")))" ) # as suggested by Philippe Bordron 
+#EDIR=$( python -c "import os.path; print(os.path.dirname(os.path.realpath(\"${BASH_SOURCE[0]}\")))" ) # as suggested by Philippe Bordron 
+EDIR="/usr"
 
 
 if [ -d "$EDIR/build/" ] ; then # VERSION SOURCE COMPILED
@@ -75,13 +76,13 @@ if [ -d "$EDIR/build/" ] ; then # VERSIO
     kissnp2_bin=$EDIR/build/bin/kissnp2
     kissreads2_bin=$EDIR/build/bin/kissreads2
 else # VERSION BINARY
-    read_file_names_bin=$EDIR/bin/read_file_names
+    read_file_names_bin=/usr/lib/discosnp/bin/read_file_names
     dbgh5_bin=$EDIR/bin/dbgh5
     kissnp2_bin=$EDIR/bin/kissnp2
     kissreads2_bin=$EDIR/bin/kissreads2
 fi
 
-chmod +x $EDIR/scripts/*.sh $EDIR/run_discoSnpRad.sh 2>/dev/null # Usefull for binary distributions
+#chmod +x $EDIR/scripts/*.sh $EDIR/run_discoSnpRad.sh 2>/dev/null # Usefull for binary distributions
 
 useref=""
 wraith="false"
@@ -685,7 +686,7 @@ echo -e " #################### CREATE VC
 echo -e " ############################################################### $reset"
 
 if [ -z "$genome" ]; then #  NO reference genome use, vcf creator mode 1
-    vcfCreatorCmd="$EDIR/scripts/run_VCF_creator.sh -p ${kissprefix}_coherent.fa -o ${kissprefix}_coherent.vcf"
+    vcfCreatorCmd="/usr/share/discosnp/scripts/run_VCF_creator.sh -p ${kissprefix}_coherent.fa -o ${kissprefix}_coherent.vcf"
     echo $green$vcfCreatorCmd$cyan
     if [[ "$wraith" == "false" ]]; then
         $vcfCreatorCmd
@@ -696,7 +697,7 @@ if [ -z "$genome" ]; then #  NO referenc
         exit 1
     fi
 else # A Reference genome is provided, vcf creator mode 2
-    vcfCreatorCmd="$EDIR/scripts/run_VCF_creator.sh $bwa_path_option -G $genome $bwa_path_option -p ${kissprefix}_coherent.fa -o ${kissprefix}_coherent.vcf  -I $option_cores_post_analysis $e"
+    vcfCreatorCmd="/usr/share/discosnp/scripts/run_VCF_creator.sh $bwa_path_option -G $genome $bwa_path_option -p ${kissprefix}_coherent.fa -o ${kissprefix}_coherent.vcf  -I $option_cores_post_analysis $e"
     echo $green$vcfCreatorCmd$cyan
     if [[ "$wraith" == "false" ]]; then
         $vcfCreatorCmd
@@ -729,4 +730,4 @@ if [[ "$wraith" == "false" ]]; then
     fi
     echo -e " Thanks for using discoSnp++ - http://colibread.inria.fr/discoSnp/ - Forum: http://www.biostars.org/t/discoSnp/"
     echo -e "################################################################################################################$reset"
-fi
\ No newline at end of file
+fi
