I have a dataframe that contains genes that are coded like P95, P104, etc. The number reflects the order in a gene name list
Gene names list (There are 2000 of them):
How to change the P## in the dataframe into gene names in this case?
UPD: here is an example dataframe and a gene names list:
gene <- c("(P10->UP)", "(P2->UP, P9->UP)", "(P10->UP, P3->UP)", "(P5->NORM, P7->UP)")
support <- c(0.95, 0.94, 0.93, 0.92)
df <- data.frame(gene, support)
gene_list <- c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")
P10 corresponds to the 10th gene "J", P2 is "B", etc.
The result I want to obtain should look like this: