Created
March 9, 2015 19:42
-
-
Save daler/ea67c4eb55f82a95f847 to your computer and use it in GitHub Desktop.
Single-file installation of a basic set of bioinformatics tools, using cloudbiolinux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -o pipefail | |
# All-in-one installation script to download, configure, and run cloudbiolinux | |
# to install bioinformatics tools locally without needing sudo. The executables | |
# will go into $INSTALL_DIR: | |
INSTALL_DIR=~/tmp/cbl_demo | |
# See https://github.com/chapmanb/cloudbiolinux for more info on customizing | |
# installations. | |
pip install fabric | |
git clone https://github.com/chapmanb/cloudbiolinux | |
cd cloudbiolinux | |
HERE=$(pwd) | |
LCDB=${HERE}/contrib/flavor/lcdb | |
mkdir -p $LCDB && cd $LCDB | |
# | |
# "here documents" are used to write config files to a new cloudbiolinux flavor | |
# called "lcdb". | |
# | |
# This one creates the config file used by cloudbiolinux to tell it where to | |
# install the binaries. | |
cat > fabricrc.txt << EOF | |
# Global installation directory for packages and standard programs | |
system_install = ${INSTALL_DIR} | |
# Local install directory for versioned software that will not | |
# be included in the path by default | |
local_install = ~${INSTALL_DIR}/share | |
# Global setting for using sudo; allows installation of custom packages | |
# by non-privileged users. | |
# *Note*: ``system_install`` needs to point to a user-writeable directory if | |
# ``use_sudo`` is set to ``False`` | |
use_sudo = False | |
keep_isolated = True | |
# -- Details about reference data installation | |
# Path where biological reference data files should be retrieved to | |
data_files = ${INSTALL_DIR}/biodata | |
EOF | |
# See https://github.com/chapmanb/cloudbiolinux/tree/master/config for what | |
# packages are available. Here we're overriding the files to have a much | |
# smaller download footprint. | |
cat > custom.yaml << EOF | |
--- | |
bio_nextgen: | |
analysis: | |
- picard | |
- tophat | |
- featurecounts | |
needs_64bit: | |
- ucsc_tools | |
EOF | |
cat > main.yaml << EOF | |
--- | |
packages: | |
- minimal | |
- libraries | |
- python | |
- java | |
- ruby | |
- bio_nextgen | |
EOF | |
cat > packages-homebrew.yaml << EOF | |
--- | |
bio_nextgen: | |
alignment: | |
- bwa | |
- bowtie2 | |
- novoalign | |
- rna-star | |
utilities: | |
- bamtools | |
- bedtools | |
- fastqc | |
analysis: | |
- samtools | |
- cufflinks-binary | |
- htslib | |
- bcftools | |
EOF | |
# Change back to the top dir of the repository and run the fabfile, telling it | |
# to use the newly-configured "lcdb" flavor. | |
cd ${HERE} | |
fab -f fabfile.py -H localhost install_biolinux:flavor=lcdb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment