I have Chip-Seq data for two transcription factor (TF1,TF2) and they have significant numbers of peaks overlapped (MACS2 Peak calling) and I want to plot linear correlation between the signal of TF1 and TF2 peaks in the shared binding sites. Please guide me. Thank you
You can do something like this for your shared binding site in R.
library(ggplot2)#Creating data for your TF signals
TF1_S <- c(3.2,4.5,5.6,2.1,6.7)
TF2_S <- c(2.8,3.9,5.0,1.8,6.2)#Create dataframe
data <- data.frame(TF1 = TF1_S, TF2 = TF2_S)#Calculate Correlation using `cor()` function
correlation_coefficient <- cor(data$TF1, data$TF2)#Plot correlation Scaterplot in ggplot2
ggplot(data, aes(x = TF1, y = TF2))+ geom_point()+
labs(title ="Linear Correlation between TF1 and TF2 Peaks",
x ="TF1 Signal", y ="TF2 Signal")+
geom_smooth(method ="lm", se =FALSE, color ="red")+
geom_text(x = min(data$TF1), y = max(data$TF2), label = paste("Correlation:", round(correlation_coefficient,2)))
ADD COMMENT
• link
updated 22 months ago by
Ram
45k
•
written 22 months ago by
bk11
★
3.1k
0
Entering edit mode
Where do you get TF signals from? I have bigwig file for TFs. How to get signal from these files?
Please use more descriptive titles. Also, don't repeat your titles across multiple questions. Plus, don't copy paste your title in the tags field.