Closed brendbech closed 2 years ago
Hi there
Thanks for the proposed fix, I've implemented something similar. But empty samples shouldn't really be present in the first place, the problem is upstream in the data processing. But I've added a check for empty samples and a warning in amp_load
, and made amp_rarecurve
handle empty samples, though nothing will be visible in the plot anyways.
Hello
I've run into a bug in your amp_rarecurve() function . With the following code i get the following error:
The error occurred only for certain phyloseq objects, so i was pretty sure it had something to do with the data.
I did a little digging and found out that the error occurs when
tot[i]
has no reads, meaning it is 0, and therefore the sequence tries to go from 1 to 0 by a stepsize of 1000. Obviously this does not work. I fixed it by usingtrace(edit = TRUE)
, editing line 17 (It might not be the true line number). This fixed the bug for me, but i'm not sure if it will work for everybody.Here is the fix: