Commit 5c9296f9 authored by Mikaël Salson's avatar Mikaël Salson

vidjil.cpp: Fix definition of min_cover_representative

min_cover_representative should be seen as a strict minimum on the number of reads
that can support a representative sequence.
The purpose is to avoid a too low ABSOLUTE number of reads to define a representative.
For the relative number, it is ratio_representative's role.

Before, if we specified -r 100 we needed to have 100 corresponding
k-mers which is very strict when a clone has just slightly more than
100 reads
parent f2480705
...@@ -112,6 +112,11 @@ enum { CMD_WINDOWS, CMD_CLONES, CMD_SEGMENT, CMD_GERMLINES } ; ...@@ -112,6 +112,11 @@ enum { CMD_WINDOWS, CMD_CLONES, CMD_SEGMENT, CMD_GERMLINES } ;
#define DEFAULT_MAX_AUDITIONED 2000 #define DEFAULT_MAX_AUDITIONED 2000
#define DEFAULT_RATIO_REPRESENTATIVE 0.5 #define DEFAULT_RATIO_REPRESENTATIVE 0.5
#define DEFAULT_MIN_COVER_REPRESENTATIVE 3 // At least 3 reads to support a
// representative (consisting of at
// least
// DEFAULT_RATIO_REPRESENTATIVE of
// the clone's reads)
#define DEFAULT_KMER_THRESHOLD 1 #define DEFAULT_KMER_THRESHOLD 1
...@@ -682,7 +687,7 @@ int main (int argc, char **argv) ...@@ -682,7 +687,7 @@ int main (int argc, char **argv)
cout << "# using default sequence file: " << f_reads << endl ; cout << "# using default sequence file: " << f_reads << endl ;
} }
size_t min_cover_representative = (size_t) (min_reads_clone < (int) max_auditionned ? min_reads_clone : max_auditionned) ; size_t min_cover_representative = (size_t) min(min_reads_clone, DEFAULT_MIN_COVER_REPRESENTATIVE);
// Check seed buffer // Check seed buffer
if (seed.size() >= MAX_SEED_SIZE) 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