From 88b383ce8b895bb434607b04cf3a13daaac94dc1 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 15 Mar 2018 12:35:48 +0000 Subject: [PATCH 1/2] Fix an error in input processing of CRAM --- CHANGES.md | 4 ++++ lib/PCAP.pm | 2 +- lib/PCAP/Bwa.pm | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 0e13519..38c4edb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGES +## 4.2.1 + +Fix for input type of CRAM. + ## 4.2.0 * Add threadpool to `bam_stats` and `diff_bams`. Fixes #18, Fixes #19 diff --git a/lib/PCAP.pm b/lib/PCAP.pm index 71f589d..6bb7f9b 100644 --- a/lib/PCAP.pm +++ b/lib/PCAP.pm @@ -27,7 +27,7 @@ use FindBin qw($Bin); use File::Which qw(which); # don't use autodie, only core perl in here -our $VERSION = '4.2.0'; +our $VERSION = '4.2.1'; our @EXPORT = qw($VERSION _which); const my $LICENSE => diff --git a/lib/PCAP/Bwa.pm b/lib/PCAP/Bwa.pm index 89c768d..2157dd2 100644 --- a/lib/PCAP/Bwa.pm +++ b/lib/PCAP/Bwa.pm @@ -206,7 +206,7 @@ sub split_in { my $cmd; if($input->bam_or_cram eq 'cram') { $cmd = sprintf $CRAMFASTQ, $bam2fq, - $options->{'reference'},, + $options->{'reference'}, File::Spec->catfile($tmp, "bamtofastq.$index"), $split_folder, $fragment_size * $MILLION * $BAM_MULT, From e558006d16642372b090f2748f984c3816885556 Mon Sep 17 00:00:00 2001 From: Keiran Raine Date: Thu, 15 Mar 2018 12:54:45 +0000 Subject: [PATCH 2/2] Fix sprintf template, need this under CI --- lib/PCAP/Bwa.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PCAP/Bwa.pm b/lib/PCAP/Bwa.pm index 2157dd2..c852655 100644 --- a/lib/PCAP/Bwa.pm +++ b/lib/PCAP/Bwa.pm @@ -37,7 +37,7 @@ use PCAP::Bam; const my $BWA_ALN => q{ aln%s -t %s -f %s_%s.sai %s %s.%s}; const my $BAMFASTQ => q{%s view -F 2816 -T %s -u %s| %s exclude=QCFAIL,SECONDARY,SUPPLEMENTARY tryoq=1 gz=1 level=1 outputperreadgroup=1 outputperreadgroupsuffixF=_i.fq outputperreadgroupsuffixF2=_i.fq T=%s outputdir=%s split=%s}; -const my $CRAMFASTQ => q{%s reference=%s inputformat=cram exclude=QCFAIL,SECONDARY,SUPPLEMENTARY tryoq=1 gz=1 level=1 outputperreadgroup=1 outputperreadgroupsuffixF=_i.fq outputperreadgroupsuffixF2=_i.fq T=%s outputdir=%s split=%s filename=%}; +const my $CRAMFASTQ => q{%s reference=%s inputformat=cram exclude=QCFAIL,SECONDARY,SUPPLEMENTARY tryoq=1 gz=1 level=1 outputperreadgroup=1 outputperreadgroupsuffixF=_i.fq outputperreadgroupsuffixF2=_i.fq T=%s outputdir=%s split=%s filename=%s}; const my $BWA_MEM => q{ mem %s %s -R %s -t %s %s}; const my $ALN_TO_SORTED => q{ sampe -P -a 1000 -r '%s' %s %s_1.sai %s_2.sai %s.%s %s.%s | %s fixmate=1 inputformat=sam level=1 tmpfile=%s_tmp O=%s_sorted.bam}; const my $BAMSORT => q{ fixmate=1 inputformat=sam level=1 tmpfile=%s_tmp O=%s_sorted.bam outputthreads=%s calmdnm=1 calmdnmrecompindetonly=1 calmdnmreference=%s};