I have this data from one of the cluster which show pathway in context of those genes but when i do a bit of filtering i see plenty of pathways with same or similar FDR which are sort of redundancy i suppose in terms of over-representation ,so i came up something like this
may be i need a bit more streamlining into it which as of now i can;t think up.
So few question just as in terms of gene clustering can i cluster those FDR or say same or similar FDR are getting clustered together which might be helpful in a way to concise and precise the result a bit better .
My data
structure(list(Function = c("covalent chromatin modification",
"histone modification", "histone methyltransferase complex",
"SWI/SNF superfamily-type complex", "histone methyltransferase activity",
"N-methyltransferase activity", "methyltransferase complex",
"protein methyltransferase activity", "histone methylation",
"S-adenosylmethionine-dependent methyltransferase activity",
"protein alkylation", "protein methylation", "macromolecule methylation",
"methylation", "methyltransferase activity", "transferase activity, transferring one-carbon groups",
"DNA helicase complex", "Ino80 complex", "peptidyl-lysine modification",
"SWI/SNF complex", "protein-DNA complex disassembly", "nucleosome disassembly",
"chromatin remodeling", "chromatin disassembly", "protein-DNA complex subunit organization",
"BAF-type complex", "INO80-type complex", "histone-lysine N-methyltransferase activity",
"histone acetyltransferase complex", "nucleosome organization",
"lysine N-methyltransferase activity", "protein-lysine N-methyltransferase activity"
), variable = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = "FDR", class = "factor"),
value = c(1.47992665134053e-13, 1.47992665134053e-13, 7.9468967129082e-09,
7.9468967129082e-09, 1.1841058070482e-08, 1.75996948641137e-08,
1.75996948641137e-08, 4.71690557750932e-08, 9.63620605173175e-08,
3.94626427029223e-07, 4.55323040178062e-07, 4.55323040178062e-07,
4.55323040178062e-07, 8.9471201991238e-07, 1.38187416380405e-06,
2.07900888100729e-06, 2.60629648189489e-05, 2.60629648189489e-05,
2.91531936861022e-05, 3.19327841103331e-05, 5.04466386223372e-05,
5.04466386223372e-05, 5.45938617344686e-05, 5.4956792922593e-05,
5.4956792922593e-05, 5.4956792922593e-05, 8.32575963760242e-05,
0.000287420280100368, 0.000372921199469602, 0.000387140224358431,
0.000447883223319561, 0.000447883223319561)), row.names = c(NA,
-32L), class = "data.frame")
My code
p <- ggplot(aes(x=Function, y=variable, fill=value), data=plot.data)
fig <- p + geom_tile() + scale_fill_gradient2(low="blue", mid="white", high="red") +
# geom_text(aes(label=stars, color=value), size=8) + scale_colour_gradient(low="grey30", high="white", guide="none") +
#geom_text(aes(label=stars), color="black", size=5) +
#labs(y=NULL, x=NULL, fill="t-value") + geom_vline(xintercept=1.5, size=1.5, color="grey50") +
theme_bw() + theme(axis.text.x=element_text(angle = -45, hjust = 0))
fig
Any help or suggestion or help would be highly appreciated