X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=alg%2Fnway_paths.cpp;h=85ae0071fec44caf2396a80b82c93c16b9f43207;hp=e7a8474b9ce062d7cafd47cdbe88855d81f3405b;hb=0c4b689c8f8540a6ab60d98c67637cdb13996ba2;hpb=03d92f51588c1cd45178321a86cb3aacb80a0f33 diff --git a/alg/nway_paths.cpp b/alg/nway_paths.cpp index e7a8474..85ae007 100644 --- a/alg/nway_paths.cpp +++ b/alg/nway_paths.cpp @@ -173,7 +173,7 @@ NwayPaths::save(fs::path save_file_path) // add a function para new_thres defaults to -1 to later deal with // reanalysis with higher thres - if statement whether to record base thres // or new thres (ie if -1, then base) - save_file << " thres=" << threshold << " >\n"; + save_file << " thres=" << threshold << " soft_thres=" << soft_thres << " >\n"; path_i = refined_pathz.begin(); paths_end = refined_pathz.end(); @@ -258,7 +258,23 @@ NwayPaths::load(fs::path load_file_path) data = file_data_line.substr(equal_split_i+1); threshold = atoi (data.c_str()); file_data_line = file_data_line.substr(space_split_i+1); - + // get cur_threshold + //std::cout << "file_data_line: " << file_data_line << "\n"; + //std::cout << "find(\">\"): " << file_data_line.find(">") << "\n"; + if (file_data_line.find(">") != 0) + { + space_split_i = file_data_line.find(" "); + header_data = file_data_line.substr(0,space_split_i); + equal_split_i = header_data.find("="); + data = file_data_line.substr(equal_split_i+1); + soft_thres = atoi (data.c_str()); + file_data_line = file_data_line.substr(space_split_i+1); + } + else + { + soft_thres = threshold; + } + //std::cout << "nway_soft_thres: " << soft_thres << "\n"; //cout << "seq_num=" << species_num << " win=" << win_size; //cout << " thres=" << threshold << endl;