From e34912871a0c51b928e24855f2ddc85676c2f160 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 21 Feb 2019 13:04:42 +0000 Subject: [PATCH 1/2] Fix regression - ability handle chr with no pindel mapped reads, introduced in 3.x tree Also samtools can read the header from a gz sam file modified to make this more normalised so that no issues would occur if the first file is the only one with reads. --- perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm b/perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm index 78030cd..25a2d3d 100644 --- a/perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm +++ b/perl/lib/Sanger/CGP/Pindel/OutputGen/BamUtil.pm @@ -64,9 +64,9 @@ sub sam_to_sorted_bam { $command .= sprintf ' zcat %s | ', $sam_files->[0]; } else { - my $first_file = shift @{$sam_files}; + my $header_from = $sam_files->[0]; $command .= "cd $base_dir; "; - $command .= sprintf q{ (zcat %s ; zgrep -v '^@' %s) | }, $first_file, join q{ }, @{$sam_files}; + $command .= sprintf q{ (samtools view -H %s ; zcat %s | grep -v '^@' ) | }, $header_from, join q{ }, @{$sam_files}; } $command .= which('bamsort'); From 6eacd04d08f08ffb9e348eadef30003fa63c4018 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 21 Feb 2019 13:08:05 +0000 Subject: [PATCH 2/2] Version and details in change log --- CHANGES.md | 4 ++++ perl/lib/Sanger/CGP/Pindel.pm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 6169f5a..b51b2a3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGES +## 3.1.1 + +* Fix regression - ability to cope with chromosomes with no events. + ## 3.1.0 * Incorporates updated pindel which improves sensitivity diff --git a/perl/lib/Sanger/CGP/Pindel.pm b/perl/lib/Sanger/CGP/Pindel.pm index b90e36d..664c4c0 100644 --- a/perl/lib/Sanger/CGP/Pindel.pm +++ b/perl/lib/Sanger/CGP/Pindel.pm @@ -26,7 +26,7 @@ use strict; use Const::Fast qw(const); use base 'Exporter'; -our $VERSION = '3.1.0'; +our $VERSION = '3.1.1'; our @EXPORT = qw($VERSION); 1;