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