Instalar y correr la paquetería

#install.packages("pacman")
library("pacman")
## Warning: package 'pacman' was built under R version 4.2.3
p_load("readr",
       "dplyr",
       "ggplot2")

Cargar la base de datos

PCR <- read.csv(file="https://raw.githubusercontent.com/ManuelLaraMVZ/Transcript-mica/main/datos_miRNAs.csv")

PCR

Aislar el control y seleccionar solo a U6

Gen_ref <- PCR %>% 
  filter(Condicion == "Control") %>% 
  select(-2) %>% 
  filter(Gen == "U6 snRNA-001973")

Gen_ref
Gen_int <- PCR %>% 
  filter(Condicion == "Target") %>% 
  select(-2)

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
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)

Analisis
Grafica_1 <- ggplot(Analisis,
                    mapping = aes(x = DosDCT_Cx ,
                                  y = DosDCT_Tx)) +
  geom_point(color = "orange") +
  theme_classic() +
  labs(title = "Cambios de expresión de miRNAs",
       subtitle = "Gráfica de dispersión",
       caption = "Creo: Manuel Lara Lozano",
       x = "Condición control (2^-DCt)",
       y = "Tratamiento (2^-DCt)")+
  geom_smooth(method = "lm",
              color = "blue",
              alpha = 0.05,
              linewidth = 0.5)
  

Grafica_1
## `geom_smooth()` using formula = 'y ~ x'