Mentions légales du service

Skip to content
Snippets Groups Projects
Commit bca32eef authored by BOULLE Olivier's avatar BOULLE Olivier
Browse files

decrease score requirement, close files

parent 93fd0536
No related branches found
No related tags found
No related merge requests found
......@@ -52,11 +52,11 @@ std::string get_cluster_id(const std::string& read, const std::string& seq_to_fi
SmithWaterman(read_rc, seq_to_find, score_rc, x_rc, y_rc);
if (score_fw >= score_rc) { // primer found in forward sequence
if (score_fw >= 8 && read.size() > y_fw + split_level) {
if (score_fw >= 7.5 && read.size() > y_fw + split_level) {
return read.substr(y_fw, split_level);
}
} else { // primer found in reverse complement sequence
if (score_rc >= 8 && read_rc.size() > y_rc + split_level) {
if (score_rc >= 7.5 && read_rc.size() > y_rc + split_level) {
return read_rc.substr(y_rc, split_level);
}
}
......@@ -124,7 +124,7 @@ void process_file_part(const std::string& input_filename, int part_id, int start
continue; // reject the read
}
// lock the mutex for this output file
// lock the mutex for this output file until the end of this loop iteration
std::lock_guard<std::mutex> lock(output_mutexes[cluster_id]);
// write the sequence and its id to a cluster file corresponding to the bases found after the primer
......@@ -134,8 +134,10 @@ void process_file_part(const std::string& input_filename, int part_id, int start
return;
}
output_file << ">" << read_name << "\n" << sequence << "\n"; // output format is fasta
output_file.close();
}
input_read_file.close();
}
......@@ -155,7 +157,7 @@ int main(int argc, char* argv[]) {
int n_thread; // number of threads used, default = maximum possible
if (argc == 4) {
n_thread = std::thread::hardware_concurrency();
n_thread = 1;//std::thread::hardware_concurrency();
} else {
n_thread = std::stoi(argv[4]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment