Skip to content

Commit

Permalink
New LD code reads directly from VCFs
Browse files Browse the repository at this point in the history
Additional C code for calculating LD by reading directly from
bgzipped VCFs using htslib.
  • Loading branch information
William McLaren committed Aug 1, 2016
1 parent 510b477 commit 78ddb7d
Show file tree
Hide file tree
Showing 5 changed files with 796 additions and 117 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/C_code/calc_genotypes
/C_code/calc_genotypes.o
/C_code/ld_vcf
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ before_install:
- cd htslib
- make
- cd ..
- export HTSLIB_DIR=$PWD/htslib
- cd C_code/
- make
- cd ../
Expand All @@ -35,7 +36,6 @@ install:
- cpanm -v --installdeps --with-recommends --notest --cpanfile ensembl/cpanfile .
- cpanm -v --installdeps --notest .
- cpanm -n Devel::Cover::Report::Coveralls
- export HTSLIB_DIR=$PWD/htslib
- export PERL5LIB=$PWD/bioperl-live-bioperl-release-1-2-3
- cpanm Bio::DB::HTS
- cp travisci/MultiTestDB.conf.travisci modules/t/MultiTestDB.conf
Expand Down
11 changes: 9 additions & 2 deletions C_code/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
CC = gcc

all: calc_genotypes
ifndef HTSLIB_DIR
$(error HTSLIB_DIR is undefined, see README for details)
endif

all: calc_genotypes ld_vcf

install: calc_genotypes
mkdir -p ../bin
cp calc_genotypes ../bin/
cp ld_vcf ../bin/

calc_genotypes: calc_genotypes.o
$(CC) -o calc_genotypes calc_genotypes.c
calc_genotypes.o:
$(CC) -c calc_genotypes.c
ld_vcf:
$(CC) -Wall ld_vcf.c -I $(HTSLIB_DIR)/htslib -o ld_vcf -L$(HTSLIB_DIR) -Wl,-rpath,$(HTSLIB_DIR) -lhts
clean:
\rm -f *.o calc_genotypes
\rm -f *.o calc_genotypes ld_vcf
Loading

0 comments on commit 78ddb7d

Please sign in to comment.