joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
569 stars 187 forks source link

Fixed paste error in rarefy_even_dept & improved efficiency #1630

Open salix-d opened 1 year ago

salix-d commented 1 year ago

Wanted to fix the message outputting the names of the samples pruned since there was no space between them.

Also made some changes to improve speed and memory usage, mainly : unlist(data.frame()) --> rep.int() and table() --> tabulate(). I added comment in the code for those changes. Also, merged some message functions and used @ when possible. I tested everything and it all passed; I updated the depricated functions in the tests as well.

With my data (33323 taxa and 384 samples), it's uses half the memory and runs ~28x faster with replace = FALSE which makes it as fast and memory efficient as with replace = TRUE.

edit: I also changed the check for rngseed because it wouldn't let me use 0.

salix-d commented 1 year ago

I did not update the doc of the replace argument though.