waldronlab / lefser

R implementation of the LEfSe method
https://waldronlab.io/lefser/
38 stars 6 forks source link

Check whether this random number generation step is necessary #45

Closed shbrief closed 2 weeks ago

shbrief commented 2 weeks ago
          It turns out there is a random number generation: 

https://github.com/waldronlab/lefser/blob/642ba43c633a1ceb28130e52a1ae7f5595e8f416/R/lefser.R#L68-L69

The createUniqueValues function ensures that more than half of the values for each feature are unique. If that is not the case, then a count value is altered by adding it to a small value generated via normal distribution with mean=0 and sd=5% of the count value.

Originally posted by @shbrief in https://github.com/waldronlab/lefser/issues/42#issuecomment-2171757266

shbrief commented 2 weeks ago

This step is to ensure that more than half of the values for each feature are unique. In most cases, inputs are sparse, so in practice, this step is handling 0s.