#!/bin/sh # configure.sh # ------------ # used to configure FASTCLIP pipeline # 1. Checking for dependencies if $(type bowtie2 >/dev/null 2>&1); then echo "bowtie2 installed" else echo >&2 "bowtie2 must be installed. Aborting."; exit 1 fi if $(type STAR >/dev/null 2>&1); then echo "STAR installed" else echo >&2 "STAR must be installed. Aborting."; exit 1 fi if $(type fastx_quality_stats >/dev/null 2>&1); then echo "FASTX-toolkit installed" else echo >&2 "fastx_toolkit must be installed. Aborting."; exit 1 fi if $(type iCLIPro >/dev/null 2>&1); then echo "iCLIPro installed" else echo >&2 "iCLIPro must be installed. Aborting."; exit 1 fi if $(type bedtools >/dev/null 2>&1); then echo "bedtools installed" else echo >&2 "bedtools must be installed. Aborting."; exit 1 fi if $(type python >/dev/null 2>&1); then echo "python installed" else echo >&2 "python must be installed. Aborting."; exit 1 fi if $(python -c "import matplotlib" &> /dev/null); then echo "matplotlib installed" else echo >&2 "matplotlib must be installed in python. Aborting."; exit 1 fi if $(python -c "import pandas" &> /dev/null); then echo "pandas installed" else echo >&2 "pandas must be installed in python. Aborting."; exit 1 fi # 2. Downloading genome files echo "Downloading and unzipping hg19 and mm9 genome files" wget https://s3.amazonaws.com/changlabguest/FAST-iCLIP/docs_new.tar.gz mkdir docs tar xvzf docs_new.tar.gz -C docs && rm -f docs_new.tar.gz # 3. Downloading example files wget https://s3.amazonaws.com/changlabguest/FAST-iCLIP/rawdata.tar.gz mkdir rawdata tar xvzf rawdata.tar.gz -C rawdata && rm -f rawdata.tar.gz mkdir results