@@ -348,15 +348,16 @@ int main(int argc, char** argv) {
348348 tbb::parallel_for (tbb::blocked_range<int >(0 , numSequences), [&](tbb::blocked_range<int > range){
349349 for (int idx_= range.begin (); idx_ < range.end (); ++idx_) {
350350 uint64_t i = static_cast <uint64_t >(idx_);
351- uint64_t fourBitCompressedSize = (seqs[i].size ()+15 )/16 ;
352- uint64_t * fourBitCompressed = new uint64_t [fourBitCompressedSize];
353- fourBitCompressor (seqs[i], seqs[i].size (), fourBitCompressed, params.range .first , params.range .second );
354-
355351 int localSeqLength = seqs[i].size ();
356352 if (alignmentLengthModify) {
357353 if (params.range .second > -1 ) localSeqLength=params.range .second +1 ;
358354 if (params.range .first > 0 ) localSeqLength-=params.range .first ;
359355 }
356+ uint64_t fourBitCompressedSize = (localSeqLength+15 )/16 ;
357+ uint64_t * fourBitCompressed = new uint64_t [fourBitCompressedSize];
358+ fourBitCompressor (seqs[i], seqs[i].size (), fourBitCompressed, params.range .first , params.range .second );
359+
360+
360361 int newId = idMap[i];
361362 seqLengths[newId] = localSeqLength;
362363 fourBitCompressedSeqs[newId] = fourBitCompressed;
@@ -396,15 +397,18 @@ int main(int argc, char** argv) {
396397 tbb::parallel_for (tbb::blocked_range<int >(0 , numSequences), [&](tbb::blocked_range<int > range){
397398 for (int idx_= range.begin (); idx_ < range.end (); ++idx_) {
398399 uint64_t i = static_cast <uint64_t >(idx_);
399- uint64_t fourBitCompressedSize = (seqs[i].size ()+15 )/16 ;
400- uint64_t * fourBitCompressed = new uint64_t [fourBitCompressedSize];
401- fourBitCompressor (seqs[i], seqs[i].size (), fourBitCompressed, params.range .first , params.range .second );
402-
400+
403401 int localSeqLength = seqs[i].size ();
404402 if (alignmentLengthModify) {
405403 if (params.range .second > -1 ) localSeqLength=params.range .second +1 ;
406404 if (params.range .first > 0 ) localSeqLength-=params.range .first ;
407405 }
406+ uint64_t fourBitCompressedSize = (localSeqLength+15 )/16 ;
407+
408+ uint64_t * fourBitCompressed = new uint64_t [fourBitCompressedSize];
409+ fourBitCompressor (seqs[i], seqs[i].size (), fourBitCompressed, params.range .first , params.range .second );
410+
411+
408412 seqLengths[ids[i]]=localSeqLength;
409413 fourBitCompressedSeqs[ids[i]] = fourBitCompressed;
410414 names[ids[i]] = names_[i];
0 commit comments