Skip to content

Commit

Permalink
Merge branch 'release/v3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Oct 13, 2016
2 parents f064a87 + bd4700a commit 1c91c63
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 762 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ language: perl
perl:
- "5.22"

before_script:
- git clone --depth 1 --single-branch --branch develop https://github.com/cancerit/cgpBigWig.git
- cd cgpBigWig
- ./setup.sh $HOME/wtsi-opt
- cd ../

script:
- ./setup.sh ~/wtsi-opt
- ~/wtsi-opt/bin/samtools view # dump usage to show intact
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
### 3.2.0
* Move from legacy kent bigwig manipulation code and to [`cgpBigWig`](https://github.com/cancerit/cgpBigWig)
* Faster and handles the huge number of contigs in many new reference builds.
* Resulting changes to underlying installed tools is `bwcat` now `bwjoin` to be more descriptive of actual function.

### 3.1.1
Handle recent changes to BioPerl structure

### 3.1.0
* Use BWA default for `-T` previously hard coded to `-T 0`.
* Can be passed through `bwa_mem.pl` other ags to bwa via the `-b` option.
* Fix `bam2bedgraph` compilation since changes to underlying libraries
* `bamToBw.pl` - expose read flag filters
* Drop dependancy on `Bio::DB::HTS INSTALL.pl` as can't fix to known good version.
* Added travis CI
* Add support for output directly to CRAM
* `bwa` version upgraded to [0.7.15](https://github.com/lh3/bwa/releases/tag/v0.7.15)

### 3.0.0
* Threading module now converts currently running step to bash script for following reasons:
* Changes logging to use file redirects instead of Capture::Tiny - prevent log bleed into wrong files
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ bin/gnos_pull.pl
bin/monitor.pl
bin/xam_coverage_bins.pl
bin/xml_to_bas.pl
c/bam2bedgraph.c
c/bam_access.c
c/bam_access.h
c/bam_stats.c
c/bam_stats_calcs.c
c/bam_stats_calcs.h
c/bam_stats_output.c
c/bam_stats_output.h
c/bwcat.c
c/c_tests/01_bam_stats_output_tests.c
c/c_tests/02_bam_access_tests.c
c/c_tests/03_bam_stats_calcs_tests.c
Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,22 @@ Please see the [wiki](https://github.com/ICGC-TCGA-PanCancer/PCAP-core/wiki) for
---

###Dependencies/Install
Some of the code included in this package has dependencies on external packages:

* [biobambam](https://github.com/gt1/biobambam)
* [bwa](https://github.com/lh3/bwa)
* [samtools](https://github.com/samtools/samtools)
* [kentUtils](https://github.com/ENCODE-DCC/kentUtils)
Please install the following before running `setup.sh`:

* [cgpBigWig](https://github.com/cancerit/cgpBigWig/releases)

Dependancies installed by `setup.sh`:

* [biobambam](https://github.com/gt1/biobambam)
* [bwa](https://github.com/lh3/bwa)
* [samtools](https://github.com/samtools/samtools)

And various perl modules.

Please see the respective licence for each before use.

Please use `setup.sh` to install the dependencies. Please be aware that this expects basic C
compilation libraries and tools to be available, most are listed in `INSTALL`.
Please be aware that this expects basic C compilation libraries and tools to be available, most are listed in `INSTALL`.

---

Expand Down
4 changes: 3 additions & 1 deletion bin/bamToBw.pl
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@
{
my $options = setup();

$options->{'ctg_lengths'} = PCAP::ref_lengths($options->{'reference'}.'.fai');

my $threads = PCAP::Threaded->new($options->{'threads'});
&PCAP::Threaded::disable_out_err if(exists $options->{'index'});
&PCAP::Threaded::disable_out_err unless(exists $options->{'index'});

# register processes
$threads->add_function('bamToBw', \&PCAP::BigWig::bamToBw);
Expand Down
29 changes: 4 additions & 25 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@ CFLAGS = -Wall

HTSLOC?=$(HTSLIB)

#if test -z "$$LIBBIGWIG"
#LIBBIGWIGLOC?=$(LIBBIGWIG)
#echo "*******DEFINED"
#endif

HTSTMP?=./htslib_tmp
prefix=?/usr/local/

#Define locations of header files
OPTINC?= -I$(HTSLOC)/
INCLUDES= -I./ $(OPTINC) -rdynamic

ifdef LIBBIGWIG
CAT_INCLUDES= -I$(LIBBIGWIG)
CAT_LFLAGS= -L$(LIBBIGWIG)
endif

CAT_INCLUDES+= -I$(prefix)/include
CAT_LFLAGS+= -L$(prefix)/lib

Expand Down Expand Up @@ -64,9 +54,7 @@ MD := mkdir

#Build target executable
BAM_STATS_TARGET=../bin/bam_stats
CAT_TARGET=../bin/bwcat
SQ_TARGET=../bin/reheadSQ
BAM2BG_TARGET=../bin/bam2bedgraph

#
# The following part of the makefile is generic; it can be used to
Expand All @@ -78,18 +66,12 @@ BAM2BG_TARGET=../bin/bam2bedgraph

.NOTPARALLEL: test

all: clean pre make_htslib_tmp $(BAM_STATS_TARGET) $(BAM2BG_TARGET) test remove_htslib_tmp $(CAT_TARGET) $(SQ_TARGET)
@echo bam_stats, reheadSQ and bwcat compiled.
all: clean pre make_htslib_tmp $(BAM_STATS_TARGET) $(BAM2BG_TARGET) $(BAM2BW_TARGET) test remove_htslib_tmp $(CAT_TARGET) $(SQ_TARGET)
@echo bam_stats and reheadSQ compiled.

$(BAM_STATS_TARGET): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(BAM_STATS_TARGET) $(OBJS) $(LFLAGS) $(LIBS) ./bam_stats.c

$(CAT_TARGET):
$(CC) $(CAT_INCLUDES) $(CFLAGS) ./bwcat.c $(CAT_LFLAGS) -lBigWig -lz -lcurl -lm -lgnutls -ltasn1 -lhogweed -lnettle -lgmp -lp11-kit -o $(CAT_TARGET)

$(BAM2BG_TARGET): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(BAM2BG_TARGET) $(OBJS) $(LFLAGS) $(LIBS) ./bam2bedgraph.c

$(SQ_TARGET):
$(CC) $(CFLAGS) ./reheadSQ.c -o $(SQ_TARGET)

Expand All @@ -104,9 +86,6 @@ test: $(TESTS)
coverage: CFLAGS += --coverage
coverage: test

make_bigwigcat: $(CAT_TARGET)
@echo $(CAT_TARGET) done

make_htslib_tmp:
$(MD) $(HTSTMP)
#Do some magic to ensure we compile BAM_STATS with the static libhts.a rather than libhts.so
Expand All @@ -118,7 +97,7 @@ remove_htslib_tmp:

copyscript:
cp ./scripts/* ./bin/
chmod a+x $(BAM_STATS_TARGET) $(CAT_TARGET) $(SQ_TARGET)
chmod a+x $(BAM_STATS_TARGET) $(CAT_TARGET) $(SQ_TARGET) $(BAM2BW_TARGET) $(BAM2BG_TARGET)

valgrind:
VALGRIND="valgrind --log-file=/tmp/valgrind-%p.log" $(MAKE)
Expand All @@ -133,7 +112,7 @@ valgrind:

clean:
@echo clean
$(RM) ./*.o *~ $(BAM_STATS_TARGET) $(SQ_TARGET) $(CAT_TARGET) ./tests/tests_log $(TESTS) ./*.gcda ./*.gcov ./*.gcno *.gcda *.gcov *.gcno ./tests/*.gcda ./tests/*.gcov ./tests/*.gcno
$(RM) ./*.o *~ $(BAM_STATS_TARGET) $(SQ_TARGET) ./tests/tests_log $(TESTS) ./*.gcda ./*.gcov ./*.gcno *.gcda *.gcov *.gcno ./tests/*.gcda ./tests/*.gcov ./tests/*.gcno
-rm -rf $(HTSTMP)

depend: $(SRCS)
Expand Down
Loading

0 comments on commit 1c91c63

Please sign in to comment.