From a22b08ab73fb1afda3aaa08f00305c6257805efb Mon Sep 17 00:00:00 2001 From: chapmanb Date: Fri, 18 May 2018 05:05:25 -0400 Subject: [PATCH] v0.1.8: fix tabix index error for variants at position 1 of contigs. Fixes chapmanb/bcbio-nextgen#2383 --- HISTORY.md | 4 ++++ project.clj | 2 +- src/bcbio/variation/variantcontext.clj | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 93daa96..a22608b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 0.1.8 (18 May 2018) + +- Fix tabix index error for variants present at position 1 of contigs. + ## 0.1.7 (15 August 2016) - Avoid FreeBayes error when running `--variant-input` without an empty VCF. diff --git a/project.clj b/project.clj index 705e8e3..1152a63 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject bcbio.variation.recall "0.1.7" +(defproject bcbio.variation.recall "0.1.8" :description "Parallel merging, squaring off and ensemble calling for genomic variants." :url "https://github.com/chapmanb/bcbio.variation.recall" :license {:name "MIT" :url "http://www.opensource.org/licenses/mit-license.html"} diff --git a/src/bcbio/variation/variantcontext.clj b/src/bcbio/variation/variantcontext.clj index 216a351..f3825c6 100644 --- a/src/bcbio/variation/variantcontext.clj +++ b/src/bcbio/variation/variantcontext.clj @@ -107,7 +107,7 @@ (variants-in-region retriever (:chr vc) (:start vc) (:end vc))) ([retriever space start end] (letfn [(get-vcs-in-source [[source fname]] - (with-open [vcf-iter (.query source space start end)] + (with-open [vcf-iter (.query source space (max 1 start) end)] (doall (map #(assoc (from-vc %) :fname fname) (iterator-seq vcf-iter)))))] (mapcat get-vcs-in-source (map vector (:sources retriever) (:fnames retriever))))))