Skip to content

Commit

Permalink
Merge branch 'master' into codacy-badge
Browse files Browse the repository at this point in the history
  • Loading branch information
SooLee authored Dec 1, 2017
2 parents bf944a2 + d74b4f8 commit 0283843
Show file tree
Hide file tree
Showing 99 changed files with 75,752 additions and 6,928 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ bin/
pypairix.egg-info/
dist/
build/
samples/1_2_merged11.bsorted.pairs.gz*
29 changes: 22 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
language: c python
sudo: true
language: c python
sudo: required
compiler: gcc
script:
- make
- python setup.py install
- python test/test.py
- source test/test_c.sh
python:
- '3.6'
- '2.7'
env:
- VALGRIND_TEST_ON=1
before_install:
- sudo apt-get install -qq valgrind
script:
- make
- |
if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then
sudo python3 setup.py install
python3 test/test.py
fi
- |
if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
sudo python setup.py install
python test/test.py
fi
- source test/test_c.sh # valgrind test is applied when VALGRIND_TEST_ON=1
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include src/*.h
include LICENSE.txt
include VERSION.txt
72 changes: 2 additions & 70 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,70 +1,2 @@
CC= gcc
CFLAGS= -g -Wall -O2 -fPIC #-m64 #-arch ppc
DFLAGS= -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE -DBGZF_CACHE
LOBJS= bgzf.o kstring.o knetfile.o index.o bedidx.o
AOBJS= main.o
PROG= pairix bgzip pairs_merger streamer_1d
INCLUDES=
SUBDIRS= .
LIBPATH=
LIBCURSES=

.SUFFIXES:.c .o

.c.o:
$(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@

all-recur lib-recur clean-recur cleanlocal-recur install-recur:
@target=`echo $@ | sed s/-recur//`; \
wdir=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
cd $$subdir; \
$(MAKE) CC="$(CC)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
INCLUDES="$(INCLUDES)" LIBPATH="$(LIBPATH)" $$target || exit 1; \
cd $$wdir; \
done;

all:$(PROG)
mkdir -p bin; mv pairix bgzip pairs_merger streamer_1d bin; chmod +x bin/*

lib:libpairix.a

libpairix.so.1:$(LOBJS)
$(CC) -shared -Wl,-soname,libpairix.so -o $@ $(LOBJS) -lc -lz

libpairix.1.dylib:$(LOBJS)
libtool -dynamic $(LOBJS) -o $@ -lc -lz

libpairix.a:$(LOBJS)
$(AR) -csru $@ $(LOBJS)

pairix:lib $(AOBJS)
$(CC) $(CFLAGS) -o $@ $(AOBJS) -L. -lpairix -lm $(LIBPATH) -lz

bgzip:bgzip.o bgzf.o knetfile.o
$(CC) $(CFLAGS) -o $@ bgzip.o bgzf.o knetfile.o -lz

pairs_merger:pairs_merger.o lib
$(CC) $(CFLAGS) -o $@ pairs_merger.o -L. -lpairix -lm $(LIBPATH) -lz

streamer_1d:streamer_1d.o lib
$(CC) $(CFLAGS) -o $@ streamer_1d.o -L. -lpairix -lm $(LIBPATH) -lz

TabixReader.class:TabixReader.java
javac -cp .:sam.jar TabixReader.java

kstring.o:kstring.h
knetfile.o:knetfile.h
bgzf.o:bgzf.h knetfile.h
index.o:bgzf.h pairix.h khash.h ksort.h kstring.h
main.o:pairix.h kstring.h bgzf.h
pairs_merger.o:pairix.h kstring.h bgzf.h
streamer_1d.o:pairix.h kstring.h bgzf.h
bgzip.o:bgzf.h
bedidx.o:kseq.h khash.h


cleanlocal:
rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a tabix.aux tabix.log *.class libpairix.*.dylib libpairix.so*

clean:cleanlocal-recur
all:
cd src; make; cd ..
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ make
# In order to use utils, add util path to PATH
# In order to use bam2pairs, add util/bam2pairs to PATH
# eg: PATH=~/git/pairix/bin/:~/git/pairix/util:~/git/pairix/util/bam2pairs:$PATH
```
Alternatively, `conda install pairix` can be used to install both Pairix and Pypairix together. This requires Anaconda or Miniconda.
<br>
Expand All @@ -111,6 +112,8 @@ sudo yum install zlib-devel

<br>

<br>

### Usage for pairix
#### Compression
```
Expand Down
1 change: 1 addition & 0 deletions VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.3.3
42 changes: 0 additions & 42 deletions bam_endian.h

This file was deleted.

156 changes: 0 additions & 156 deletions bedidx.c

This file was deleted.

Loading

0 comments on commit 0283843

Please sign in to comment.