Commit fb2a5905 authored by Mikaël Salson's avatar Mikaël Salson

vidjil.cpp, germline.{h,cpp}: Use default behaviour for delta_min (if not redefined by CLI)

We use the same constant as the ones that were defined in vidjil.cpp rather
than relying on hard-coded values.

See #2156
parent f80b4bc3
...@@ -105,11 +105,12 @@ Germline::Germline(string _code, char _shortcut, ...@@ -105,11 +105,12 @@ Germline::Germline(string _code, char _shortcut,
Germline::Germline(string code, char shortcut, string path, json json_recom, Germline::Germline(string code, char shortcut, string path, json json_recom,
int delta_min, string seed, int max_indexing) int delta_min, string seed, int max_indexing)
{ {
if (delta_min == ~0) {
int delta_min = -10; delta_min = DEFAULT_DELTA_MIN;
if (json_recom.find("4") != json_recom.end()) { if (json_recom.find("4") != json_recom.end()) {
delta_min = 0; delta_min = DEFAULT_DELTA_MIN_D;
}
} }
init(code, shortcut, delta_min, seed, max_indexing); init(code, shortcut, delta_min, seed, max_indexing);
......
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
#include "kmerstorefactory.hpp" #include "kmerstorefactory.hpp"
#include "bioreader.hpp" #include "bioreader.hpp"
#define DEFAULT_DELTA_MIN -10
#define DEFAULT_DELTA_MIN_D 0
enum SEGMENTATION_METHODS { enum SEGMENTATION_METHODS {
SEG_METHOD_53, // Regular or incomplete germlines, 5'-3' SEG_METHOD_53, // Regular or incomplete germlines, 5'-3'
SEG_METHOD_543, // Regular or incomplete germlines, 5'-3', with an additional middle gene (such a D gene) SEG_METHOD_543, // Regular or incomplete germlines, 5'-3', with an additional middle gene (such a D gene)
......
...@@ -107,10 +107,6 @@ enum { CMD_WINDOWS, CMD_CLONES, CMD_SEGMENT, CMD_GERMLINES } ; ...@@ -107,10 +107,6 @@ enum { CMD_WINDOWS, CMD_CLONES, CMD_SEGMENT, CMD_GERMLINES } ;
#define DEFAULT_W 50 #define DEFAULT_W 50
#define DEFAULT_SEED "" #define DEFAULT_SEED ""
#define DEFAULT_DELTA_MIN -10
#define DEFAULT_DELTA_MIN_D 0
#define DEFAULT_MAX_AUDITIONED 2000 #define DEFAULT_MAX_AUDITIONED 2000
#define DEFAULT_RATIO_REPRESENTATIVE 0.5 #define DEFAULT_RATIO_REPRESENTATIVE 0.5
......
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