Commit deb63e35 authored by Mathieu Giraud's avatar Mathieu Giraud

core/labels.{h,cpp), vidjil.cpp: default value for labels

Interesting sequences *always* have labels.
parent dd18ed6d
......@@ -5,7 +5,7 @@
#include "tools.h"
void load_into_map(map <string, string> &the_map, string map_file)
void load_into_map(map <string, string> &the_map, string map_file, string default_value)
{
// Loads a simple file with key, values into a map
......@@ -34,8 +34,11 @@ void load_into_map(map <string, string> &the_map, string map_file)
string key = line.substr(0, i);
string value = line.substr(i+1, string::npos);
nb_keys++ ;
the_map[key] = value + " " + the_map[key];
nb_keys++ ;
if (!value.length())
value = default_value;
the_map[key] = value + (the_map[key].length() ? " " : "") + the_map[key];
}
}
......
......@@ -6,5 +6,5 @@
#include <list>
#include "fasta.h"
void load_into_map(map <string, string> &the_map, string map_file);
void load_into_map(map <string, string> &the_map, string map_file, string default_value);
......@@ -767,7 +767,7 @@ int main (int argc, char **argv)
out_dir += "/" ;
/// Load labels ;
load_into_map(windows_labels, windows_labels_file);
load_into_map(windows_labels, windows_labels_file, "-l");
switch(command) {
case CMD_WINDOWS: cout << "Extracting windows" << endl;
......
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