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