[med-svn] samtools 07/07: Current changelog.

Charles Plessy plessy at moszumanska.debian.org
Mon Jun 15 13:03:50 UTC 2015


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

plessy pushed a commit to branch debian/unstable
in repository samtools.

commit c789e05419a795fa01a162aa84419f856d5385b8
Author: Charles Plessy <plessy at debian.org>
Date:   Mon Jun 15 22:03:26 2015 +0900

    Current changelog.
---
 Makefile              |  2 +-
 bam_plcmd.c           | 18 ++++++++++++++++--
 debian/changelog      |  3 +++
 debian/patches/series |  1 +
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index bf7fd25..e39ee72 100644
--- a/Makefile
+++ b/Makefile
@@ -83,7 +83,7 @@ all: $(PROGRAMS) $(BUILT_MISC_PROGRAMS) $(BUILT_TEST_PROGRAMS)
 
 # Adjust $(HTSDIR) to point to your top-level htslib directory
 HTSDIR = ../htslib
-include $(HTSDIR)/htslib.mk
+-include $(HTSDIR)/htslib.mk
 HTSLIB = $(HTSDIR)/libhts.a
 BGZIP  = $(HTSDIR)/bgzip
 
diff --git a/bam_plcmd.c b/bam_plcmd.c
index d574cca..b23a0cc 100644
--- a/bam_plcmd.c
+++ b/bam_plcmd.c
@@ -129,6 +129,7 @@ typedef struct {
     hts_itr_t *iter;
     bam_hdr_t *h;
     int ref_id;
+    int ref_len;
     char *ref;
     const mplp_conf_t *conf;
 } mplp_aux_t;
@@ -174,6 +175,11 @@ static int mplp_func(void *data, bam1_t *b)
                 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_REDO_BAQ)? 7 : 3);
         if (has_ref && ma->conf->capQ_thres > 10) {
@@ -435,7 +441,11 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
     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;
 
     // init pileup
@@ -459,7 +469,11 @@ static int mpileup(mplp_conf_t *conf, int n, char **fn)
         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_BCF) {
diff --git a/debian/changelog b/debian/changelog
index eba0d37..db75c9c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,11 @@
 samtools (1.2-1) UNRELEASED; urgency=medium
 
   a5f28a0 Merge tag '1.2' into debian/unstable 
+  c542e84 Build-depend on libhts-dev 1.2.
   6c2d9cd Build-depend and recommend libio-pty-perl.
           (Needed for the regression tests.)
+  23e44a4 Removed fix_coverage_cap.patch, obsoleted by -d option.
+  1091aab Refreshed fuzzy patches.
 
  -- Charles Plessy <plessy at debian.org>  Thu, 25 Sep 2014 21:39:37 +0900
 
diff --git a/debian/patches/series b/debian/patches/series
index dda8ba0..4b093e4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 fix_segfault_with_small_ref.patch
 dynamic-build.patch
+debian-changes

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



More information about the debian-med-commit mailing list