From 175dad8c19836c8fec9072fe50ac2a6db7c2d1fa Mon Sep 17 00:00:00 2001 From: Bo Li Date: Thu, 21 Mar 2013 20:01:53 -0500 Subject: [PATCH] Added some user-friendly error messages for BamConverter.h --- BamConverter.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BamConverter.h b/BamConverter.h index d36f3d1..037be89 100644 --- a/BamConverter.h +++ b/BamConverter.h @@ -119,14 +119,13 @@ void BamConverter::process() { // at least one segment is not properly mapped bool notgood = (b->core.flag & 0x0004) || (isPaired && (b2->core.flag & 0x0004)); - - if (isPaired && notgood) assert((b->core.flag & 0x0004) && (b2->core.flag & 0x0004)); - + if (isPaired && notgood) general_assert((b->core.flag & 0x0004) && (b2->core.flag & 0x0004), cstrtos(bam1_qname(b)) + "'s two mates are not all marked as unalignable!"); if (!notgood) { // for collapsing if (isPaired) { assert(b->core.tid == b2->core.tid); + general_assert(b->core.tid == b2->core.tid, cstrtos(bam1_qname(b)) + "'s two mates are aligned to two different transcripts!"); if ((b->core.flag & 0x0080) && (b2->core.flag & 0x0040)) { bam1_t *tmp = b; b = b2; b2 = tmp; } -- 2.39.2