Veja se seria algo assim

library(reshape2)
library(ggplot2)
library(dplyr)

t <- read.delim('teste.txt')

t1 <- t[,c(1,seq(2,ncol(t),2))] 
t2 <- t[,c(1,seq(3,ncol(t),2))]

t1l <- melt(t1, idvar = 'gene')
colnames(t1l)[3] <- 'exprs'
t2l <- melt(t2, idvar = 'gene')
colnames(t2l)[3] <- 'percentage'
tl <- left_join(t1l, t2l, by='gene')

ggplot(data = "" aes(x=gene, y=exprs)) + geom_point(aes(color=percentage)) + scale_color_gradient2(midpoint=mean(tl$percentage), low="blue", mid="white", high="red", space ="Lab" ) + theme_classic()

gene    BE_exp  BE_perc CE_exp  CE_perc E_exp   E_perc  F_exp   F_perc  HE_exp  
HE_perc L_exp   L_perc  LE_exp  LE_perc N_exp   N_perc  SM_exp  SM_perc
ACTB    4.006   99.8    3.690   99.6    2.691   95.2    2.377   80.1    2.901   
97.7    3.182   94.1    2.864   94.0    3.243   96.0    3.214   93.5
ACTG1   3.850   5.9     3.592   7.1     2.469   1.5     2.252   1.1     3.129   
6.4     2.451   0.6     2.979   1.1     3.104   0       2.500   2.4
AJUBA   1.185   5.9     0.972   7.1     1.042   1.5     0.912   1.1     1.043   
6.4     0.865   0.6     1.024   1.1     0       0       1.149   2.4

daniel




On May 25, 2022, at 8:01 AM, Michele Claire Breton por (R-br) <[email protected]> wrote:

geneBE-expBE%CE_expCE%E_expE%F_expF%HE_expHE%L-expL%LE-expLE%N-expN%SM-expSM%
ACTB4.00699.83.69099.62.69195.22.37780.12.90197.73.18294.12.86494.03.24396.03.21493.5
ACTG13.8505.93.5927.12.4691.52.2521.13.1296.42.4510.62.9791.13.10402.5002.4
AJUBA1.1855.90.9727.11.0421.50.9121.11.0436.40.8650.61.0241.1001.1492.4

_______________________________________________
R-br mailing list
[email protected]
https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br
Leia o guia de postagem (http://www.leg.ufpr.br/r-br-guia) e forneça código 
mínimo reproduzível.

Responder a