Open reubenthomas opened 5 years ago
Hi @reubenthomas ,
internally, a lot of the zinbwave functions have features in columns and genes in rows, hence, we developed these functions thinking in the same manner. But you're right, we should change these to behave like the other user-facing functions, assuming features in rows and samples in columns.
To be clear, if you pass a matrix with features in rows and samples in columns, it will give you the right answer, but it's somewhat inconvenient that these functions expect your data in a different format. I will change them before the next Bioc release. Thanks for noticing!
Hi Davide,
I looked at the code for the functions zinbAIC and zinbBIC. It seems like the rows and columns are switched in the if function:
if ((nSamples(model) != nrow(x))|(nFeatures(model) != ncol(x))) { stop("x and model should have the same dimensions!") }
Shouldn't the rows of the x data matrix correspond to the features (genes) and columns to the samples (cells)?
Thanks, -Reuben