diff --git a/gaml.cc b/gaml.cc index f9701c7..be0cc8e 100644 --- a/gaml.cc +++ b/gaml.cc @@ -994,8 +994,6 @@ int main(int argc, char** argv) { printf("%d ", len); } printf("\n"); -// starting_paths[0].resize(2262); -// starting_paths[0].resize(2259); printf("starting paths %d\n", starting_paths[0].size()); OutputPathsToFile(starting_paths, gr, 61, 500, "starting3"); printf("\n"); @@ -1020,7 +1018,6 @@ int main(int argc, char** argv) { //TODO: configure optimazation - Optimize(gr, pc, starting_paths, advice_paired, advice_pacbio, longest_read, settings); } diff --git a/moves.cc b/moves.cc index f43fda6..ee6469e 100644 --- a/moves.cc +++ b/moves.cc @@ -567,16 +567,9 @@ bool ExtendPaths(vector >& new_paths, Graph& gr, int threshold, } unordered_map > path_ends; - unordered_map > > path_poses; for (int i = 0; i < new_paths.size(); i++) { path_ends[new_paths[i][0]].push_back(i+1); path_ends[new_paths[i].back()^1].push_back(-(i+1)); - for (int j = 1; j < new_paths[i].size() - 1; j++) { - if (new_paths[i][j] >= 0 && gr.nodes[new_paths[i][j]]->s.length() > threshold) { - path_poses[new_paths[i][j]].push_back(make_pair(i, j)); - path_poses[new_paths[i][j]^1].push_back(make_pair(i, j)); - } - } } int join = 0; @@ -626,36 +619,6 @@ bool ExtendPaths(vector >& new_paths, Graph& gr, int threshold, } int pt = path.size() - 1; - /* geometric_distribution dist(0.2); - int extend_limit = 2 + dist(generator); - - for (int extend = 0; extend < extend_limit; extend++) { - if (path_poses.count(path.back())) { - vector > choices; - for (int i = 0; i < path_poses[path.back()].size(); i++) { - if (path_poses[path.back()][i].first != rp) { - choices.push_back(path_poses[path.back()][i]); - } - } - if (!choices.empty()) { - inner_join = choices[rand()%choices.size()]; - found = true; - break; - } - } - if (gr.nodes[path.back()]->s.length() > threshold && extend > 0) { - break; - } - Node*next = gr.nodes[path.back()]->SampleNext(); - if (!next) { - break; - } - path.push_back(next->id); - } - if (!found) { - continue; - }*/ - if (join != 0) { vector join_path; int join_num; @@ -686,28 +649,8 @@ bool ExtendPaths(vector >& new_paths, Graph& gr, int threshold, } new_paths.push_back(path); } else { - /* if (path.back() == paths[inner_join.first][inner_join.second]) { - for (int i = inner_join.second + 1; i < paths[inner_join.first].size(); i++) { - path.push_back(paths[inner_join.first][i]); - } - new_paths[inner_join.first].resize(inner_join.second+1); - new_paths.erase(new_paths.begin() + rp); - new_paths.push_back(path); - } else if (path.back()^1 == paths[inner_join.first][inner_join.second]) { - for (int i = inner_join.second - 1; i >= 0; i--) { - path.push_back(paths[inner_join.first][i]^1); - } - new_paths[inner_join.first].erase( - new_paths[inner_join.first].begin(), - new_paths[inner_join.first].begin() + inner_join.second); - new_paths.erase(new_paths.begin() + rp); - new_paths.push_back(path); - } else { - assert(false); - }*/ new_paths.erase(new_paths.begin() + rp); new_paths.push_back(path); - // printf("path join %d %d %d\n", rp, inner_join.first, inner_join.second); } if (!found) { return false;