Commit bfad178f authored by Cyprien Borée's avatar Cyprien Borée

add clearSequences in windowsStorage and clear sequences before JSON export

For more informations see #3387.
parent 975d667b
Pipeline #33693 passed with stages
in 46 minutes and 19 seconds
...@@ -262,6 +262,9 @@ json WindowsStorage::computeDiversity(int nb_segmented) { ...@@ -262,6 +262,9 @@ json WindowsStorage::computeDiversity(int nb_segmented) {
return jsonDiversity; return jsonDiversity;
} }
void WindowsStorage::clearSequences(){
seqs_by_window.clear();
}
json WindowsStorage::sortedWindowsToJson(map <junction, json> json_data_segment, int max_json_output) { json WindowsStorage::sortedWindowsToJson(map <junction, json> json_data_segment, int max_json_output) {
json windowsArray; json windowsArray;
......
...@@ -220,7 +220,11 @@ class WindowsStorage { ...@@ -220,7 +220,11 @@ class WindowsStorage {
ostream &printSortedWindows(ostream &os); ostream &printSortedWindows(ostream &os);
json sortedWindowsToJson(map<junction, json> json_data_segment, int max_json_output); json sortedWindowsToJson(map<junction, json> json_data_segment, int max_json_output);
/**
* Clear the seqs_by_window map.
*/
void clearSequences();
/** /**
* Display a window with its in size in a somewhat FASTA format * Display a window with its in size in a somewhat FASTA format
*/ */
......
...@@ -1512,6 +1512,7 @@ int main (int argc, char **argv) ...@@ -1512,6 +1512,7 @@ int main (int argc, char **argv)
//json->add("links", jsonLevenshtein); //json->add("links", jsonLevenshtein);
//out_json << json->toString(); //out_json << json->toString();
windowsStorage->clearSequences();
json jsonSortedWindows = windowsStorage->sortedWindowsToJson(json_data_segment, max_clones_id); json jsonSortedWindows = windowsStorage->sortedWindowsToJson(json_data_segment, max_clones_id);
json reads_germline; json reads_germline;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment