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

Giraffe paired end fragment length #4438

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions src/minimizer_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3291,10 +3291,10 @@ int64_t MinimizerMapper::distance_between(const Alignment& aln1, const Alignment
crash_unless(aln1.path().mapping_size() != 0);
crash_unless(aln2.path().mapping_size() != 0);

pos_t pos1 = initial_position(aln1.path());
pos_t pos2 = final_position(aln2.path());
pos_t pos1 = final_position(aln1.path());
pos_t pos2 = initial_position(aln2.path());

return distance_between(pos1, pos2);
return SnarlDistanceIndex::sum(distance_between(pos1, pos2), aln1.sequence().size() + aln2.sequence().size());
}

void MinimizerMapper::extension_to_alignment(const GaplessExtension& extension, Alignment& alignment) const {
Expand Down
4 changes: 2 additions & 2 deletions src/minimizer_mapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ class MinimizerMapper : public AlignerClient {

static constexpr size_t default_max_multimaps = 1;
size_t max_multimaps = default_max_multimaps;
static constexpr size_t default_distance_limit = 200;
static constexpr size_t default_distance_limit = 0;
size_t distance_limit = default_distance_limit;

/// If false, skip computing base-level alignments.
Expand Down Expand Up @@ -381,7 +381,7 @@ class MinimizerMapper : public AlignerClient {
* Get the distance limit for the given read length
*/
size_t get_distance_limit(size_t read_length) const {
return max(distance_limit, read_length + 50);
return max(distance_limit, (size_t) ((int)read_length * 1.5));
}

/// The information we store for each seed.
Expand Down
Loading