-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Makefile library for bioinformatics programs, with a focus on next-generation sequencing.
Use the make rules at your own risk, and make sure you understand them before running any commands. I take no responsibility if you'd happen to run a make clean in an inappropriate location, removing precious data in the process. You have been warned!
The makefiles contain general recipies for commonly used bioinformatics programs. The use cases reflect the needs I've had and do by no means have a comprehensive coverage. Nevertheless, many commands are so commonly used that the recipes may be of general interest.
Clone the repository https://github.com/percyfal/biomake to an appropriate location:
git clone https://github.com/percyfal/biomake /path/to/biomake
- make version >= 3.82. Older versions fail to correctly generate the dependencies for merge targets (e.g. halo merge rule, see Makefile.halo).
The intended usage is that the user first creates a Makefile for use with a particular dataset/problem. Thereafter, include statements are used to include Makefiles of interest:
#-*- makefile -*-
# Makefile example
# Include bwa-specific Makefile
include /path/to/biomake/Makefile.bwa
# Each Makefile has configurable variables
BWA_THREADS=4
Each Makefile has a set of configurable variables that can be customized via the command line or in the "calling" Makefile. I have tried to name the variables sensibly, providing namespaces following the format PROGRAM_OPTIONS (e.g. PICARD_OPTIONS) or PROGRAM_SUBPROGRAM_OPTIONS (e.g. GATK_SELECTSNPVARIANTS_OPTIONS). Similarly, for increased granularity, specific options may be named by appending the name of that option as in PROGRAM_OPTION_SPECIFIC (e.g. ANGSD_OPTION_ANC).
There are also a set of higher level options that govern general behaviour, such as THREADS (number of threads) and JAVA_MEM (java memory). Where applicable, these options also have program specific options that can be overridden (such as BWA_THREADS and GATK_JAVA_MEM).
By convention, every Makefile should have a recipe named MAKEFILEEXTENSION-settings (e.g. bwa-settings), defined at the end of the file. Running this command should print the current settings and show available options:
make -f /path/to/biomake/Makefile.bwa bwa-settings
Makefile.bwa options
====================
BWA=/path/to/bwa-0.7.5a/bwa
BWA_THREADS=8
BWA_OPTIONS=-t 8
BWA_REF=
Since it is difficult to maintain this list, some options may be missing, and the only way to know which these configuration variables are is to sift through the relevant Makefile.