Commit afda8374 authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Mikaël Salson

algo/vidjil.cpp: remove 'kmer_size', streamline code

'-k' only sets the seed. We do not need anymore to remember its value.
parent 493f7167
......@@ -325,7 +325,6 @@ int main (int argc, char **argv)
string comp_filename = COMP_FILENAME;
int kmer_size = DEFAULT_K ;
int wmer_size = DEFAULT_W ;
IndexTypes indexType = KMER_INDEX;
......@@ -490,7 +489,6 @@ int main (int argc, char **argv)
case 's':
#ifndef NO_SPACED_SEEDS
seed = string(optarg);
kmer_size = seed_weight(seed);
options_s_k++ ;
#else
cerr << "To enable the option -s, please compile without NO_SPACED_SEEDS" << endl;
......@@ -498,7 +496,7 @@ int main (int argc, char **argv)
break;
case 'k':
kmer_size = atoi(optarg);
int kmer_size = atoi(optarg);
seed = seed_contiguous(kmer_size);
options_s_k++ ;
break;
......@@ -681,14 +679,9 @@ int main (int argc, char **argv)
// Default seeds
#ifndef NO_SPACED_SEEDS
if (kmer_size == DEFAULT_K)
#ifdef NO_SPACED_SEEDS
if (seed.size() == 0)
{
seed = SEED_S10 ;
kmer_size = seed_weight(seed);
}
#else
{
cerr << ERROR_STRING << "Vidjil was compiled with NO_SPACED_SEEDS: please provide a -k option." << endl;
exit(1) ;
}
......@@ -964,6 +957,8 @@ int main (int argc, char **argv)
int total_length = 0 ;
int s = index->getS();
int kmer_size = seed_weight(seed);
while (reads->hasNext())
{
reads->next();
......
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