Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 1d8b517d authored by Mathieu Giraud's avatar Mathieu Giraud

core/segment.cpp, tests: json output, update seg.evalue format

parent 05442c65
......@@ -1195,16 +1195,20 @@ json FineSegmenter::toJson(){
return seg;
}
json toJsonSegVal(string s) {
return {{"val", s}};
}
json KmerSegmenter::toJson() {
json seg;
int sequenceSize = sequence.size();
if (evalue > NO_LIMIT_VALUE)
seg["_evalue"] = scientific_string_of_double(evalue);
seg["evalue"] = toJsonSegVal(scientific_string_of_double(evalue));
if (evalue_left > NO_LIMIT_VALUE)
seg["_evalue_left"] = scientific_string_of_double(evalue_left);
seg["evalue_left"] = toJsonSegVal(scientific_string_of_double(evalue_left));
if (evalue_right > NO_LIMIT_VALUE)
seg["_evalue_right"] = scientific_string_of_double(evalue_right);
seg["evalue_right"] = toJsonSegVal(scientific_string_of_double(evalue_right));
seg["affectValues"] = {
{"start", 1},
......
......@@ -50,4 +50,4 @@ $ Second sequence has a DNA sequence provided
1:"id": "CTGTGCGAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACTACTA".*"sequence": "[ACGT]+",
$ Second sequence also has evalues
1:"id": "CTGTGCGAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACTACTA".*"_evalue": "[0-9\.e-]+"
1:"id": "CTGTGCGAGAGGTTACTATGATAGTAGTGGTTATTACGGGGTAGGGCAGTACTACTACTA".*"evalue": ."val": "[0-9\.e-]+"
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