[R-br] função geom_oint

Daniel Guimarães Tiezzi dtiezzi em usp.br
Qua Maio 25 15:51:30 -03 2022


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 = tl, 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()



daniel




> On May 25, 2022, at 8:01 AM, Michele Claire Breton por (R-br) <r-br em listas.c3sl.ufpr.br> wrote:
> 
> gene	BE-exp	BE%	CE_exp	CE%	E_exp	E%	F_exp	F%	HE_exp	HE%	L-exp	L%	LE-exp	LE%	N-exp	N%	SM-exp	SM%
> 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

-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20220525/15e95d33/attachment.htm>
-------------- Próxima Parte ----------
Um texto embutido e sem conjunto de caracteres especificado foi limpo...
Nome: teste.txt
Url: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20220525/15e95d33/attachment.txt>
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20220525/15e95d33/attachment-0001.htm>


Mais detalhes sobre a lista de discussão R-br