add additional track/layer on the circus plot

Hello everyone,
I would be grateful if someone can help me on how to add additional layer(track) on a circus plot below. The plot showing the interaction between ligand coding genes and receptor coding genes in two cells( cell E and cell F). The green line tells genes coding ligand in both cells. Whereas, the dark blue line indicates the receptor genes.

From those indicated genes, on a separate analysis, Ligand gene "APP" and "IGF" and receptor gene "MMP2" in the cell F is correlated to BMI. Additionally, ligand gene "CALR" and receptor gene "FBN1" are correlated to fasting glucose in the F cell. Similarly in the E cell, "INSR" is gene is correlated to fasting glucose, and "CD93" and "FN1" are correlated to BMI. So basically I want to add another track(layer) on the circus plot to indicate these fasting glucose and BMI correlated genes.

here is the data and the code and using the code I manage to plot the circus plot but could not able to add additional layers to highlight those genes.

# library
library(circlize)
library(randomcoloR)
library(tidyverse)
library(RColorBrewer)
library(iTALK)

# simulated data
df <- data.frame(pcc = c(0.9,0.9,0.9,0.9,0.8,0.7,0.6,0.4,0.7,0.5),
                   ligand =c("APP","PECAM1","IGF1","PLAT","CD93","ITGB3","JAG1","CALR","CALR","FN1"),
                   receptor = c("NOTCH2","MMP2","INSR","ITGAM","COL1A1","FBN1","NOTCH2","ITGA3","ITGB3","IL17RC"),
                   cell_from = c("F","E","F","F","E","E","F","F","E","E"),
                   cell_to = c("E","F","E","E","F","F","E","E","F","F"),
                   comm_type = c("other","other","other","other","other","other","other","other","other","other"))

## circus plot
cell_coldata <- structure(c('darkorange', 'darkmagenta'),names=unique(c(df$cell_from, df$cell_to)))
iTALK::LRPlot(df, 
              link.arr.col = ifelse(df$pcc > 0, "#B2182B", "#2166ac"),
              datatype='mean count',
              cell_col=cell_coldata)

best Ad

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.