Commit 000a7728 authored by Mathieu Giraud's avatar Mathieu Giraud

vidjil.cpp: e-value check depends on the (approximate) number of reads

parent 003789c0
......@@ -811,6 +811,10 @@ int main (int argc, char **argv)
cout << "Germlines loaded" << endl ;
cout << *multigermline ;
cout << endl ;
// Number of reads for e-value computation
int nb_reads_for_evalue = (expected_value > NO_LIMIT_VALUE) ? nb_sequences_in_fasta(f_reads, true) : 1 ;
//////////////////////////////////
//$$ Read sequence files
......@@ -959,7 +963,8 @@ int main (int argc, char **argv)
we.setAffectsOutput(out_affects);
}
WindowsStorage *windowsStorage = we.extract(reads, multigermline, w, windows_labels, max_reads_processed, only_nth_read, keep_unsegmented_as_clone, expected_value);
WindowsStorage *windowsStorage = we.extract(reads, multigermline, w, windows_labels, max_reads_processed, only_nth_read, keep_unsegmented_as_clone,
expected_value, nb_reads_for_evalue);
windowsStorage->setIdToAll();
size_t nb_total_reads = we.getNbReads();
......@@ -1255,7 +1260,7 @@ int main (int argc, char **argv)
seg.toJsonList(&json_seg);
// Re-launch also a KmerMultiSegmenter, for control purposes (affectations, evalue)
KmerMultiSegmenter kmseg(seg.getSequence(), multigermline, 0, expected_value);
KmerMultiSegmenter kmseg(seg.getSequence(), multigermline, 0, expected_value, nb_reads_for_evalue);
KmerSegmenter *kseg = kmseg.the_kseg ;
kseg->toJsonList(&json_seg);
if (verbose)
......
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