X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=BamWriter.h;h=12ab087d668966f905a495f4e608a777e157ebc0;hb=fb2aa1ca9d00710943155ef3abbbdd87df116e4a;hp=e014f8d5915445622841b8ca6f680cdf6b9e413d;hpb=237bbdf363c9e42ee24e2fd63106dccf20d9bf2f;p=rsem.git diff --git a/BamWriter.h b/BamWriter.h index e014f8d..12ab087 100644 --- a/BamWriter.h +++ b/BamWriter.h @@ -113,6 +113,9 @@ void BamWriter::work(HitWrapper wrapper) { cnt += 2; if (verbose && cnt % 1000000 == 0) { printf("%d alignment lines are loaded!\n", cnt); } + //mate info is not complete, skip + if (!(((b->core.flag & 0x0040) && (b2->core.flag & 0x0080)) || ((b->core.flag & 0x0080) && (b2->core.flag & 0x0040)))) continue; + //unalignable reads, skip if ((b->core.flag & 0x0004) || (b2->core.flag & 0x0004)) continue; //swap if b is mate 2