Skip to content

local_installed_programs.sh

Vladimir Gritsenko edited this page Jul 28, 2016 · 5 revisions

This is a configuration file used by many scripts in Ymap to run 3rd party programs. It is generally a good idea to not hardcode any 3rd party executables into scripts, because they may not exist in Apache's environment, or because they may be of a wrong version (in a multi-user environment).

This file must be named local_installed_programs.sh and should be put in Ymap's root. It should be readable and executable by Apache's user. It should not be version-controlled (although its template may be), to prevent pull headaches in the different environments we're running.

If you want to use system-wide executables but don't know where they are, on *nix you can run 'which executable' and get the full path to the executable, which you can then use in this file.

Below is a sample for the file (all variables are mandatory - make sure each fits matches your environment!):

#!/bin/bash

userProgramsLocation="/Users/bermanlab/dev/ymap-software/";

bowtie2Directory=$userProgramsLocation"bowtie2-2.1.0/";
picardDirectory=$userProgramsLocation"picard-1.105/dist/";
fastqcDirectory=$userProgramsLocation"FastQC.app/Contents/Resources/Java/";
gatkDirectory=$userProgramsLocation"gatk-protected/dist/";
seqtkDirectory=$userProgramsLocation"seqtk/";
java7Directory="/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/bin/";

samtools_exec=$userProgramsLocation"samtools-1.3.1/samtools";
matlab_exec="/Applications/MATLAB_R2014b.app/bin/matlab";

# Can be used to run PyPy (or any other Python implementation) instead of
# CPython for sripts that support it (for example, scripts may require numpy,
# which PyPy doesn't necessarily have):
python_exec="/usr/local/bin/pypy";

# The Python executable that also has numpy 1.8.0 installed:
python_numpy_exec="/usr/bin/python";

Explanations for the variables:

  • userProgramsLocation - for convenience, it's best to install the local software into one directory.
  • [foo]Directory - the directory in which the relevant binaries exist.
  • [foo]_exec - paths to the executables themselves.

There is currently a convention on ending directory variables with a slash. This is an historical convention, and of course depends on the usage of these variables by Ymap scripts.

Clone this wiki locally