[med-svn] [rsem] 07/07: checkin latest changes; still FTBFS

Michael Crusoe misterc-guest at moszumanska.debian.org
Sat Mar 5 12:36:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

misterc-guest pushed a commit to branch 1.2.28
in repository rsem.

commit 986f11a394d235ddb798352b50fdfa412fd4bdd8
Author: Michael R. Crusoe <crusoe at ucdavis.edu>
Date:   Sat Mar 5 04:34:29 2016 -0800

    checkin latest changes; still FTBFS
---
 debian/TODO                     |   2 +
 debian/control                  |   1 -
 debian/patches/drop-bam.h       | 243 ++++++++++++++++++++++++++++++++++++++++
 debian/patches/fix-sam-includes | 140 +++--------------------
 debian/patches/series           |   2 +
 debian/rules                    |   5 +-
 6 files changed, 264 insertions(+), 129 deletions(-)

diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..c23a144
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,2 @@
+either ship the samtools source or wait until upstream properly builds against
+libhts-dev
diff --git a/debian/control b/debian/control
index 5f5f788..73af6de 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,6 @@ Priority: optional
 Build-Depends: debhelper (>= 9),
                zlib1g-dev,
                libncurses5-dev,
-               libbam-dev,
                libboost-dev,
                perl,
                bowtie | bowtie2,
