[med-svn] [SCM] samtools branch, master, updated. debian/0.1.18-1-11-gcd5dbce

Dominique Belhachemi domibel at debian.org
Fri Dec 21 17:45:26 UTC 2012


The following commit has been merged in the master branch:
commit cd5dbce0d6d88e6e59912be5b751255cb2300539
Author: Dominique Belhachemi <domibel at debian.org>
Date:   Fri Dec 21 12:43:19 2012 -0500

    added 3 bug fixes
    
      fix_coverage_cap.patch
      fix_float_tag.patch
      fix_segfault_with_small_ref.patch

diff --git a/debian/changelog b/debian/changelog
index 63f92e2..abb1968 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,36 @@
-samtools (0.1.18-2) UNRELEASED; urgency=low
+samtools (0.1.18-4) unstable; urgency=low
 
-  * Work in progress, see git commits.
+    [Charles Plessy]
+    debian/copyright: Normalised with config-model
+    added bash completion
+    Build-depend on Debhelper 9
+    Pass build flaggs set by dpkg-buildflags via Debhelper
+    Moved DOI and PubMed to the Reference namespace
+    Do not compress the example binary alignment file
+    Mention ‘SAMtools’ in libbam-dev's description
 
- -- Charles Plessy <plessy at debian.org>  Thu, 15 Sep 2011 13:26:37 +0900
+    [Andreas Tille]
+    debian/upstream: replaced BibTeX entry
+
+    [Dominique Belhachemi]
+    added patch to fix float tag bug (upstream bug 71)
+
+ -- Dominique Belhachemi <domibel at debian.org>  Fri, 21 Dec 2012 12:09:18 -0500
+
+samtools (0.1.18-3) unstable; urgency=low
+
+  * upload 0.1.18-2 closed the wrong bug, correction: 
+  * added patch to fix segfault in mpileup (Closes: #653042)
+  * added patch to fix coverage cap (Closes: #671524)
+
+ -- Dominique Belhachemi <domibel at debian.org>  Fri, 27 Jul 2012 11:11:41 -0400
+
+samtools (0.1.18-2) unstable; urgency=low
+
+  * added patch to fix segfault in mpileup (Closes: #544976)
+  * added patch to fix coverage cap (Closes: #671524)
+
+ -- Dominique Belhachemi <domibel at debian.org>  Thu, 26 Jul 2012 18:30:48 -0400
 
 samtools (0.1.18-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 91eb536..abcb75c 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: science
 Priority: optional
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 DM-Upload-Allowed: yes
-Uploaders: Charles Plessy <plessy at debian.org>
+Uploaders: Charles Plessy <plessy at debian.org>, Dominique Belhachemi <domibel at debian.org>
 Build-Depends: debhelper (>= 9), bash-completion, cdbs, quilt, libncurses5-dev, zlib1g-dev
 Standards-Version: 3.9.2
 Homepage: http://samtools.sourceforge.net
@@ -32,4 +32,4 @@ Description: manipulates nucleotide sequence alignments in BAM or SAM format
  sorting, merging, generating pileup, and quickly retrieval of reads overlapped
  with a specified region.
  .
- This library is part SAMtools.
+ This library is part of SAMtools.
diff --git a/debian/patches/fix_coverage_cap.patch b/debian/patches/fix_coverage_cap.patch
new file mode 100644
index 0000000..3385be5
--- /dev/null
+++ b/debian/patches/fix_coverage_cap.patch
@@ -0,0 +1,12 @@
+Description: increases the coverage cap from 8.000 to 1.000.000
+
+--- samtools-0.1.18.orig/bam2depth.c
++++ samtools-0.1.18/bam2depth.c
+@@ -80,6 +80,7 @@ int main_depth(int argc, char *argv[])
+ 
+ 	// the core multi-pileup loop
+ 	mplp = bam_mplp_init(n, read_bam, (void**)data); // initialization
++	bam_mplp_set_maxcnt(mplp,1000000); // set maxdepth to 1M
+ 	n_plp = calloc(n, sizeof(int)); // n_plp[i] is the number of covering reads from the i-th BAM
+ 	plp = calloc(n, sizeof(void*)); // plp[i] points to the array of covering reads (internal in mplp)
+ 	while (bam_mplp_auto(mplp, &tid, &pos, n_plp, plp) > 0) { // come to the next covered position
diff --git a/debian/patches/fix_float_tag.patch b/debian/patches/fix_float_tag.patch
new file mode 100644
index 0000000..7760aac
--- /dev/null
+++ b/debian/patches/fix_float_tag.patch
@@ -0,0 +1,16 @@
+Description: Fix for bug"Float tags prevent opt() from finding later tags (KeyError instead of value of present tag)"
+Origin: http://code.google.com/p/pysam/issues/detail?id=71
+
+Index: samtools-0.1.18/bam.h
+===================================================================
+--- samtools-0.1.18.orig/bam.h	2012-12-21 12:00:47.293615029 -0500
++++ samtools-0.1.18/bam.h	2012-12-21 12:14:58.764541346 -0500
+@@ -755,7 +755,7 @@
+ {
+ 	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') return 4;
++	else if (x == 'I' || x == 'i' || x == 'f' || x == 'F') return 4;
+ 	else return 0;
+ }
+ 
diff --git a/debian/patches/fix_segfault_with_small_ref.patch b/debian/patches/fix_segfault_with_small_ref.patch
new file mode 100644
index 0000000..51ca9f1
--- /dev/null
+++ b/debian/patches/fix_segfault_with_small_ref.patch
@@ -0,0 +1,53 @@
+Description: Fix segfault if position is outside of the reference sequence length
+Origin: Don Armstrong <don at donarmstrong.com>
+
+Index: samtools-0.1.18/bam_plcmd.c
+===================================================================
+--- samtools-0.1.18.orig/bam_plcmd.c	2011-07-06 20:41:26.000000000 -0700
++++ samtools-0.1.18/bam_plcmd.c	2011-12-22 14:44:05.000000000 -0800
+@@ -93,6 +93,7 @@
+ 	bam_iter_t iter;
+ 	bam_header_t *h;
+ 	int ref_id;
++        int ref_len;
+ 	char *ref;
+ 	const mplp_conf_t *conf;
+ } mplp_aux_t;
+@@ -134,6 +135,11 @@
+ 				qual[i] = qual[i] > 31? qual[i] - 31 : 0;
+ 		}
+ 		has_ref = (ma->ref && ma->ref_id == b->core.tid)? 1 : 0;
++		if (has_ref && (ma->ref_len <= b->core.pos)) { // exclude reads outside of the reference sequence
++		  fprintf(stderr,"[%s] Skipping because %d is outside of %d [ref:%d]\n",__func__,b->core.pos,ma->ref_len,ma->ref_id);
++		  skip = 1;
++		  continue;
++		}
+ 		skip = 0;
+ 		if (has_ref && (ma->conf->flag&MPLP_REALN)) bam_prob_realn_core(b, ma->ref, (ma->conf->flag & MPLP_EXT_BAQ)? 3 : 1);
+ 		if (has_ref && ma->conf->capQ_thres > 10) {
+@@ -277,7 +283,11 @@
+ 	if (tid0 >= 0 && conf->fai) { // region is set
+ 		ref = faidx_fetch_seq(conf->fai, h->target_name[tid0], 0, 0x7fffffff, &ref_len);
+ 		ref_tid = tid0;
+-		for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid0;
++		for (i = 0; i < n; ++i) {
++		  data[i]->ref = ref;
++                  data[i]->ref_id = tid0;
++		  data[i]->ref_len = ref_len;
++                }
+ 	} else ref_tid = -1, ref = 0;
+ 	iter = bam_mplp_init(n, mplp_func, (void**)data);
+ 	max_depth = conf->max_depth;
+@@ -295,7 +305,11 @@
+ 		if (tid != ref_tid) {
+ 			free(ref); ref = 0;
+ 			if (conf->fai) ref = faidx_fetch_seq(conf->fai, h->target_name[tid], 0, 0x7fffffff, &ref_len);
+-			for (i = 0; i < n; ++i) data[i]->ref = ref, data[i]->ref_id = tid;
++			for (i = 0; i < n; ++i) {
++			  data[i]->ref = ref;
++			  data[i]->ref_id = tid;
++			  data[i]->ref_len = ref_len;
++			}
+ 			ref_tid = tid;
+ 		}
+ 		if (conf->flag & MPLP_GLF) {
diff --git a/debian/patches/series b/debian/patches/series
index ed908a5..fa2fc87 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,4 @@
 no-pileup-tests.patch
+fix_segfault_with_small_ref.patch
+fix_coverage_cap.patch
+fix_float_tag.patch

-- 
Processing of sequence alignments in SAM and BAM formats.



More information about the debian-med-commit mailing list