saezlab / MetaProViz

R-package to perform metabolomics pre-processing, differential metabolite analysis, metabolite clustering and custom visualisations.
https://saezlab.github.io/MetaProViz/
GNU General Public License v3.0
8 stars 0 forks source link

Fetch error Shapiro test #74

Closed ChristinaSchmidt1 closed 7 months ago

ChristinaSchmidt1 commented 9 months ago

The shapiro test can only process sample sizes between 3 and 5000. Error in shapiro.test(x) : sample size must be between 3 and 5000

Even tough it is highly unlikely that someone has over 5000 samples for a condition, we should add a catch error in the function. In the case that we have more samples in a condition, we can catch the error and perform the shapiro test only on the first 5000 samples of the condition and give a warning to the user. If we have 2 samples per condition we can give a warning that the shapiro test is not performed as there are not enough samples per condition. All of the above can be done within the shapiro test helper function and we could check the number of samples per condition and proceed accordingly within the function.

Error in shapiro.test(x) : sample size must be between 3 and 5000

ChristinaSchmidt1 commented 7 months ago

Done.