How To Make Visual Graphs To Represent Common Transcription Factor Binding Sites In Different Enhancers?
1
2
Entering edit mode
8.1 years ago
Diana ▴ 850

Hi all,

I have a file that has enhancers in 1st column and the name of transcription factor in 2nd column for which it has binding sites. I want to see this data visually so I can know which enhancers share similar transcription factor binding sites. How can I make a heatmap out of it? or any other visual graph that would allow me to do this?Because if i want to make a heatmap out of it, I'll have to make a table with enhancers in rows and transcription factors in columns and I cant do that manually as I have a huge data list. My data looks like this:

Enhancer        TF
Gene1_Enhancer1    Arid3a
Gene1_Enhnacer1    Ascl2
Gene1_Enhancer1 EBP
Gene1_Enhancer2    ETS1
Gene2_Enhancer1    ETS1
Gene2_Enhancer1    Hltf
Gene3_Enhancer1 Hoxa4
Gene3_Enhancer2    Hoxa7
Gene4_Enhancer1    Hoxa4

Thanks a lot!!!

r heatmap graphs transcription • 3.8k views
ADD COMMENT
5
Entering edit mode
8.1 years ago

If you data are in a two-column data frame called "dat" with column names "Enhancer" and "TF", see how this works for you:

library(ggplot2)
ggplot(as.data.frame(table(dat)),aes(y=Enhancer,x=TF)) + geom_tile(aes(fill=factor(Freq))) + theme(legend.position = "none")

Output

ADD COMMENT
0
Entering edit mode

Thanks a lot for your reply. I'm getting this error: Error in initFields(scales = scales) : could not find function "initRefFields"

ADD REPLY
0
Entering edit mode

Looks like an upgrade might be in your future: http://stackoverflow.com/questions/9863604/ggplot2-error-in-initfields . Could you post the output of sessionInfo()?

ADD REPLY
0
Entering edit mode

sessionInfo() R version 2.14.0 (2011-10-31) Platform: i386-pc-mingw32/i386 (32-bit)

locale: [1] LCCOLLATE=EnglishUnited Kingdom.1252 LCCTYPE=EnglishUnited Kingdom.1252 LCMONETARY=EnglishUnited Kingdom.1252 [4] LCNUMERIC=C LCTIME=English_United Kingdom.1252

attached base packages: [1] grid stats graphics grDevices utils datasets methods base

other attached packages: [1] gplots2.11.0 MASS7.3-16 KernSmooth2.23-6 caTools1.14 gdata2.12.0 gtools2.7.0 ggplot2_0.9.3

loaded via a namespace (and not attached): Error in x[["Version"]] : subscript out of bounds In addition: Warning message: In FUN(c("bitops", "colorspace", "dichromat", "digest", "gtable", : DESCRIPTION file of package 'digest' is missing or broken

ADD REPLY
0
Entering edit mode

Yep. You'll need to upgrade R. The stackoverflow post I noted above applies to you.

ADD REPLY
0
Entering edit mode

Thanks a lot!!! it works!

ADD REPLY

Login before adding your answer.

Traffic: 1572 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6