You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (assigned && (write_barcode_separate_fastq_ || use_pipe) && (!sc->always_assign || (remultiplex && assigned2)) && !no_output_barcodes) { // Write out barcode read
539
-
std::stringstream o;
539
+
std::string o; o.reserve(1024);
540
540
// Write out barcode read
541
-
o << start_char <<std::string(names[i].first, names[i].second) << mod_name << break_char;
541
+
o += start_char +std::string(names[i].first, names[i].second) + mod_name + std::string(1, break_char);
542
542
if (!remultiplex) {
543
-
o << sc->binaryToString(sc->getID(r.id), sc->getBarcodeLength()) << break_char;
543
+
o += sc->binaryToString(sc->getID(r.id), sc->getBarcodeLength()) + std::string(1, break_char);
544
544
} else { // Write out remultiplexing barcode
545
-
o << sc->binaryToString(sc->getID(batch_id_mapping[flags[readnum]]), sc->getBarcodeLength()) << break_char;
545
+
o += sc->binaryToString(sc->getID(batch_id_mapping[flags[readnum]]), sc->getBarcodeLength()) + std::string(1, break_char);
546
546
}
547
547
if (include_quals) {
548
-
o <<"+"<< break_char;
549
-
o <<std::string(sc->getBarcodeLength(), sc->QUAL) << break_char;
548
+
o +="+"+ std::string(1, break_char);
549
+
o +=std::string(sc->getBarcodeLength(), sc->QUAL) + std::string(1, break_char);
550
550
}
551
-
const std::string& ostr = o.str();
551
+
const std::string& ostr = o;
552
552
size_t ostr_len = ostr.length();
553
553
if (!outbam || !r.ofile.empty()) { // Only write barcode read if we're not writing BAM files (or we're writing BAM files but we need to write the current read into a FASTQ file for the "keep" demultiplexing)
0 commit comments