X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2FBamReader.cpp;h=93a991bd77f942becb85fa505dba8b6334a15be1;hb=90bb3691f9aa2a2e8a4dd906c2439c7bc434eb78;hp=98ea7589f664de056f5138593e24454480bd26c7;hpb=1d03f81d725ffedeac9d9d73a2058f00cfc0b0e4;p=bamtools.git diff --git a/src/api/BamReader.cpp b/src/api/BamReader.cpp index 98ea758..93a991b 100644 --- a/src/api/BamReader.cpp +++ b/src/api/BamReader.cpp @@ -282,7 +282,7 @@ bool BamReader::BamReaderPrivate::BuildCharData(BamAlignment& bAlignment) { break; // for 'H' - hard clip, do nothing to AlignedBases, move to next op default: - printf("ERROR: Invalid Cigar op type\n"); // shouldn't get here + fprintf(stderr, "ERROR: Invalid Cigar op type\n"); // shouldn't get here exit(1); } } @@ -330,7 +330,7 @@ bool BamReader::BamReaderPrivate::BuildCharData(BamAlignment& bAlignment) { break; default : - printf("ERROR: Invalid tag value type\n"); // shouldn't get here + fprintf(stderr, "ERROR: Invalid tag value type\n"); // shouldn't get here exit(1); } } @@ -520,7 +520,7 @@ bool BamReader::BamReaderPrivate::Jump(int refID, int position) { // determine possible offsets vector offsets; if ( !NewIndex->GetOffsets(Region, IsRightBoundSpecified, offsets) ) { - printf("ERROR: Could not jump: unable to calculate offset for specified region.\n"); + fprintf(stderr, "ERROR: Could not jump: unable to calculate offset for specified region.\n"); return false; } @@ -550,12 +550,12 @@ void BamReader::BamReaderPrivate::LoadHeaderData(void) { // check to see if proper BAM header char buffer[4]; if (mBGZF.Read(buffer, 4) != 4) { - printf("Could not read header type\n"); + fprintf(stderr, "Could not read header type\n"); exit(1); } if (strncmp(buffer, "BAM\001", 4)) { - printf("wrong header type!\n"); + fprintf(stderr, "wrong header type!\n"); exit(1); }