smithlabcode / preseq

Software for predicting library complexity and genome coverage in high-throughput sequencing.
https://preseq.readthedocs.io
GNU General Public License v3.0
78 stars 16 forks source link

Redundancy in setting up RNG #46

Closed terencewtli closed 1 year ago

terencewtli commented 4 years ago

This part of the code is redundant because we set the internal RNG with srand, but then immediately define another RNG with a pre-defined value.

  // setup rng
  srand(time(0) + getpid());
  std::mt19937 rng(seed);
terencewtli commented 2 years ago

Update: this still occurs all over the code (eg. line 296 in v-3.1.2). Testing to see if removing srand changes anything

andrewdavidsmith commented 2 years ago

@terencewtli Do you know the status of this?