Question: How To Make Visual Graphs To Represent Common Transcription Factor Binding Sites In Different Enhancers?
2
gravatar for Diana
6.0 years ago by
Diana770
Germany
Diana770 wrote:

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 transcription graphs • 3.1k views
ADD COMMENTlink modified 6.0 years ago by Sean Davis25k • written 6.0 years ago by Diana770
5
gravatar for Sean Davis
6.0 years ago by
Sean Davis25k
National Institutes of Health, Bethesda, MD
Sean Davis25k wrote:

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 COMMENTlink modified 6.0 years ago • written 6.0 years ago by Sean Davis25k

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

ADD REPLYlink written 6.0 years ago by Diana770

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 REPLYlink modified 6.0 years ago • written 6.0 years ago by Sean Davis25k

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 REPLYlink written 6.0 years ago by Diana770

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

ADD REPLYlink written 6.0 years ago by Sean Davis25k

Thanks a lot!!! it works!

ADD REPLYlink written 6.0 years ago by Diana770
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1388 users visited in the last hour