diff --git a/DESCRIPTION b/DESCRIPTION index 3357f75..e9e7375 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,8 +8,8 @@ Description: The dada2 package infers exact amplicon sequence variants (ASVs) fr removing substitution and chimera errors. Taxonomic classification is available via a native implementation of the RDP naive Bayesian classifier, and species-level assignment to 16S rRNA gene fragments by exact matching. -Version: 1.15.0 -Date: 2019-04-22 +Version: 1.15.1 +Date: 2020-02-19 Maintainer: Benjamin Callahan Author: Benjamin Callahan , Paul McMurdie, Susan Holmes License: LGPL-3 diff --git a/src/taxonomy.cpp b/src/taxonomy.cpp index 9658534..ab0dfbd 100644 --- a/src/taxonomy.cpp +++ b/src/taxonomy.cpp @@ -1,6 +1,8 @@ #include "dada.h" #include #include +#include + using namespace Rcpp; // Gets kmer index @@ -70,6 +72,9 @@ int get_best_genus(int *karray, double *out_logp, unsigned int arraylen, unsigne double p, logp, max_logp = 1.0; // Init value to be replaced on first iteration double rv; // Dummy random variable unsigned int nmax=0; // Number of times the current max logp has been seen + std::random_device rd; //Will be used to obtain a seed for the random number engine + std::mt19937 gen(rd()); //Standard mersenne_twister_engine seeded with rd() + std::uniform_real_distribution<> cunif(0.0, 1.0); for(g=0;g