From 142c0168622638bb25f09796c3598fab28a1f94c Mon Sep 17 00:00:00 2001 From: Bo Li Date: Thu, 21 Mar 2013 19:43:06 -0500 Subject: [PATCH] Modified rsem-tbam2gbam so that the original alignment quality MAPQ will be preserved if the input bam is not from RSEM --- BamConverter.h | 3 ++- rsem_perl_utils.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/BamConverter.h b/BamConverter.h index 4ea7d3e..d36f3d1 100644 --- a/BamConverter.h +++ b/BamConverter.h @@ -227,7 +227,8 @@ inline void BamConverter::writeCollapsedLines() { memcpy(bam_aux_get(tmp_b, "ZW") + 1, (uint8_t*)&(prb), bam_aux_type2size('f')); tmp_b->core.qual = getMAPQ(prb); } - else tmp_b->core.qual = getMAPQ(1.0); + // otherwise, just use the MAPQ score of the orignal alignment + samwrite(out, tmp_b); if (isPaired) { if (p != NULL) memcpy(bam_aux_get(tmp_b2, "ZW") + 1, (uint8_t*)&(prb), bam_aux_type2size('f')); diff --git a/rsem_perl_utils.pm b/rsem_perl_utils.pm index f3edfe4..b2a040f 100644 --- a/rsem_perl_utils.pm +++ b/rsem_perl_utils.pm @@ -90,7 +90,7 @@ sub showVersionInfo { my $line = ; chomp($line); close(INPUT); - print "$line\n"; + print "Current version is $line\n"; exit(0); } -- 2.39.2