Hi,
I have a dataframe containing lists of genes names ("A" to "F") belonging to biological pathways :
df1 <- data.frame(Pathway=c("Pathway1","Pathway2"), Genes=c(("A,B,C,D"),("B,E,F"))
First, I'd like to export this data frame in excel
Then I'd like to color the genes ("A" to "F") according to their respectives log2FC values:
df2 <- data.frame(Genes=c("A","B","C","D","E","F"), log2FC=c(5,6,-4,-3,-1,2))
for example, genes with a positive log2FC value will appear in red in Excel and those with a negative value in green.
Before exporting the df1 in excel, do I first have to split the gene names and add them to separate columns ? Then it will be probably easier to color individual cells in excel with the conditionalFormatting function for example?
Maybe it's also not necessary to use Excel and to a directly get a graphical and colorized result with a R plot?
Thanks for your help!