Closed ewijaya closed 4 years ago
First, you need remove the empty spaces in df
.
df[[1]] = gsub("^\\s+|\\s+$", "", df[[1]])
df[[2]] = gsub("^\\s+|\\s+$", "", df[[2]])
For you question, you just append an interaction of "Cxcr2 Cxcr2" to df
.
# I converted df to a data frame
df2 = rbind(df, data.frame(ligand = "Cxcr2", receptor = "Cxcr2"))
chordDiagram(df2)
You can also have a look at this link: https://jokergoo.github.io/circlize_book/book/the-chorddiagram-function.html#self-links
I have the following data, using Circlize package:
And with this code:
I can make this plot:
As stated in the plot above, how cand I bind the start and end of the link with the same target and source value?
So for example,
Cxcr1
will only have one block as the sender with gray color.