Closed matrs closed 3 years ago
Hello,
I think you have been mislead by the name of this function. Despite its name, it is not the same as a rarefaction from ecology. I will change its name!
This function will only consider if genes are present (1) or absent (0) in a genome, not their copy number. Next, it will permute the ordering of the genomes, and then compute the cumulative sum of genes being present after including 0,1,2,... genomes. Since it always ends by including all genomes, all curves end at the total number of genes each time.
I would have a look at the rarefy() function of the vegan-package, could this be what you are seeking?
Hello Lars,
thanks for your clear explanation. Indeed, I was mislead by the name of the function, although it's my fault for not checking the details of the code. I'm a biologist but I'm new to this field, so I'm clueless about how commonly this confusion could arise.
The function you mention from vegan
looks like the one I was looking for. Thanks for your help.
Jose Luis
Hello, thanks for this library, it's been very useful to me. I'm working with a table of orthougroups from
orthofinder
, which looks like this when converted into a matrix to use it withmicropan v2.1
When I compute the rarefaction curves with
rar_tbl_all <- rarefaction(m_all, n.perm = 1000)
, I noticed that the boxplots always have the same maximum value for every permutation. When I checked therar_table_all
, I see that for every permutation, It has multiple values equal to14596
:What could be a cause for this behaviour?