CellChat
CellChat copied to clipboard
Error in netVisual_heatmap when remove.isolate = TRUE
Great package! I noticed a small error in the netVisual_heatmap function when remove.isolate = TRUE. It is caused by a duplicate removal of the idx in the following code snippet:
if (remove.isolate) {
idx1 <- which(Matrix::rowSums(net) == 0)
idx2 <- which(Matrix::colSums(net) == 0)
idx <- intersect(idx1, idx2)
net <- net[-idx, ]
net <- net[, -idx]
if (length(idx) > 0) {
net <- net[-idx, ]
net <- net[, -idx]
}
}