Skip to content

Commit 54bda13

Browse files
authored
Refactor graph loading and processing logic
1 parent 756f8da commit 54bda13

1 file changed

Lines changed: 17 additions & 11 deletions

File tree

src/main.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -522,15 +522,20 @@ int main(int argc, char** argv) {
522522
SDBG sdbg;
523523
string graph_folder_old = settings.graph_folder;
524524
settings.graph_folder+="/graph";
525-
//settings.graph_folder="/vol/d/development/git/mcaat_master/optimizations/mcaat/build/mcaat_run_2025-12-29_11-15-30/graph/graph";
526-
char * cstr = new char [settings.graph_folder.length()+1];
525+
char * cstr = new char [settings.graph_folder.length()+1];
527526
std::strcpy (cstr, settings.graph_folder.c_str());
528527
cout << "Graph folder: " << cstr << endl;
529528
sdbg.LoadFromFile(cstr);
530529
cout << "Loaded the graph" << endl;
531530
settings.sdbg = &sdbg;
531+
532532
// %% LOAD GRAPH %%
533+
// %% LOAD GRAPH %%
534+
// per graph calculate in and outdegree distributions of all multiplicity>=2 nodes
533535

536+
delete[] cstr;
537+
538+
534539
// %% FBCE ALGORITHM %%
535540
cout << "FBCE START:" << endl;
536541
auto start_time = chrono::high_resolution_clock::now();
@@ -539,21 +544,22 @@ int main(int argc, char** argv) {
539544
auto cycles_map = cycle_finder.results;
540545
cout << "Number of nodes in results: " << cycles_map.size() << endl;
541546
// %% FBCE ALGORITHM %%
542-
int number_of_spacers = 0;
543547
// %% FILTERS %%
544-
cout << "FILTERS START:" << endl;
545-
Filters filters(sdbg, cycles_map);
546-
auto SYSTEMS = filters.ListArrays(number_of_spacers);
547-
cout<< "Number of spacers: " << number_of_spacers << " before cleaning"<<endl;
548+
// cout << "FILTERS START:" << endl;
549+
// Filters filters(sdbg, cycles_map);
550+
// auto SYSTEMS = filters.ListArrays(number_of_spacers);
551+
// cout<< "Number of spacers: " << number_of_spacers << " before cleaning"<<endl;
548552
//%% POST PROCESSING %%
549553
cout << "POST PROCESSING START:" << endl;
550-
CRISPRAnalyzer analyzer(SYSTEMS, settings.output_file);
551-
analyzer.run_analysis();
552-
cout << "Saved in: " << settings.output_file << endl;
554+
PostProcessor processor(settings);
555+
processor.run_analysis();
556+
cout << "Saved in: " << settings.output_folder << endl;
553557
//%% POST PROCESSING %%
554558

555559
// %% DELETE THE GRAPH FOLDER %%
556-
fs::remove_all(graph_folder_old);
560+
561+
//fs::remove_all(graph_folder_old);
562+
std::cout << "Removed folder: " << graph_folder_old << std::endl;
557563
// %% DELETE THE GRAPH FOLDER %%
558564

559565
/*

0 commit comments

Comments
 (0)