Commit 49c48412 authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp: uses different seeds (of weights 10, 12, 13) depending on the germline

We have to set k in a way that there is very few common k-mers between the V and J germline.
This depends on the system.
parent a8cc74c9
......@@ -89,10 +89,10 @@ enum { CMD_WINDOWS, CMD_ANALYSIS, CMD_SEGMENT } ;
// "tests/data/leukemia.fa"
#define DEFAULT_K 10
#define DEFAULT_K 0
#define DEFAULT_W 40
#define DEFAULT_W_D 60
#define DEFAULT_SEED "#####-#####"
#define DEFAULT_SEED ""
#define DEFAULT_DELTA_MIN -10
#define DEFAULT_DELTA_MAX 20
......@@ -142,9 +142,10 @@ void usage(char *progname)
<< "Window prediction" << endl
#ifndef NO_SPACED_SEEDS
<< " -s <string> spaced seed used for the V/J affectation (default: " << DEFAULT_SEED << ")" << endl
<< " -s <string> spaced seed used for the V/J affectation" << endl
<< " (default: #####-#####, ######-######, #######-#######, depends on germline)" << endl
#endif
<< " -k <int> k-mer size used for the V/J affectation (default: " << DEFAULT_K << ")" << endl
<< " -k <int> k-mer size used for the V/J affectation (default: 10, 12, 13, depends on germline)" << endl
<< " -w <int> w-mer size used for the length of the extracted window (default: " << DEFAULT_W << ")(default with -d: " << DEFAULT_W_D << ")" << endl
<< endl
......@@ -452,6 +453,31 @@ int main (int argc, char **argv)
//$$ options: post-processing+display
// Default seeds
#ifndef NO_SPACED_SEEDS
if (k == DEFAULT_K)
{
if (germline_system.find("TRA") != string::npos)
seed = "#######-######" ;
else if ((germline_system.find("TRB") != string::npos)
|| (germline_system.find("IGH") != string::npos))
seed = "######-######" ;
else // TRD, TRG, IGK, IGL
seed = "#####-#####" ;
k = seed_weight(seed);
}
#else
{
cout << "Vidjil was compiled with NO_SPACED_SEEDS: please provide a -k option." << endl;
exit(1) ;
}
#endif
#ifndef NO_SPACED_SEEDS
// Check seed buffer
if (seed.size() >= MAX_SEED_SIZE)
......
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