Closed SamGG closed 1 month ago
In fact, the following is even simpler:
fq <- fq[top$cluster_id, , drop = FALSE]
Sounds good. Thanks again for catching this. Edgy cases aren't my strong suit to think of ;) - will do along with issue #381.
Thanks. Edgy cases are very difficult to anticipate. This question is independent from #381.
Yes, absolutely, I only meant that I will try and resolve both with one update/version bump.
IIUC, when there is only one cluster left,
as.matrix()
results in a one column matrix instead of one row matrix. https://github.com/HelenaLC/CATALYST/blob/f3e294ed9a4d3f300feb994bb381df6a6b2c8309/R/plotDiffHeatmap.R#L243-L250 I propose to transpose y in such a case.if (nrow(top) == 1) y <- t(y)
In my hands, it works and permits to display a single significant cluster.