I have the following dataframe:
stat mTADs DE_genes
5267 -5.452819 chr2:167337500-167447500 chr2:167318145-167341673:+
5268 4.114012 chr6:41532500-41642500 chr6:41555481-41570508:+
5269 9.812369 chr10:18157500-18262500 chr10:18259929-18265882:-
5270 3.371969 chr17:40957500-41062500 chr17:41060000-41071996:-
5271 4.576930 chr17:40957500-41062500 chr17:41012431-41017507:-
5272 2.952151 chr11:72251250-72352500 chr11:72254857-72265270:+
5273 -3.349795 chr1:174307500-174407500 chr1:174405489-174408706:+
5274 -2.685897 chr13:100777500-100877500 chr13:100787949-100874025:-
5275 2.865269 chr13:100777500-100877500 chr13:100718488-100785594:-
5276 6.436959 chr4:150417500-150517500 chr4:150377761-150418774:-
5277 2.622196 chr7:6072500-6162500 chr7:6123828-6142951:+
5278 -5.605531 chr11:48597500-48682500 chr11:48675470-48685185:-
5279 3.554733 chr11:48597500-48682500 chr11:48639642-48665711:+
5280 4.399655 chr11:48597500-48682500 chr11:48638848-48640157:-
As you see some DE_genes fall within the same mTAD. I would like to plot for all the DE_genes their stat values and group them by mTAD. I thought of doing this as a horizontal barplot having on the yaxis the genes, and on the x axis the stat values and group them by TAD but first i do not know how to do it and second i thought that a heatmap might be a better option. Is there any way to do that in R? In total I have 1700 mTADs and I would like to see if there are any patterns in the data.
Many thanks, Dimitris