Skip to content

behaviour of rrarefy() #144

Description

@FabianRoger

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions