diff --git a/README.txt b/README.txt index 8543c14..816963f 100644 --- a/README.txt +++ b/README.txt @@ -10,22 +10,27 @@ # # First check if binaries have been already compiled for your port # -# $ scripts/check_port +# $ scripts/check_port.sh # # if it prints : # -# + port is correctly installed +# + checking port compilation OK # # then everything is fine # # if it prints : # -# ! port not installed -# ! Please read README.txt for proper installation +# + port not yet compiled # # then, you should first compile binaries for your port # please consult: src/README.txt for details # +# if it prints smthing like +# * XXX version A.B.C (should be >= X.Y.Z) +# * please consider installing XXX from src/_unix_tools_ +# +# then, you should first compile some unix tools binaries for your port +# please consult: src/README.txt for details # # ------------------------- # -2- Distribution organisation diff --git a/detectors/ir/bin/go_ir.sh b/detectors/ir/bin/go_ir.sh index 18f903c..e199449 100755 --- a/detectors/ir/bin/go_ir.sh +++ b/detectors/ir/bin/go_ir.sh @@ -19,8 +19,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source ${SCRIPT_DIR}/../../normalize/lib/lookforIR.lib.sh +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source ${THIS_DIR}/../../normalize/lib/lookforIR.lib.sh pushTmpDir ORG.ir diff --git a/detectors/normalize/bin/go_normalize.sh b/detectors/normalize/bin/go_normalize.sh index 6f6b9a5..200e21d 100755 --- a/detectors/normalize/bin/go_normalize.sh +++ b/detectors/normalize/bin/go_normalize.sh @@ -24,8 +24,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source ${SCRIPT_DIR}/../lib/lookforIR.lib.sh +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source ${THIS_DIR}/../lib/lookforIR.lib.sh ORG_DEBUG=1 diff --git a/detectors/normalize/lib/lookforIR.lib.sh b/detectors/normalize/lib/lookforIR.lib.sh index fc8c787..1919a21 100644 --- a/detectors/normalize/lib/lookforIR.lib.sh +++ b/detectors/normalize/lib/lookforIR.lib.sh @@ -1,4 +1,4 @@ -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +source "${THIS_DIR}/../../../scripts/bash_init.sh" SELECTIR="${PROG_DIR}/../../normalize/lib/selectIR.py" diff --git a/detectors/normalize/tools/buildSCDB.sh b/detectors/normalize/tools/buildSCDB.sh index 6855b44..3cfae96 100755 --- a/detectors/normalize/tools/buildSCDB.sh +++ b/detectors/normalize/tools/buildSCDB.sh @@ -6,8 +6,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" pushTmpDir ORG.buildSCDB diff --git a/detectors/normalize/tools/coorienteSC.sh b/detectors/normalize/tools/coorienteSC.sh index 4ad3a0c..ed6cc50 100755 --- a/detectors/normalize/tools/coorienteSC.sh +++ b/detectors/normalize/tools/coorienteSC.sh @@ -23,8 +23,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" pushTmpDir ORG.coorienteSC diff --git a/detectors/rrna/bin/go_rrna.sh b/detectors/rrna/bin/go_rrna.sh index 832eccf..4d79957 100755 --- a/detectors/rrna/bin/go_rrna.sh +++ b/detectors/rrna/bin/go_rrna.sh @@ -16,8 +16,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" pushTmpDir ORG.rrna diff --git a/detectors/rrna/tools/buildRRNAModels.sh b/detectors/rrna/tools/buildRRNAModels.sh index 8aefb4e..8a9561f 100755 --- a/detectors/rrna/tools/buildRRNAModels.sh +++ b/detectors/rrna/tools/buildRRNAModels.sh @@ -6,8 +6,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" function fasta1li { diff --git a/detectors/rrna/tools/revcomp_alignments.sh b/detectors/rrna/tools/revcomp_alignments.sh index dd3873c..e06a015 100644 --- a/detectors/rrna/tools/revcomp_alignments.sh +++ b/detectors/rrna/tools/revcomp_alignments.sh @@ -6,8 +6,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" function revcomp { diff --git a/detectors/trna/bin/go_trna.sh b/detectors/trna/bin/go_trna.sh index 6e2d29d..dd6f468 100755 --- a/detectors/trna/bin/go_trna.sh +++ b/detectors/trna/bin/go_trna.sh @@ -5,7 +5,7 @@ #======================================================================================== # # Annotate tRNA based on the Aragorn software predictions. - +# # go_trna.sh # # - : The fasta file containing the genome to annotate @@ -14,10 +14,10 @@ # #======================================================================================== -# -- CAUTION -- Works as long than the script +# -- CAUTION -- Works as long as the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" pushTmpDir ORG.trna diff --git a/detectors/trna/tools/buildCAURefDB.sh b/detectors/trna/tools/buildCAURefDB.sh index d0e5d37..a0de820 100755 --- a/detectors/trna/tools/buildCAURefDB.sh +++ b/detectors/trna/tools/buildCAURefDB.sh @@ -6,8 +6,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" function fasta1li { diff --git a/detectors/trna/tools/extract_refCAUtRNA.sh b/detectors/trna/tools/extract_refCAUtRNA.sh index 5c4e761..6a8866e 100755 --- a/detectors/trna/tools/extract_refCAUtRNA.sh +++ b/detectors/trna/tools/extract_refCAUtRNA.sh @@ -6,8 +6,8 @@ # -- CAUTION -- Works as long than the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/../../../scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/../../../scripts/bash_init.sh" function taxid { egrep '/db_xref="taxon:[0-9]+"' $1 | \ diff --git a/org-annotate.sh b/org-annotate.sh index 563689b..e049753 100755 --- a/org-annotate.sh +++ b/org-annotate.sh @@ -1,26 +1,18 @@ #!/bin/bash # # - # -# Annotate tRNA +# Annotate Organelle # #======================================================================================== # -# Annotate tRNA based on the Aragorn software predictions. - -# go_trna.sh -# -# - : The fasta file containing the genome to annotate -# -# Results are printed to the standart output # #======================================================================================== -# -- CAUTION -- Works as long than the script +# -- CAUTION -- Works as long as the script # is not called through a symlink -SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" -source "${SCRIPT_DIR}/scripts/bash_init.sh" +THIS_DIR="$(dirname ${BASH_SOURCE[0]})" +source "${THIS_DIR}/scripts/bash_init.sh" pushTmpDir ORG.organnot @@ -52,7 +44,10 @@ pushTmpDir ORG.organnot loginfo "Annotating the rRNA genes..." ${PROG_DIR}/detectors/rrna/bin/go_rrna.sh ${QUERY} >> "${RESULTS}.annot" loginfo "Done." - + + loginfo "Annotating the CDS..." + ${PROG_DIR}/detectors/cds/bin/go_cds.sh ${QUERY} >> "${RESULTS}.annot" + loginfo "Done." loginfo "Printing annotations header..." echo "XX" diff --git a/scripts/bash_init.sh b/scripts/bash_init.sh index 42dfa5c..73b0185 100644 --- a/scripts/bash_init.sh +++ b/scripts/bash_init.sh @@ -143,27 +143,35 @@ function formatfasta { # # -# The absolute path to the ORG.Annote home direcotory +# The absolute path to the ORG.Annot home directory ORG_HOME=`getAbsolutePath $(dirname ${BASH_SOURCE[0]})/..` - -ORG_PORTNAME=`${ORG_HOME}/config/guess_port` # The architecture running the ORG.Annnote instance +ORG_PORTNAME=`${ORG_HOME}/config/guess_port` # The architecture running the ORG.Annot instance + +BIN_DIR="${ORG_HOME}/ports/${ORG_PORTNAME}/bin" # Directory containing binaries for this port + +SCRIPT_DIR="${ORG_HOME}/scripts" # Directory containing scripts utilities PROG_DIR="$(getAbsolutePath $(dirname $0))" # Directory containing the main script file -DATA_DIR="${ORG_HOME}/data" # Directory containing reference data for the annotation +LIB_DIR="$(getAbsolutePath ${PROG_DIR}/../lib)" # Directory containing the main script libraries CALL_DIR="$(getAbsolutePath $(pwd))" # Directory from where the main script is called -IR_DATA_DIR="${DATA_DIR}/ir" # Directory containing data related to the - # Inverted repeat strucuture +DATA_DIR="${ORG_HOME}/data" # Directory containing reference data for the annotation + +IR_DATA_DIR="${DATA_DIR}/ir" # Directory containing data related to + # IRs detection + +TRNA_DATA_DIR="${DATA_DIR}/trna" # Directory containing data related to + # tRNAs detection + +CDS_DATA_DIR="${DATA_DIR}/trna" # Directory containing data related to + # CDSs detection -TRNA_DATA_DIR="${DATA_DIR}/trna" # Directory containing data related to the - # tRNA detection - -RRNA_DATA_DIR="${DATA_DIR}/rrna" # Directory containing data related to the - # rRNA dectection +RRNA_DATA_DIR="${DATA_DIR}/rrna" # Directory containing data related to + # rRNAs detection # @@ -179,11 +187,10 @@ RRNA_DATA_DIR="${DATA_DIR}/rrna" # Directory containing data related to the # # We alter the path to include the bin dir corresponding to the port -PATH="${ORG_HOME}/ports/${ORG_PORTNAME}/bin:${PATH}" +PATH="${SCRIPT_DIR}:${BIN_DIR}:${PATH}" export PATH # Force to basic international setting for a correction behaviour of AWK on mac with float export LANG=C export LC_ALL=C - diff --git a/scripts/check_port b/scripts/check_port deleted file mode 100755 index 1289d67..0000000 --- a/scripts/check_port +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/csh -# -# check if port is installed -# -set ORG_HOME = `dirname $0`/.. - -set PORTNAME = `$ORG_HOME/config/guess_port` - -if (-f $ORG_HOME/ports/$PORTNAME/bin/exonerate) then - echo "+ port $PORTNAME is correctly installed" - exit 0 -endif - -echo "! port $PORTNAME not installed" -echo "! Please read README.txt for proper installation" - -exit 1 - - - diff --git a/src/README.txt b/src/README.txt index d1b206a..af5bb26 100644 --- a/src/README.txt +++ b/src/README.txt @@ -14,6 +14,7 @@ # gnu tar : version >= 1.15 # gnu make : version >= 3.81 # gcc and g++ : version >= 3.4.6 +# gawk : version >= 4.0.1 # # note: valid versions of gnu tar and make are in _unix_tools_ # diff --git a/src/repseek/repseek-2014.09/Makefile b/src/repseek/repseek-2014.09/Makefile index 626d26d..2488d30 100644 --- a/src/repseek/repseek-2014.09/Makefile +++ b/src/repseek/repseek-2014.09/Makefile @@ -58,7 +58,7 @@ all: repseek install repseek: $(OBJ) main_repseek.c - $(CC) $(CFLAGS) -o $@ $(OBJ) main_repseek.c $(LDFLAGS); + $(CC) $(CFLAGS) -o $@ $(OBJ) main_repseek.c $(LDFLAGS) $(LDLIBS); install: repseek