Commit 0293ab53 authored by Li's avatar Li
Browse files

Clean up the code

parent 077b2e50
Loading
Loading
Loading
Loading
+3 −18
Original line number Diff line number Diff line
@@ -1146,8 +1146,6 @@ void Chromap<MappingRecord>::MapPairedEndReads() {
                negative_candidates2_buffer.clear();
                uint32_t repetitive_seed_length1 = 0;
                uint32_t repetitive_seed_length2 = 0;
								

                // Generate candidates
                if (mm_to_candidates_cache.Query(minimizers1, positive_candidates1, negative_candidates1, repetitive_seed_length1, read_batch1.GetSequenceLengthAt(pair_index)) == -1) {
                  index.GenerateCandidates(error_threshold_, minimizers1, &repetitive_seed_length1, &positive_hits1, &negative_hits1, &positive_candidates1, &negative_candidates1);
@@ -1339,18 +1337,6 @@ void Chromap<MappingRecord>::MapPairedEndReads() {

            mm_to_candidates_cache.Update(mm_history1[pair_index].minimizers, mm_history1[pair_index].positive_candidates, mm_history1[pair_index].negative_candidates, mm_history1[pair_index].repetitive_seed_length);
            mm_to_candidates_cache.Update(mm_history2[pair_index].minimizers, mm_history2[pair_index].positive_candidates, mm_history2[pair_index].negative_candidates, mm_history2[pair_index].repetitive_seed_length);
            /*if (mm_history1[pair_index].positive_candidates.size() < mm_history1[pair_index].positive_candidates.capacity() / 50) {
              std::vector<Candidate>().swap(mm_history1[pair_index].positive_candidates);
            }
            if (mm_history1[pair_index].negative_candidates.size() < mm_history1[pair_index].negative_candidates.capacity() / 50) {
              std::vector<Candidate>().swap(mm_history1[pair_index].negative_candidates);
            }
            if (mm_history2[pair_index].positive_candidates.size() < mm_history2[pair_index].positive_candidates.capacity() / 50) {
              std::vector<Candidate>().swap(mm_history2[pair_index].positive_candidates);
            }
            if (mm_history2[pair_index].negative_candidates.size() < mm_history2[pair_index].negative_candidates.capacity() / 50) {
              std::vector<Candidate>().swap(mm_history2[pair_index].negative_candidates);
            }*/

            if (mm_history1[pair_index].positive_candidates.size() > 50) {
              std::vector<Candidate>().swap(mm_history1[pair_index].positive_candidates);
@@ -1408,7 +1394,6 @@ void Chromap<MappingRecord>::MapPairedEndReads() {
  std::cerr << "Mapped all reads in " << Chromap<>::GetRealTime() - real_start_mapping_time << "s.\n";
  delete[] mm_history1;
  delete[] mm_history2;
	//mm_to_candidates_cache.PrintStats();
  OutputMappingStatistics();
  if (!is_bulk_data_) {
    OutputBarcodeStatistics();