diff --git a/debian/patches/drop-bam.h b/debian/patches/drop-bam.h
new file mode 100644
index 0000000..7c0c16e
--- /dev/null
+++ b/debian/patches/drop-bam.h
@@ -0,0 +1,243 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ rsem (1.2.28+dfsg-1) UNRELEASED; urgency=medium
+ .
+   * New upstream release
+Author: Michael R. Crusoe <crusoe at ucdavis.edu>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- rsem.orig/BamConverter.h
++++ rsem/BamConverter.h
+@@ -8,7 +8,6 @@
+ #include<map>
+ 
+ #include <stdint.h>
+-#include "bam.h"
+ #include "sam.h"
+ #include "sam_utils.h"
+ 
+--- rsem.orig/BamWriter.h
++++ rsem/BamWriter.h
+@@ -10,7 +10,7 @@
+ #include<iostream>
+ 
+ #include <stdint.h>
+-#include "bam.h"
++#include "hts.h"
+ #include "sam.h"
+ #include "sam_utils.h"
+ 
+@@ -32,7 +32,8 @@
+ 	void work(HitWrapper<SingleHit> wrapper);
+ 	void work(HitWrapper<PairedEndHit> wrapper);
+ private:
+-	samfile_t *in, *out;
++	inline int samwrite(htsFile *fp, const bam1_t *b) { return sam_write1(fp, fp->header, b); }
++	htsFile *in, *out;
+ 	Transcripts& transcripts;
+ 	
+ 	void set_alignment_weight(bam1_t *b, double prb) {
+@@ -49,7 +50,7 @@
+ 
+ //aux can be NULL
+ BamWriter::BamWriter(const char* inpF, const char* aux, const char* outF, Transcripts& transcripts, int nThreads) : transcripts(transcripts) {
+-  in = samopen(inpF, "r", aux);
++  in = hts_open(inpF, "r");
+   assert(in != 0);
+ 
+   //build mappings from external sid to internal sid
+@@ -72,8 +73,8 @@
+ }
+ 
+ BamWriter::~BamWriter() {
+-	samclose(in);
+-	samclose(out);
++	hts_close(in);
++	hts_close(out);
+ }
+ 
+ void BamWriter::work(HitWrapper<SingleHit> wrapper) {
+--- rsem.orig/Makefile
++++ rsem/Makefile
+@@ -6,7 +6,7 @@
+ SAMTOOLS = samtools-1.3
+ HTSLIB = htslib-1.3
+ SAMFLAGS = -I$(SAMTOOLS) -I$(SAMTOOLS)/$(HTSLIB)
+-SAMLIBS = $(SAMTOOLS)/libbam.a $(SAMTOOLS)/$(HTSLIB)/libhts.a
++SAMLIBS = $(SAMTOOLS)/$(HTSLIB)/libhts.a
+ BOOST = boost # overriderable by distributions
+ PROGRAMS = rsem-extract-reference-transcripts rsem-synthesis-reference-transcripts rsem-preref rsem-parse-alignments rsem-build-read-index rsem-run-em rsem-tbam2gbam rsem-run-gibbs rsem-calculate-credibility-intervals rsem-simulate-reads rsem-bam2wig rsem-get-unique rsem-bam2readdepth rsem-sam-validator rsem-scan-for-paired-end-reads
+ 
+@@ -15,8 +15,6 @@
+ 
+ all : $(PROGRAMS)
+ 
+-$(SAMTOOLS)/libbam.a : $(SAMTOOLS)/$(HTSLIB)/libhts.a
+-
+ $(SAMTOOLS)/$(HTSLIB)/libhts.a : 
+ 	cd $(SAMTOOLS) ; ${MAKE} all
+ 
+@@ -57,15 +55,15 @@
+ 
+ HitContainer.h : GroupInfo.h
+ 
+-sam_utils.h : $(SAMTOOLS)/bam.h Transcript.h Transcripts.h
++sam_utils.h : Transcript.h Transcripts.h
+ 
+-SamParser.h : $(SAMTOOLS)/sam.h $(SAMTOOLS)/bam.h sam_utils.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h
++SamParser.h : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Transcripts.h
+ 
+ 
+ rsem-parse-alignments : parseIt.o $(SAMLIBS)
+ 	$(CC) $(LDFLAGS) -o rsem-parse-alignments parseIt.o $(SAMLIBS) -lz -lpthread
+ 
+-parseIt.o : $(SAMTOOLS)/sam.h $(SAMTOOLS)/bam.h sam_utils.h utils.h my_assert.h GroupInfo.h Transcripts.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h parseIt.cpp
++parseIt.o : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h GroupInfo.h Transcripts.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h HitContainer.h SamParser.h parseIt.cpp
+ 	$(CC) $(CPPFLAGS) $(CXXFLAGS) -Wall -O2 -c -I. $(SAMFLAGS) parseIt.cpp
+ 
+ 
+@@ -88,7 +86,7 @@
+ 
+ 
+ 
+-BamWriter.h : $(SAMTOOLS)/sam.h $(SAMTOOLS)/bam.h sam_utils.h utils.h my_assert.h SingleHit.h PairedEndHit.h HitWrapper.h Transcript.h Transcripts.h
++BamWriter.h : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h SingleHit.h PairedEndHit.h HitWrapper.h Transcript.h Transcripts.h
+ 
+ sampling.h : $(BOOST)/random.hpp
+ 
+@@ -97,17 +95,15 @@
+ rsem-run-em : EM.o $(SAMLIBS)
+ 	$(CC) $(LDFLAGS) -o rsem-run-em EM.o $(SAMLIBS) -lz -lpthread
+ 
+-EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h simul. [...]
++EM.o : utils.h my_assert.h Read.h SingleRead.h SingleReadQ.h PairedEndRead.h PairedEndReadQ.h SingleHit.h PairedEndHit.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h Refs.h GroupInfo.h HitContainer.h ReadIndex.h ReadReader.h Orientation.h LenDist.h RSPD.h QualDist.h QProfile.h NoiseQProfile.h ModelParams.h RefSeq.h RefSeqPolicy.h PolyARules.h Profile.h NoiseProfile.h Transcript.h Transcripts.h HitWrapper.h BamWriter.h $(SAMTOOLS)/sam.h simul.h sam_utils.h samp [...]
+ 	$(CC) $(CPPFLAGS) $(COFLAGS) $(SAMFLAGS) $(CXXFLAGS) EM.cpp
+ 
+-bc_aux.h : $(SAMTOOLS)/bam.h
+-
+-BamConverter.h : $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h bc_aux.h Transcript.h Transcripts.h
++BamConverter.h : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h bc_aux.h Transcript.h Transcripts.h
+ 
+-rsem-tbam2gbam : utils.h Transcripts.h Transcript.h BamConverter.h $(SAMTOOLS)/sam.h $(SAMTOOLS)/bam.h sam_utils.h my_assert.h bc_aux.h tbam2gbam.cpp $(SAMLIBS)
++rsem-tbam2gbam : utils.h Transcripts.h Transcript.h BamConverter.h $(SAMTOOLS)/sam.h sam_utils.h my_assert.h bc_aux.h tbam2gbam.cpp $(SAMLIBS)
+ 	$(CC) $(LFLAGS) $(SAMFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) tbam2gbam.cpp $(SAMLIBS) -lz -lpthread -o $@
+ 
+-wiggle.o: $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h wiggle.h wiggle.cpp
++wiggle.o: $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h wiggle.h wiggle.cpp
+ 	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) $(SAMFLAGS) wiggle.cpp
+ 
+ rsem-bam2wig : utils.h my_assert.h wiggle.h wiggle.o $(SAMLIBS) bam2wig.cpp
+@@ -139,13 +135,13 @@
+ calcCI.o : utils.h my_assert.h $(BOOST)/random.hpp sampling.h Model.h SingleModel.h SingleQModel.h PairedEndModel.h PairedEndQModel.h RefSeq.h RefSeqPolicy.h PolyARules.h Refs.h GroupInfo.h WriteResults.h Buffer.h calcCI.cpp
+ 	$(CC) $(CPPFLAGS) $(COFLAGS) $(CXXFLAGS) calcCI.cpp
+ 
+-rsem-get-unique : $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h sam_utils.h utils.h getUnique.cpp $(SAMLIBS)
++rsem-get-unique : $(SAMTOOLS)/sam.h sam_utils.h utils.h getUnique.cpp $(SAMLIBS)
+ 	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) $(SAMFLAGS) getUnique.cpp $(SAMLIBS) -lz -lpthread -o $@
+ 
+-rsem-sam-validator : $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h samValidator.cpp $(SAMLIBS)
++rsem-sam-validator : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h samValidator.cpp $(SAMLIBS)
+ 	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) $(SAMFLAGS) samValidator.cpp $(SAMLIBS) -lz -lpthread -o $@
+ 
+-rsem-scan-for-paired-end-reads : $(SAMTOOLS)/bam.h $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h scanForPairedEndReads.cpp $(SAMLIBS)
++rsem-scan-for-paired-end-reads : $(SAMTOOLS)/sam.h sam_utils.h utils.h my_assert.h scanForPairedEndReads.cpp $(SAMLIBS)
+ 	$(CC) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(LFLAGS) $(SAMFLAGS) scanForPairedEndReads.cpp $(SAMLIBS) -lz -lpthread -o $@
+ 
+ ebseq :
+--- rsem.orig/SamParser.h
++++ rsem/SamParser.h
+@@ -9,7 +9,7 @@
+ #include<string>
+ 
+ #include <stdint.h>
+-#include "bam.h"
++#include "htslib/hts.h"
+ #include "sam.h"
+ #include "sam_utils.h"
+ 
+@@ -49,8 +49,10 @@
+ 	}
+ 
+ private:
+-	samfile_t *sam_in;
+-	bam_header_t *header;
++	inline int samread(htsFile *fp, bam1_t *b) { return sam_read1(fp, header, b); }
++
++	htsFile *sam_in;
++	bam_hdr_t *header;
+ 	bam1_t *b, *b2;
+ 
+ 	Transcripts& transcripts;
+@@ -87,10 +89,10 @@
+ SamParser::SamParser(const char* inpF, const char* aux, Transcripts& transcripts, const char* imdName)
+ 	: transcripts(transcripts)
+ {
+-	sam_in = samopen(inpF, "r", aux);
++	sam_in = hts_open(inpF, "r");
+ 
+ 	general_assert(sam_in != 0, "Cannot open " + cstrtos(inpF) + "! It may not exist.");
+-	header = sam_in->header;
++	header = sam_hdr_read(sam_in);
+ 	general_assert(header != 0, "Fail to parse sam header!");
+ 
+ 	transcripts.buildMappings(header->n_targets, header->target_name, imdName);
+@@ -100,7 +102,7 @@
+ }
+ 
+ SamParser::~SamParser() {
+-	samclose(sam_in);
++	hts_close(sam_in);
+ 	bam_destroy1(b);
+ 	bam_destroy1(b2);
+ }
+--- rsem.orig/sam_utils.h
++++ rsem/sam_utils.h
+@@ -7,8 +7,6 @@
+ #include<string>
+ #include<stdint.h>
+ 
+-#include "bam.h"
+-
+ #include "Transcript.h"
+ #include "Transcripts.h"
+ 
+@@ -17,6 +15,13 @@
+ 
+ // These functions are adopted/modified from samtools source codes because the original codes are not visible from sam.h/bam.h
+ 
++inline int bam_aux_type2size(int x) {
++  if (x == 'C' || x == 'c' || x == 'A') return 1;
++  else if (x == 'S' || x == 's') return 2;
++  else if (x == 'I' || x == 'i' || x == 'f' || x == 'F') return 4;
++  else return 0;
++}
++
+ // dwt: duplicate without text
+ bam_hdr_t *bam_header_dwt(const bam_hdr_t *ori_h) {
+   bam_hdr_t *h;
+@@ -48,7 +53,7 @@
+ }
+ 
+ inline void expand_data_size(bam1_t *b) {
+-  if (b->m_data < b->data_len) {
++  if (b->m_data < b->l_data) {
+     b->m_data = b->l_data;
+     kroundup32(b->m_data);
+     b->data = (uint8_t*)realloc(b->data, b->m_data);
diff --git a/debian/patches/fix-sam-includes b/debian/patches/fix-sam-includes
index 97ddc31..b4dd0be 100644
--- a/debian/patches/fix-sam-includes
+++ b/debian/patches/fix-sam-includes
@@ -1,126 +1,16 @@
-Description: correct the samtools includes to match standard paths
-Author: Michael R. Crusoe <crusoe at ucdavis.edu>
---- rsem.orig/BamConverter.h
-+++ rsem/BamConverter.h
-@@ -8,8 +8,8 @@
- #include<map>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- #include "sam_rsem_aux.h"
- #include "sam_rsem_cvt.h"
- 
---- rsem.orig/BamWriter.h
-+++ rsem/BamWriter.h
-@@ -10,8 +10,8 @@
- #include<iostream>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- #include "sam_rsem_aux.h"
- #include "sam_rsem_cvt.h"
- 
---- rsem.orig/SamParser.h
-+++ rsem/SamParser.h
-@@ -8,8 +8,8 @@
- #include<cassert>
- #include<string>
- 
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- 
- #include "utils.h"
- #include "my_assert.h"
---- rsem.orig/bc_aux.h
-+++ rsem/bc_aux.h
-@@ -4,7 +4,7 @@
- #include<map>
- 
- #include <stdint.h>
--#include "sam/bam.h"
-+#include "samtools/bam.h"
- 
- struct SingleEndT {
- 	bam1_t *b;
---- rsem.orig/sam_rsem_aux.h
-+++ rsem/sam_rsem_aux.h
-@@ -5,7 +5,7 @@
- #include<cstring>
- #include<stdint.h>
- 
--#include "sam/bam.h"
-+#include "samtools/bam.h"
- 
+--- rsem.orig/sam_utils.h
++++ rsem/sam_utils.h
+@@ -17,13 +17,6 @@
+ 
+ // These functions are adopted/modified from samtools source codes because the original codes are not visible from sam.h/bam.h
+ 
+-inline int bam_aux_type2size(int x) {
+-  if (x == 'C' || x == 'c' || x == 'A') return 1;
+-  else if (x == 'S' || x == 's') return 2;
+-  else if (x == 'I' || x == 'i' || x == 'f' || x == 'F') return 4;
+-  else return 0;
+-}
+-
  // dwt: duplicate without text
- bam_header_t *bam_header_dwt(const bam_header_t *ori_h)
---- rsem.orig/sam_rsem_cvt.h
-+++ rsem/sam_rsem_cvt.h
-@@ -4,7 +4,7 @@
- #include<vector>
- 
- #include "stdint.h"
--#include "sam/bam.h"
-+#include "samtools/bam.h"
- 
- #include "Transcript.h"
- #include "Transcripts.h"
---- rsem.orig/getUnique.cpp
-+++ rsem/getUnique.cpp
-@@ -6,8 +6,8 @@
- #include<vector>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- 
- #include "utils.h"
- 
---- rsem.orig/samValidator.cpp
-+++ rsem/samValidator.cpp
-@@ -6,8 +6,8 @@
- #include<set>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- 
- #include "utils.h"
- #include "my_assert.h"
---- rsem.orig/scanForPairedEndReads.cpp
-+++ rsem/scanForPairedEndReads.cpp
-@@ -7,8 +7,8 @@
- #include<algorithm>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- 
- #include "utils.h"
- #include "my_assert.h"
---- rsem.orig/wiggle.cpp
-+++ rsem/wiggle.cpp
-@@ -4,8 +4,8 @@
- #include <iostream>
- 
- #include <stdint.h>
--#include "sam/bam.h"
--#include "sam/sam.h"
-+#include "samtools/bam.h"
-+#include "samtools/sam.h"
- 
- #include "utils.h"
- #include "wiggle.h"
+ bam_hdr_t *bam_header_dwt(const bam_hdr_t *ori_h) {
+   bam_hdr_t *h;
diff --git a/debian/patches/series b/debian/patches/series
index 71a96e4..e10c88e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ spelling
 fix-boost
 use-flags
 add-descriptions
+fix-sam-includes
+drop-bam.h
diff --git a/debian/rules b/debian/rules
index 5b22a35..bcdc5ff 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,8 +6,6 @@ DEB_TARGET_MULTIARCH=$(shell dpkg-architecture -qDEB_TARGET_MULTIARCH)
 DEBVERS        := $(shell dpkg-parsechangelog | awk '/^Version:/ {print $$2}')
 VERSION        := $(shell echo '$(DEBVERS)' | sed -e 's/^[0-9]*://' -e 's/-.*//')
 
-export BOOST=/usr/include/boost
-
 %:
 	dh $@ --parallel
 
@@ -20,7 +18,8 @@ override_dh_auto_build:
 		--name 'Convert GFF3 files to GTF files.' > \
 		debian/rsem-gff3-to-gtf.1
 	dh_auto_build -- SAMLIBS="/usr/lib/libbam.a /usr/lib/${DEB_TARGET_MULTIARCH}/libhts.a" \
-		SAMTOOLS="/usr/include/samtools" SAMFLAGS="-I/usr/include"
+		SAMTOOLS="/usr/include/htslib" SAMFLAGS="-I/usr/include/htslib/" \
+		BOOST=/usr/include/boost
 
 override_dh_auto_install:
 	find . -maxdepth 1 -type f -perm /u+x | xargs -n 1 -I{} dh_install {} /usr/bin/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/rsem.git



More information about the debian-med-commit mailing list