Skip to content

Commit

Permalink
Merge pull request #36 from bacpop/issue35
Browse files Browse the repository at this point in the history
Addresses issue #35
  • Loading branch information
samhorsfield96 authored Jul 17, 2024
2 parents 27e8a45 + 0f0acd3 commit eb917a3
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,16 +458,20 @@ void calculate_genome_paths(const std::vector<Kmer>& head_kmer_arr,
}
}

// map to last entry and assign end-contig
auto um_pair = get_um_data(ccdbg, head_kmer_arr, prev_head);
auto& um_data = um_pair.second;

um_data->set_end_contig(colour_ID, nb_colours);

// add delimiter between contigs
genome_path += contig_path;
genome_path += ";";
contig_ID++;
// in case where whole contig removed, do not add to FM index
// otherwise causes out of range error with head_kmer_arr as k-mer not present
if (prev_head != 0) {
// map to last entry and assign end-contig
auto um_pair = get_um_data(ccdbg, head_kmer_arr, prev_head);
auto& um_data = um_pair.second;

um_data->set_end_contig(colour_ID, nb_colours);

// add delimiter between contigs
genome_path += contig_path;
genome_path += ";";
contig_ID++;
}
}
}
}
Expand Down Expand Up @@ -585,4 +589,4 @@ NodeColourVector index_graph(std::vector<Kmer>& head_kmer_arr,

// return node_colour vector
return node_colour_vector;
}
}

0 comments on commit eb917a3

Please sign in to comment.