Skip to content

Commit

Permalink
Initial commit of VCFtools project
Browse files Browse the repository at this point in the history
  • Loading branch information
amarcket committed Jun 25, 2015
0 parents commit cf901e1
Show file tree
Hide file tree
Showing 146 changed files with 40,999 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Makefile
@@ -0,0 +1,33 @@
#
# 1) Compiling
# Type make in this directory
#
# 2) Installation
# Edit the BINDIR and MODDIR below as necessary or pass the PREFIX variable
# to the make command. When not set, the programs will be placed in "bin"
# and "lib" subdirectories in this directory.
# PREFIX="/install/to/path/prefix" make install
#
# Add the MODDIR to your PERL5LIB environment variable:
# export PERL5LIB=${PREFIX}/lib:${PERL5LIB}
#
# Add the MANDIR to your MANPATH environment variable:
# export MANPATH=${PREFIX}/bin:$MANPATH
#

export SRCDIR = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
ifndef PREFIX
export PREFIX = ${SRCDIR}
endif
export BINDIR = ${PREFIX}/bin
export MANDIR = ${PREFIX}/bin/man1
export MODDIR = ${PREFIX}/lib/perl5/site_perl

DIRS = cpp perl
install:
@mkdir -p $(BINDIR); mkdir -p $(MODDIR); mkdir -p $(MANDIR); \
cp ${SRCDIR}/cpp/vcftools.1 $(MANDIR); \
for dir in $(DIRS); do cd $$dir && $(MAKE) $(MAKEFLAGS) && cd ..; done

clean:
@for dir in $(DIRS); do cd $$dir && $(MAKE) clean && cd ..; done
37 changes: 37 additions & 0 deletions README.txt
@@ -0,0 +1,37 @@
License:
The program package is released under the GNU Lesser General Public
License version 3.0 (LGPLv3).

Credits:
Adam Auton (cpp executable)
Petr Danecek (perl)
Anthony Marcketta (cpp executable)

Compiling:
To compile and install VCFtools, you should type 'make' in the
vcftools folder. The perl scripts and cpp executable will be
installed in the /vcftools_(version_num)/bin/ folder. It is
recommended that you add this folder to you PATH.

Documentation:
The latest version of the documentation and examples of usage can be
found in the website subdirectory or go online:
http://vcftools.sourceforge.net/docs.html

Getting Help:
The best way to get help regarding VCFtools is to email the mailing
list: vcftools-help@lists.sourceforge.net

Citation:
If you make use of VCFtools in your research, we would appreciate a
citation of the following paper:

The Variant Call Format and VCFtools,
Petr Danecek, Adam Auton, Goncalo Abecasis, Cornelis A. Albers,
Eric Banks, Mark A. DePristo, Robert Handsaker, Gerton Lunter,
Gabor Marth, Stephen T. Sherry, Gilean McVean, Richard Durbin
and 1000 Genomes Project Analysis Group, Bioinformatics, 2011

http://dx.doi.org/10.1093/bioinformatics/btr330


56 changes: 56 additions & 0 deletions cpp/Makefile
@@ -0,0 +1,56 @@
# Make file for vcftools
# Author: Adam Auton
# ($Revision: 230 $)

# Compiler
CC = gcc
CPP = g++
# Output executable
EXECUTABLE = vcftools
# Flag used to turn on compilation of PCA routines
ifndef VCFTOOLS_PCA
VCFTOOLS_PCA = 0
endif
# Compiler flags
CFLAGS = -O2 -m64
#CFLAGS = -Wall -O2 -pg -m64
CPPFLAGS = -O2 -D_FILE_OFFSET_BITS=64
#CPPFLAGS = -O2 -Wall -pg -D_FILE_OFFSET_BITS=64
# Included libraries (zlib)
LIB = -lz
#LIB = -lz -I/opt/local/include/ -L/opt/local/lib/

OBJS = vcftools.o bcf_file.o vcf_file.o variant_file.o \
header.o bcf_entry.o vcf_entry.o entry.o entry_getters.o entry_setters.o \
vcf_entry_setters.o bcf_entry_setters.o entry_filters.o variant_file_filters.o variant_file_output.o parameters.o \
variant_file_format_convert.o variant_file_diff.o output_log.o bgzf.o gamma.o

ifeq ($(VCFTOOLS_PCA), 1)
# Define flag for PCA routine compilation
CPPFLAGS += -DVCFTOOLS_PCA
# Add LAPACK library
LIB += -llapack
# Add PCA source code
OBJS+= dgeev.o
endif

vcftools: $(OBJS)
$(CPP) $(CPPFLAGS) $(OBJS) -o vcftools $(LIB)
ifdef BINDIR
cp $(CURDIR)/$@ $(BINDIR)/$@
endif

bgzf: bgzf.c
$(CC) -c $(CFLAGS) $(FLAGS) bgzf.c $(LIB) -o bgzf.o

# pull in dependency info for *existing* .o files
-include $(OBJS:.o=.d)

%.o: %.cpp
$(CPP) -c $(CPPFLAGS) $*.cpp -o $*.o
$(CPP) -MM $(CPPFLAGS) $*.cpp > $*.d

# remove compilation products
clean:
@rm -f vcftools *.o *.d
@rm -f $(BINDIR)/vcftools
56 changes: 56 additions & 0 deletions cpp/Makefile~
@@ -0,0 +1,56 @@
# Make file for vcftools
# Author: Adam Auton
# ($Revision: 230 $)

# Compiler
CC = gcc
CPP = g++
# Output executable
EXECUTABLE = vcftools
# Flag used to turn on compilation of PCA routines
ifndef VCFTOOLS_PCA
VCFTOOLS_PCA = 0
endif
# Compiler flags
CFLAGS = -O2 -m64
#CFLAGS = -Wall -O2 -pg -m64
CPPFLAGS = -static-libgcc -O2 -D_FILE_OFFSET_BITS=64
#CPPFLAGS = -O2 -Wall -pg -D_FILE_OFFSET_BITS=64
# Included libraries (zlib)
LIB = -lz
#LIB = -lz -I/opt/local/include/ -L/opt/local/lib/

OBJS = vcftools.o bcf_file.o vcf_file.o variant_file.o \
header.o bcf_entry.o vcf_entry.o entry.o entry_getters.o entry_setters.o \
vcf_entry_setters.o bcf_entry_setters.o entry_filters.o variant_file_filters.o variant_file_output.o parameters.o \
variant_file_format_convert.o variant_file_diff.o output_log.o bgzf.o gamma.o

ifeq ($(VCFTOOLS_PCA), 1)
# Define flag for PCA routine compilation
CPPFLAGS += -DVCFTOOLS_PCA
# Add LAPACK library
LIB += -llapack
# Add PCA source code
OBJS+= dgeev.o
endif

vcftools: $(OBJS)
$(CPP) $(CPPFLAGS) $(OBJS) -o vcftools $(LIB)
ifdef BINDIR
cp $(CURDIR)/$@ $(BINDIR)/$@
endif

bgzf: bgzf.c
$(CC) -c $(CFLAGS) $(FLAGS) bgzf.c $(LIB) -o bgzf.o

# pull in dependency info for *existing* .o files
-include $(OBJS:.o=.d)

%.o: %.cpp
$(CPP) -c $(CPPFLAGS) $*.cpp -o $*.o
$(CPP) -MM $(CPPFLAGS) $*.cpp > $*.d

# remove compilation products
clean:
@rm -f vcftools *.o *.d
@rm -f $(BINDIR)/vcftools

0 comments on commit cf901e1

Please sign in to comment.