annotate install_amplicon_analysis-1.3.6.sh @ 4:86a12d75ebe4 draft default tip

planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
author pjbriggs
date Fri, 20 Dec 2019 06:59:49 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
1 #!/bin/sh -e
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
2 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
3 # Prototype script to setup a conda environment with the
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
4 # dependencies needed for the Amplicon_analysis_pipeline
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
5 # script
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
6 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
7 # Handle command line
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
8 usage()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
9 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
10 echo "Usage: $(basename $0) [DIR]"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
11 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
12 echo "Installs the Amplicon_analysis_pipeline package plus"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
13 echo "dependencies in directory DIR (or current directory "
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
14 echo "if DIR not supplied)"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
15 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
16 if [ ! -z "$1" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
17 # Check if help was requested
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
18 case "$1" in
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
19 --help|-h)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
20 usage
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
21 exit 0
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
22 ;;
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
23 esac
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
24 # Assume it's the installation directory
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
25 cd $1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
26 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
27 # Versions
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
28 PIPELINE_VERSION=1.3.6
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
29 CONDA_REQUIRED_VERSION=4.6.14
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
30 RDP_CLASSIFIER_VERSION=2.2
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
31 # Directories
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
32 TOP_DIR=$(pwd)/Amplicon_analysis-${PIPELINE_VERSION}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
33 BIN_DIR=${TOP_DIR}/bin
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
34 CONDA_DIR=${TOP_DIR}/conda
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
35 CONDA_BIN=${CONDA_DIR}/bin
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
36 CONDA_LIB=${CONDA_DIR}/lib
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
37 CONDA=${CONDA_BIN}/conda
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
38 ENV_NAME="amplicon_analysis_pipeline@${PIPELINE_VERSION}"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
39 ENV_DIR=${CONDA_DIR}/envs/$ENV_NAME
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
40 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
41 # Functions
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
42 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
43 # Report failure and terminate script
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
44 fail()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
45 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
46 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
47 echo ERROR $@ >&2
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
48 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
49 echo "$(basename $0): installation failed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
50 exit 1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
51 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
52 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
53 # Rewrite the shebangs in the installed conda scripts
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
54 # to remove the full path to conda 'bin' directory
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
55 rewrite_conda_shebangs()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
56 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
57 pattern="s,^#!${CONDA_BIN}/,#!/usr/bin/env ,g"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
58 find ${CONDA_BIN} -type f -exec sed -i "$pattern" {} \;
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
59 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
60 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
61 # Reset conda version if required
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
62 reset_conda_version()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
63 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
64 CONDA_VERSION="$(${CONDA_BIN}/conda -V 2>&1 | head -n 1 | cut -d' ' -f2)"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
65 echo conda version: ${CONDA_VERSION}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
66 if [ "${CONDA_VERSION}" != "${CONDA_REQUIRED_VERSION}" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
67 echo "Resetting conda to last known working version $CONDA_REQUIRED_VERSION"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
68 ${CONDA_BIN}/conda config --set allow_conda_downgrades true
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
69 ${CONDA_BIN}/conda install -y conda=${CONDA_REQUIRED_VERSION}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
70 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
71 echo "conda version ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
72 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
73 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
74 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
75 # Install conda
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
76 install_conda()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
77 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
78 echo "++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
79 echo "Installing conda"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
80 echo "++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
81 if [ -e ${CONDA_DIR} ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
82 echo "*** $CONDA_DIR already exists ***" >&2
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
83 return
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
84 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
85 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
86 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
87 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
88 wget -q https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
89 bash ./Miniconda2-latest-Linux-x86_64.sh -b -p ${CONDA_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
90 echo Installed conda in ${CONDA_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
91 echo -n "Adding conda bin to PATH..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
92 export PATH=${CONDA_BIN}:$PATH
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
93 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
94 # Reset the conda version to a known working version
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
95 # (to avoid problems observed with e.g. conda 4.7.10)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
96 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
97 reset_conda_version
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
98 # Update the installation files
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
99 # This is to avoid problems when the length the installation
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
100 # directory path exceeds the limit for the shebang statement
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
101 # in the conda files
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
102 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
103 echo -n "Rewriting conda shebangs..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
104 rewrite_conda_shebangs
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
105 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
106 cd $cwd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
107 rm -rf $wd/*
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
108 rmdir $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
109 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
110 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
111 # Create conda environment
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
112 install_conda_packages()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
113 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
114 echo "+++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
115 echo "Installing conda packages"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
116 echo "+++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
117 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
118 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
119 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
120 cat >environment.yml <<EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
121 name: ${ENV_NAME}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
122 channels:
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
123 - defaults
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
124 - conda-forge
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
125 - bioconda
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
126 dependencies:
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
127 - python=2.7
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
128 - cutadapt=1.8
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
129 - sickle-trim=1.33
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
130 - bioawk=1.0
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
131 - pandaseq=2.8.1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
132 - spades=3.10.1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
133 - fastqc=0.11.3
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
134 - qiime=1.9.1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
135 - blast-legacy=2.2.26
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
136 - fasta-splitter=0.2.6
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
137 - rdp_classifier=$RDP_CLASSIFIER_VERSION
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
138 - vsearch=2.10.4
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
139 - r=3.5.1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
140 - r-tidyverse=1.2.1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
141 - bioconductor-dada2=1.8
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
142 - bioconductor-biomformat=1.8.0
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
143 EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
144 ${CONDA} env create --name "${ENV_NAME}" -f environment.yml
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
145 if [ $? -ne 0 ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
146 fail "Non-zero exit status from 'conda env create'"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
147 elif [ ! -e "${ENV_DIR}" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
148 fail "Failed to create conda environment: ${ENV_DIR} not found"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
149 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
150 echo Created conda environment in ${ENV_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
151 cd $cwd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
152 rm -rf $wd/*
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
153 rmdir $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
154 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
155 # Patch qiime 1.9.1 tools to switch deprecated 'axisbg'
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
156 # matplotlib property to 'facecolor':
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
157 # https://matplotlib.org/api/prev_api_changes/api_changes_2.0.0.html
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
158 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
159 for exe in make_2d_plots.py plot_taxa_summary.py ; do
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
160 echo -n "Patching ${exe}..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
161 find ${CONDA_DIR} -type f -name "$exe" -exec sed -i 's/axisbg=/facecolor=/g' {} \;
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
162 echo "done"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
163 done
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
164 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
165 # Patch qiime 1.9.1 tools to switch deprecated 'set_axis_bgcolor'
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
166 # method call to 'set_facecolor':
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
167 # https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.set_axis_bgcolor.html
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
168 for exe in make_rarefaction_plots.py ; do
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
169 echo -n "Patching ${exe}..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
170 find ${CONDA_DIR} -type f -name "$exe" -exec sed -i 's/set_axis_bgcolor/set_facecolor/g' {} \;
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
171 echo "done"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
172 done
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
173 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
174 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
175 # Install all the non-conda dependencies in a single
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
176 # function (invokes separate functions for each package)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
177 install_non_conda_packages()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
178 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
179 echo "+++++++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
180 echo "Installing non-conda packages"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
181 echo "+++++++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
182 # Temporary working directory
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
183 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
184 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
185 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
186 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
187 # Amplicon analysis pipeline
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
188 echo -n "Installing Amplicon_analysis_pipeline..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
189 if [ -e ${BIN_DIR}/Amplicon_analysis_pipeline.sh ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
190 echo "already installed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
191 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
192 install_amplicon_analysis_pipeline
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
193 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
194 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
195 # ChimeraSlayer
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
196 echo -n "Installing ChimeraSlayer..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
197 if [ -e ${BIN_DIR}/ChimeraSlayer.pl ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
198 echo "already installed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
199 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
200 install_chimeraslayer
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
201 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
202 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
203 # Uclust
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
204 # This no longer seems to be available for download from
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
205 # drive5.com so don't download
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
206 echo "WARNING uclust not available: skipping installation"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
207 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
208 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
209 # Amplicon analyis pipeline
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
210 install_amplicon_analysis_pipeline()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
211 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
212 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
213 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
214 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
215 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
216 wget -q https://github.com/MTutino/Amplicon_analysis/archive/${PIPELINE_VERSION}.tar.gz
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
217 tar zxf ${PIPELINE_VERSION}.tar.gz
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
218 cd Amplicon_analysis-${PIPELINE_VERSION}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
219 INSTALL_DIR=${TOP_DIR}/share/amplicon_analysis_pipeline-${PIPELINE_VERSION}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
220 mkdir -p $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
221 ln -s $INSTALL_DIR ${TOP_DIR}/share/amplicon_analysis_pipeline
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
222 for f in *.sh *.R ; do
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
223 /bin/cp $f $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
224 done
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
225 /bin/cp -r uc2otutab $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
226 mkdir -p ${BIN_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
227 cat >${BIN_DIR}/Amplicon_analysis_pipeline.sh <<EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
228 #!/usr/bin/env bash
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
229 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
230 # Point to Qiime config
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
231 export QIIME_CONFIG_FP=${TOP_DIR}/qiime/qiime_config
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
232 # Set up the RDP jar file
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
233 export RDP_JAR_PATH=${TOP_DIR}/share/rdp_classifier/rdp_classifier-${RDP_CLASSIFIER_VERSION}.jar
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
234 # Set the Matplotlib backend
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
235 export MPLBACKEND="agg"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
236 # Put the scripts onto the PATH
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
237 export PATH=${BIN_DIR}:${INSTALL_DIR}:\$PATH
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
238 # Activate the conda environment
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
239 export PATH=${CONDA_BIN}:\$PATH
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
240 source ${CONDA_BIN}/activate ${ENV_NAME}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
241 # Execute the driver script with the supplied arguments
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
242 $INSTALL_DIR/Amplicon_analysis_pipeline.sh \$@
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
243 exit \$?
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
244 EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
245 chmod 0755 ${BIN_DIR}/Amplicon_analysis_pipeline.sh
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
246 cat >${BIN_DIR}/install_reference_data.sh <<EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
247 #!/usr/bin/env bash -e
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
248 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
249 function usage() {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
250 echo "Usage: \$(basename \$0) DIR"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
251 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
252 if [ -z "\$1" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
253 usage
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
254 exit 0
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
255 elif [ "\$1" == "--help" ] || [ "\$1" == "-h" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
256 usage
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
257 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
258 echo "Install reference data into DIR"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
259 exit 0
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
260 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
261 echo "=========================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
262 echo "Installing Amplicon analysis pipeline data"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
263 echo "=========================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
264 if [ ! -e "\$1" ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
265 echo "Making directory \$1"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
266 mkdir -p \$1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
267 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
268 cd \$1
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
269 DATA_DIR=\$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
270 echo "Installing reference data under \$DATA_DIR"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
271 $INSTALL_DIR/References.sh
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
272 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
273 echo "Use '-r \$DATA_DIR' when running Amplicon_analysis_pipeline.sh"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
274 echo "to use the reference data from this directory"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
275 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
276 echo "\$(basename \$0): finished"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
277 EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
278 chmod 0755 ${BIN_DIR}/install_reference_data.sh
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
279 cd $cwd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
280 rm -rf $wd/*
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
281 rmdir $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
282 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
283 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
284 # ChimeraSlayer
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
285 install_chimeraslayer()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
286 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
287 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
288 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
289 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
290 wget -q https://sourceforge.net/projects/microbiomeutil/files/__OLD_VERSIONS/microbiomeutil_2010-04-29.tar.gz
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
291 tar zxf microbiomeutil_2010-04-29.tar.gz
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
292 cd microbiomeutil_2010-04-29
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
293 INSTALL_DIR=${TOP_DIR}/share/microbiome_chimeraslayer-2010-04-29
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
294 mkdir -p $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
295 ln -s $INSTALL_DIR ${TOP_DIR}/share/microbiome_chimeraslayer
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
296 /bin/cp -r ChimeraSlayer $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
297 cat >${BIN_DIR}/ChimeraSlayer.pl <<EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
298 #!/usr/bin/env bash
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
299 export PATH=$INSTALL_DIR:\$PATH
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
300 $INSTALL_DIR/ChimeraSlayer/ChimeraSlayer.pl $@
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
301 EOF
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
302 chmod 0755 ${INSTALL_DIR}/ChimeraSlayer/ChimeraSlayer.pl
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
303 chmod 0755 ${BIN_DIR}/ChimeraSlayer.pl
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
304 cd $cwd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
305 rm -rf $wd/*
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
306 rmdir $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
307 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
308 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
309 # uclust required for QIIME/pyNAST
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
310 # License only allows this version to be used with those two packages
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
311 # See: http://drive5.com/uclust/downloads1_2_22q.html
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
312 install_uclust()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
313 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
314 local cwd=$(pwd)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
315 local wd=$(mktemp -d)
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
316 cd $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
317 wget -q http://drive5.com/uclust/uclustq1.2.22_i86linux64
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
318 INSTALL_DIR=${TOP_DIR}/share/uclust-1.2.22
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
319 mkdir -p $INSTALL_DIR
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
320 ln -s $INSTALL_DIR ${TOP_DIR}/share/uclust
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
321 /bin/mv uclustq1.2.22_i86linux64 ${INSTALL_DIR}/uclust
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
322 chmod 0755 ${INSTALL_DIR}/uclust
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
323 ln -s ${INSTALL_DIR}/uclust ${BIN_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
324 cd $cwd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
325 rm -rf $wd/*
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
326 rmdir $wd
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
327 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
328 setup_pipeline_environment()
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
329 {
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
330 echo "+++++++++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
331 echo "Setting up pipeline environment"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
332 echo "+++++++++++++++++++++++++++++++"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
333 # fasta_splitter.pl
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
334 echo -n "Setting up fasta_splitter.pl..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
335 if [ -e ${BIN_DIR}/fasta-splitter.pl ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
336 echo "already exists"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
337 elif [ ! -e ${ENV_DIR}/share/fasta-splitter/fasta-splitter.pl ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
338 echo "failed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
339 fail "fasta-splitter.pl not found"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
340 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
341 ln -s ${ENV_DIR}/share/fasta-splitter/fasta-splitter.pl ${BIN_DIR}/fasta-splitter.pl
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
342 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
343 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
344 # rdp_classifier.jar
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
345 local rdp_classifier_jar=rdp_classifier-${RDP_CLASSIFIER_VERSION}.jar
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
346 echo -n "Setting up rdp_classifier.jar..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
347 if [ -e ${TOP_DIR}/share/rdp_classifier/${rdp_classifier_jar} ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
348 echo "already exists"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
349 elif [ ! -e ${ENV_DIR}/share/rdp_classifier/rdp_classifier.jar ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
350 echo "failed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
351 fail "rdp_classifier.jar not found"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
352 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
353 mkdir -p ${TOP_DIR}/share/rdp_classifier
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
354 ln -s ${ENV_DIR}/share/rdp_classifier/rdp_classifier.jar ${TOP_DIR}/share/rdp_classifier/${rdp_classifier_jar}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
355 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
356 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
357 # qiime_config
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
358 echo -n "Setting up qiime_config..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
359 if [ -e ${TOP_DIR}/qiime/qiime_config ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
360 echo "already exists"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
361 else
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
362 mkdir -p ${TOP_DIR}/qiime
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
363 cat >${TOP_DIR}/qiime/qiime_config <<EOF-qiime-config
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
364 qiime_scripts_dir ${ENV_DIR}/bin
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
365 EOF-qiime-config
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
366 echo "ok"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
367 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
368 }
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
369 #
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
370 # Top level script does the installation
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
371 echo "======================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
372 echo "Amplicon_analysis_pipeline installation"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
373 echo "======================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
374 echo "Installing into ${TOP_DIR}"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
375 if [ -e ${TOP_DIR} ] ; then
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
376 fail "Directory already exists"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
377 fi
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
378 mkdir -p ${TOP_DIR}
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
379 install_conda
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
380 install_conda_packages
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
381 install_non_conda_packages
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
382 setup_pipeline_environment
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
383 echo "===================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
384 echo "Amplicon_analysis_pipeline installed"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
385 echo "===================================="
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
386 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
387 echo "Install reference data using:"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
388 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
389 echo "\$ ${BIN_DIR}/install_reference_data.sh DIR"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
390 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
391 echo "Run pipeline scripts using:"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
392 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
393 echo "\$ ${BIN_DIR}/Amplicon_analysis_pipeline.sh ..."
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
394 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
395 echo "(or add ${BIN_DIR} to your PATH)"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
396 echo ""
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
397 echo "$(basename $0): finished"
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
398 ##
86a12d75ebe4 planemo upload for repository https://github.com/pjbriggs/Amplicon_analysis-galaxy commit 7be61b7ed35ca3deaad68d2eae384c8cd365bcb8
pjbriggs
parents:
diff changeset
399 #