Instalar y correr la paqueteria
install.packages("pacman")
## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.4'
## (as 'lib' is unspecified)
library("pacman")
p_load("readr","dplyr","ggplot2")
Cargar base datos
PCR <- read.csv(file="https://raw.githubusercontent.com/ManuelLaraMVZ/Transcript-mica/main/datos_miRNAs.csv")
head(PCR)
Gen_ref <- PCR %>%
filter(Condicion == "Control") %>%
select(-2) %>%
filter(Gen == "U6 snRNA-001973")
Gen_ref
Gen_int <- PCR %>%
filter(Condicion == "Target") %>%
select(-2)
head(Gen_int)
Mean_ref <- Gen_ref %>%
mutate(Prom_Cx = (Cx1+Cx2+Cx3)/3,Prom_Tx = (T1+T2+T3)/3) %>%
select("Gen","Prom_Cx","Prom_Tx")
Mean_ref
Mean_int <- Gen_int %>%
mutate(Prom_Cx = (Cx1+Cx2+Cx3)/3,Prom_Tx = (T1+T2+T3)/3) %>%
select("Gen","Prom_Cx","Prom_Tx")
Mean_int
head(Mean_int)
Analisis <- Mean_int %>%
mutate(DCT_Cx = Mean_int$Prom_Cx-Mean_ref$Prom_Cx,
DCT_Tx = Mean_int$Prom_Tx-Mean_ref$Prom_Tx,
DosDCT_Cx = 2^-(DCT_Cx),
DosDCT_Tx = 2^-(DCT_Tx)) %>%
mutate(DosDDCT = DosDCT_Tx/ DosDCT_Cx )
head (Analisis)
Grafica_1 <- ggplot(Analisis,
mapping = aes(x= DosDCT_Cx,
y= DosDCT_Tx))+
geom_point()
Grafica_1
Grafica_1 <- ggplot(Analisis,
mapping=aes(x=DosDCT_Cx,
y=DosDCT_Tx))+
geom_point(color="red")+
theme_classic()+
labs(title = "Cambios de expresión de miRNAS",
subtitle="Grafics de dispersión",
caption="Creo:Andrea Paredes",
x="Condición control (2^-DCt)",
y="Tratamiento (2^DCt)")+
geom_smooth(method = "lm",
color="blue",
alpha=0.005,
linewidth=0.2)
Grafica_1
## `geom_smooth()` using formula = 'y ~ x'