Hello,
I use vegane::rarefy to rarefy my community datasets. Because I have a lot of samples and and the sampling depth (it's sequencing data) is quite uneven, I choose to rarefy at depth X and exclude samples with N < X.
however, the function attempts to rarefy each community and throws the error cannot take a sample larger than the population when replace = FALSE
Therefore I always have to manually exclude those samples first. I was wondering if it wouldn't be possible to handle this internally? i.e exclude all samples with N < X and issue a warning along the lines of WARNING: the following samples had less counts than the chosen rarefaction depth and where therefore excluded from the dataset: sample[1], sample[6] (...)
If you agree that this behaviour would be desirable, I could also rewrite the function and submit it as a pull request.
thanks for providing this great resource!
best
Fabian
Hello,
I use
vegane::rarefyto rarefy my community datasets. Because I have a lot of samples and and the sampling depth (it's sequencing data) is quite uneven, I choose to rarefy at depth X and exclude samples with N < X.however, the function attempts to rarefy each community and throws the error
cannot take a sample larger than the population when replace = FALSETherefore I always have to manually exclude those samples first. I was wondering if it wouldn't be possible to handle this internally? i.e exclude all samples with N < X and issue a warning along the lines of
WARNING: the following samples had less counts than the chosen rarefaction depth and where therefore excluded from the dataset: sample[1], sample[6] (...)If you agree that this behaviour would be desirable, I could also rewrite the function and submit it as a pull request.
thanks for providing this great resource!
best
Fabian