]> git.donarmstrong.com Git - rsem.git/commitdiff
Added some user-friendly error messages for BamConverter.h
authorBo Li <bli@cs.wisc.edu>
Fri, 22 Mar 2013 01:01:53 +0000 (20:01 -0500)
committerBo Li <bli@cs.wisc.edu>
Fri, 22 Mar 2013 01:03:31 +0000 (20:03 -0500)
BamConverter.h

index d36f3d10c4d4e78ab4351f7482477fc77d318e07..037be8953891a38c4ad94ba2d888e114af601351 100644 (file)
@@ -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;
                                }