Commit 30ebde5f authored by WebTogz's avatar WebTogz

vidjil.cpp: export matrices to .json

parent 2153f604
......@@ -32,6 +32,7 @@
#include <unistd.h>
#include "core/tools.h"
#include "core/json.h"
#include "core/kmerstore.h"
#include "core/fasta.h"
#include "core/segment.h"
......@@ -277,6 +278,9 @@ int main (int argc, char **argv)
int options_s_k = 0 ;
//JsonArray which contains the Levenshtein distances
JsonArray jsonLevenshtein;
//$$ options: getopt
while ((c = getopt(argc, argv, "AhaG:V:D:J:k:r:R:vw:e:C:t:l:dc:m:M:N:s:p:Sn:o:Lx%:Z:z:u")) != EOF)
......@@ -743,6 +747,7 @@ int main (int argc, char **argv)
}
WindowsStorage *windowsStorage = we.extract(reads, index, w, delta_min,
delta_max, windows_labels);
windowsStorage->setIdToAll();
size_t nb_total_reads = we.getNbReads();
......@@ -1315,7 +1320,13 @@ int main (int argc, char **argv)
// compare_all(representatives_this_clone);
SimilarityMatrix matrix = compare_all(representatives_this_clone, true);
cout << RawOutputSimilarityMatrix(matrix, 90);
}
//Sort all windows
windowsStorage->sort();
//Compute all the edges
SimilarityMatrix matrixLevenshtein = compare_windows(*windowsStorage, Levenshtein, max_clones);
//Added distances matrix in the JsonTab
jsonLevenshtein << JsonOutputWindowsMatrix(matrixLevenshtein);
}
//$$ End of very_detailed_cluster_analysis
out_edges.close() ;
......@@ -1347,8 +1358,13 @@ int main (int argc, char **argv)
SimilarityMatrix matrix = compare_all(first_representatives, true,
representatives_labels);
cout << RawOutputSimilarityMatrix(matrix, 90);
}
//Sort all windows
windowsStorage->sort();
//Compute all the edges
SimilarityMatrix matrixLevenshtein = compare_windows(*windowsStorage, Levenshtein, max_clones);
//Added distances matrix in the JsonTab
jsonLevenshtein << JsonOutputWindowsMatrix(matrixLevenshtein);
}
delete scorer;
......@@ -1399,6 +1415,9 @@ int main (int argc, char **argv)
norm_list,
nb_segmented);
json->add("windows", jsonSortedWindows);
//Added edges in the json output file
json->add("links", jsonLevenshtein);
out_json << json->toString();
delete index ;
......
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