From c4b3652b4d3286bdf957b131e26ec08d24a24784 Mon Sep 17 00:00:00 2001 From: David Jones Date: Tue, 11 Jul 2017 14:18:36 +0100 Subject: [PATCH] Empty bam files except header now produce RG information and a line of zeroes --- CHANGES.md | 3 +++ c/bam_stats_output.c | 2 +- lib/PCAP.pm | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3df33cc..291f303 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +### 4.0.5 +* bam_stats now outputs a line of zeroes for bam files with zero reads + ### 3.5.0 * Adds RNA downloads to PanCancer download tool `gnos_pull.pl` * Hardening of external process handling in `PCAP::Threaded` diff --git a/c/bam_stats_output.c b/c/bam_stats_output.c index f6f9d07..1bf4e8b 100644 --- a/c/bam_stats_output.c +++ b/c/bam_stats_output.c @@ -42,7 +42,7 @@ int bam_stats_output_print_results(rg_info_t **grps,int grps_size,stats_rd_t*** //Iterate through each RG int i=0; for(i=0;icount==0 && grp_stats[i][1]->count==0) continue; // Skip empty read groups stats + uint64_t unmapped_r1 = grp_stats[i][0]->umap; uint64_t unmapped_r2 = grp_stats[i][1]->umap; uint64_t unmapped = grp_stats[i][0]->umap + grp_stats[i][1]->umap; diff --git a/lib/PCAP.pm b/lib/PCAP.pm index 65b7595..8aa5c54 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.0.4'; +our $VERSION = '4.0.5'; our @EXPORT = qw($VERSION _which); const my $LICENSE =>