Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort minimizers by score in Giraffe single-end mode #4351

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/minimizer_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,10 +589,13 @@ vector<Alignment> MinimizerMapper::map_from_extensions(Alignment& aln) {
return aln.sequence();
});


// Minimizers sorted by score in descending order.
std::vector<Minimizer> minimizers = this->find_minimizers(aln.sequence(), funnel);

// Minimizers sorted by position
std::vector<Minimizer> minimizers_in_read = this->find_minimizers(aln.sequence(), funnel);
// Indexes of minimizers, sorted into score order, best score first
std::vector<size_t> minimizer_score_order = sort_minimizers_by_score(minimizers_in_read);
// Minimizers sorted by best score first
VectorView<Minimizer> minimizers{minimizers_in_read, minimizer_score_order};

// Find the seeds and mark the minimizers that were located.
vector<Seed> seeds = this->find_seeds(minimizers, aln, funnel);

Expand Down
Loading