You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello again. Having resolved the overflow issue (#14), I have proceeded with my work to find another bizarre bug. First of all, I'd like to reiterate that I no longer have issues with the number of features. The following code with synthetic data runs perfectly fine:
n.features <- 60000
n.samples <- 80
sample.counts <- rpois(n.features*n.samples, 1000) %>% matrix(nrow=n.samples, ncol=n.features)
phs <- propr(sample.counts, metric='phs')
Alert: Saving log-ratio transformed counts to @logratio.
Alert: Fixing permutations to active random seed.
Alert: Use '[' to index proportionality matrix.
Alert: Use 'updateCutoffs' to calculate FDR.
Now on to the new issue. It seems that propr can't handle an odd number of features. Here is an example
n.features <- 100 + 1
n.samples <- 10
sample.counts <- rpois(n.features*n.samples, 1000) %>% matrix(nrow=n.samples, ncol=n.features)
phs <- propr(sample.counts, metric='phs')
Alert: Saving log-ratio transformed counts to @logratio.
Alert: Fixing permutations to active random seed.
Error in labRcpp(ncol(lr)) :
Index out of bounds: [index=5000; extent=5000].
Here's the traceback
3. stop(structure(list(message = "Index out of bounds: [index=5000; extent=5000].", call = labRcpp(ncol(lr)), cppstack = NULL), class = c("Rcpp::index_out_of_bounds", "C++Error", "error", "condition")))
2. labRcpp(ncol(lr))
1. propr(sample.counts, metric = "phs")
The same thing happens with any odd number of features and never happens with an even number. To be clear, I'm running propr installed from the master branch with my PR. The PR hasn't changed any logic, so it shouldn't be at fault.
The text was updated successfully, but these errors were encountered:
I take my words back. It was my PR that broke things. Reordering int llt = nfeats * (nfeats - 1) / 2; into int llt = (nfeats / 2) * (nfeats - 1); solves the overflow issue, but it introduces a problem with integer division and rounding.
Hello again. Having resolved the overflow issue (#14), I have proceeded with my work to find another bizarre bug. First of all, I'd like to reiterate that I no longer have issues with the number of features. The following code with synthetic data runs perfectly fine:
Now on to the new issue. It seems that
propr
can't handle an odd number of features. Here is an exampleHere's the traceback
The same thing happens with any odd number of features and never happens with an even number. To be clear, I'm running
propr
installed from the master branch with my PR. The PR hasn't changed any logic, so it shouldn't be at fault.The text was updated successfully, but these errors were encountered: