Using "pairLR.use" in netVisual_chord_gene()
I've been trying to specify the LR pair to be visualized using netVisual_chord_gene(), but kept getting errors: "pairLR.use should be a data frame with a signle column named either 'interaction_name' or 'pathway_name'", even when I provided the proper data frame with single column 'interaction_name'.
In the source code, the part that checks the column names seems to have a misplaced closing ")"
if (!is.data.frame(pairLR.use) | sum(c("interaction_name","pathway_name") %in% colnames(pairLR.use) == 0)) {
stop("pairLR.use should be a data frame with a signle column named either 'interaction_name' or 'pathway_name' ")
}
should be
if (!is.data.frame(pairLR.use) | sum(c("interaction_name","pathway_name") %in% colnames(pairLR.use)) == 0) {
stop("pairLR.use should be a data frame with a signle column named either 'interaction_name' or 'pathway_name' ")
}
Can you check this part and update it in a future release?
Thank you!
@ikarus97 Thank you! It was updated now.
I tried v 2.1.2 and v 2.2.0 and the bug seems to persist https://github.com/jinworks/CellChat/blob/346fb615aaefa3c1a2830ec2fe3a933c5f723c83/R/visualization.R#L2848