Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/multipath_alignment_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6505,7 +6505,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap
for (const auto& path_node : path_nodes) {
for (const auto& edge : path_node.edges) {
const auto& next_node = path_nodes[edge.first];
shift = max<size_t>(shift, abs<int64_t>((next_node.begin - path_node.end) - edge.second));
shift = max<size_t>(shift, std::abs(static_cast<int64_t>((next_node.begin - path_node.end) - edge.second)));
}
}
return shift;
Expand All @@ -6529,7 +6529,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap
++in_degree[edge.first];

const auto& next_node = path_nodes[edge.first];
size_t shift = abs<int64_t>((next_node.begin - path_node.end) - edge.second);
size_t shift = std::abs(static_cast<int64_t>((next_node.begin - path_node.end) - edge.second));

#ifdef debug_shift_pruning
cerr << "shift DP reverse " << i << " <- " << edge.first << " with shift " << shift << " for total " << min_shift_rev[edge.first] + shift << endl;
Expand All @@ -6555,7 +6555,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap
else {
for (auto& edge : path_node.edges) {
const auto& next_node = path_nodes[edge.first];
size_t shift = abs<int64_t>((next_node.begin - path_node.end) - edge.second);
size_t shift = std::abs(static_cast<int64_t>((next_node.begin - path_node.end) - edge.second));
#ifdef debug_shift_pruning
cerr << "shift DP forward " << i << " -> " << edge.first << " with shift " << shift << " for total " << min_shift_fwd[i] + shift << endl;
#endif
Expand All @@ -6577,7 +6577,7 @@ void MultipathAlignmentGraph::align(const Alignment& alignment, const HandleGrap
for (size_t j = 0; j < path_node.edges.size(); ++j) {
auto& edge = path_node.edges[j];
const auto& next_node = path_nodes[edge.first];
size_t shift = abs<int64_t>((next_node.begin - path_node.end) - edge.second);
size_t shift = std::abs(static_cast<int64_t>((next_node.begin - path_node.end) - edge.second));

size_t min_edge_shift = min_shift_fwd[i] + shift + min_shift_rev[edge.first];

Expand Down
2 changes: 1 addition & 1 deletion src/multipath_mapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ namespace vg {
// in the left_idxs and right_idxs vectors
int64_t target_len = 2 * seq_len - left_side.clip_length - right_side.clip_length;
auto distance_diff = [&](size_t l, size_t r) {
return abs<int64_t>(get<2>(left_sites[left_idxs[l]]) + get<2>(right_sites[right_idxs[r]]) - target_len);
return std::abs(static_cast<int64_t>(get<2>(left_sites[left_idxs[l]]) + get<2>(right_sites[right_idxs[r]]) - target_len));
};

// sweep to identify pairs that most nearly align
Expand Down
2 changes: 1 addition & 1 deletion src/recombinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ void add_path(const gbwt::GBWT& source, gbwt::size_type path_id, gbwt::GBWTBuild
gbwt::PathName path_name = source.metadata.path(path_id);
std::string sample_name = source.metadata.sample(path_name.sample);
std::string contig_name = source.metadata.contig(path_name.contig);
if (sample_name == gbwtgraph::REFERENCE_PATH_SAMPLE_NAME) {
if (sample_name == gbwtgraph::GENERIC_PATH_SAMPLE_NAME) {
metadata.add_generic_path(contig_name);
} else {
// Reference samples will be copied later.
Expand Down
2 changes: 1 addition & 1 deletion src/subcommand/gampcompare_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ int main_gampcompare(int argc, char** argv) {
if (path_true_positions[i].second == path_mapped_positions[j].second) {
// there is a pair of positions on the same strand of the same path
abs_dist = min<int64_t>(abs_dist,
abs<int64_t>(path_true_positions[i].first - path_mapped_positions[j].first));
std::abs(static_cast<int64_t>(path_true_positions[i].first - path_mapped_positions[j].first)));
}
}
}
Expand Down